Skip to content

Commit

Permalink
Added WAVEUNIT keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
danseaton committed Sep 15, 2023
1 parent ead96c7 commit abc2cfc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion suncet_instrument_simulator/make_radiance_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def __make_header_template(self):
header['PC2_1'] = 0.0
header['PC2_2'] = 1.0
header['WAVELNTH'] = 170.0 # NOTE: FITS doesn't have a keyword to store the units for wavelength, it's usually listed in the header comment instead
header['BUNIT'] = 'photon/(cm2 s sr Angstrom)' # TODO: Dan: Consider forcing in a wavelength unit as well, and then reading that value in load_maps
header['WAVEUNIT'] = 'Angstrom'
header['BUNIT'] = 'photon/(cm2 s sr Angstrom)'
header['WCSNAME'] = 'Helioprojective-cartesian'
header['HGLT_OBS'] = 0.0
header['HGLN_OBS'] = 0.0
Expand Down Expand Up @@ -164,9 +165,11 @@ def __save_map_sequence(self):
for n, map in enumerate(self.map_seq):
if n == 0:
hdu = fits.PrimaryHDU(map.data, map.fits_header)
map.fits_header['WAVELNTH'] = (map.fits_header['WAVELNTH'], '[Angstrom]')
hdul = fits.HDUList(hdu)
else:
hdu = fits.ImageHDU(map.data, map.fits_header)
map.fits_header['WAVELNTH'] = (map.fits_header['WAVELNTH'], '[Angstrom]')
hdul.append(hdu)
print('Saving Map: ' + map_file_out)
try:
Expand Down

0 comments on commit abc2cfc

Please sign in to comment.