def _setup_channels(self):
"""
Setup channel, specifically the wavelength or temperature response functions.
Notes
-----
This should be replaced once the response functions are available in SunPy. Probably should
configure wavelength response function interpolators also.
"""
aia_fn = pkg_resources.resource_filename('synthesizAR', 'instruments/data/sdo_aia.json')
with open(aia_fn, 'r') as f:
aia_info = json.load(f)
for channel in self.channels:
channel['name'] = str(channel['wavelength'].value).strip('.0')
channel['instrument_label'] = '{}_{}'.format(self.fits_template['detector'],
channel['telescope_number'])
channel['wavelength_range'] = None
x = aia_info[channel['name']]['temperature_response_x']
y = aia_info[channel['name']]['temperature_response_y']
channel['temperature_response_spline'] = splrep(x, y)
x = aia_info[channel['name']]['response_x']
y = aia_info[channel['name']]['response_y']
channel['wavelength_response_spline'] = splrep(x, y)
评论列表
文章目录