1414class MakeRadianceMaps :
1515 def __init__ (self , config = None ):
1616 if config is None :
17- config_filename = os .getcwd () + '/config_files/config_default.ini'
17+ config_filename = os .getcwd () + '/suncet_instrument_simulator/ config_files/config_default.ini'
1818 self .config = self .__read_config (config_filename )
1919 else :
2020 self .config = config
@@ -165,8 +165,9 @@ def __construct_maps(self):
165165 def __solve_solar_params (self , header = None ):
166166 date = header ['DATE-OBS' ]
167167 solar_distance = int (sunpy .coordinates .sun .earth_distance (time = date ).to (u .m ).value )
168- solar_radius = sunpy .coordinates .sun .angular_radius (t = date )
169- return (solar_distance , solar_radius )
168+ solar_radius_angular = sunpy .coordinates .sun .angular_radius (t = date )
169+ solar_radius_meters = solar_distance * np .tan (solar_radius_angular .to (u .rad ).value )
170+ return (solar_distance , solar_radius_angular , solar_radius_meters )
170171
171172 def __save_map_sequence (self ):
172173 map_file_out = self .__make_outgoing_filename ()
@@ -176,11 +177,13 @@ def __save_map_sequence(self):
176177 hdu = fits .PrimaryHDU (map .data , map .fits_header )
177178 hdu .header ['DSUN_OBS' ] = solar_params [0 ]
178179 hdu .header ['RSUN' ] = solar_params [1 ].value
180+ hdu .header ['RSUN_REF' ] = solar_params [2 ]
179181 hdul = fits .HDUList (hdu )
180182 else :
181183 hdu = fits .ImageHDU (map .data , map .fits_header )
182184 hdu .header ['DSUN_OBS' ] = solar_params [0 ]
183185 hdu .header ['RSUN' ] = solar_params [1 ].value
186+ hdu .header ['RSUN_REF' ] = solar_params [2 ]
184187 hdul .append (hdu )
185188 print ('Saving Map: ' + map_file_out )
186189 try :
0 commit comments