add plt.close() to suit new matplotlib and update Epi_intensity_count