def log10_h2(h2_image): log_h2_data = np.log10(h2_image.data) log_h2_hdu = fits.PrimaryHDU(log_h2_data,h2_image.header) return log_h2_hdu