# Spectral Imager¶

class retrieval.instruments.spectral_imager.MultiSensorImager(wavel_nm, los, vertical=None, obs=None, mjd=None)

Class that holds multiple independent sensors. Useful for grouping multiple sensors into a single instrument, or multiple independent exposures into a single measurement

Parameters: wavel_nm : a list of arrays, one for each sensors los : a list of nx3 arrays. Each list element contains the optical axis lines of sight for a sensor with n subexposures. Specificies in geodetic x,y,z coordinate. vertical : a list in the same format and size as los describing the vertical orientation of the sensor. If the sensor has more than one pixel, or the pixel line of sight is oversamples this should be set. obs : a list in the same format and size as los describing the observer position. This should be set if the instrument will be used to setup the radiative transfer model. mjd : a list in the same format and size as los describing the modified julian date of each line of sight. This should be set if the instrument will be used to setup the radiative transfer model.

Examples

Ex. 1 Create an instrument with the following properties
1. 2 sensors
2. Each sensor has one line sight
3. Each line of sight has 2 subexposures
4. Each sensor measures 3 wavelengths
5. Wavelengths and line of sight are not oversampled
>>> from retrieval import instruments as instrument
>>> import numpy as np
>>> wavel = [np.array([300,400,500]),     np.array([450, 600, 800])]
>>> los   = [np.array([[0,1,0],[0,1,0]]), np.array([[1,0,0],[1,0,0]])]
>>> inst = instrument.MultiSensorImager(wavel, los)
>>> inst.initialize_sensors_and_optics()


Ex. 2 Create the same sensor, but oversample each wavelength 5 times

>>> from retrieval import instruments as instrument
>>> import numpy as np
>>> wavel = [np.array([300,400,500]),     np.array([450, 600, 800])]
>>> los   = [np.array([[0,1,0],[0,1,0]]), np.array([[1,0,0],[1,0,0]])]
>>> inst = instrument.MultiSensorImager(wavel, los)
>>> inst.waveSamples = 5
>>> inst.psf_wavel_nm = np.array([100 200 1000])
>>> inst.psf          = np.array([0.2 0.3 1.0])
>>> inst.initialize_sensors_and_optics()


Methods

calculate_radiance()

Calculates the instrument measurement and weighting function.

convert_radiance_to_l1(radiance)
Parameters: radiance : np.array an nxm array where n is the number of lines of sight and m is the number of wavelenghts. measurement : list[np.arrays] a list of 2 dimensional arrays, one for each sensor. 2 dimensional arrays have dimensions of lines of sight x wavelengths.
define_mjd(mjd)

Arranges the mjd into the proper format if none is given

define_vertical_axis(vertical)

Arranges the vertical orientation into the proper format if none is given

get_meas_geometry()

Provides the lines of sight and observer positions of the instrument measurements

Returns: pixel_los : np.array list of pixel lines of sight in geographic coordinates pixel_obs : np.array list of pixel locations in geographic coordinates
radtran_geometry()

Provides the high resolution geometries that the radiative transfer calculation should be done at.

Returns: line of sight : np.array an array of lines of sight (nx3) observer : np.array an array of observer positions (nx3) line of sight : np.array an array of modified julian dates, one for each los/observer
radtran_wavelengths()

Provides the high resolution wavelengths that the radiative transfer calculation should be done at.

Returns: wavelength : np.array an array of high resolution wavelengths for the radiative transfer transfer calculation
set_sensor_wavelengths(wavel_nm, sensor_number)

Sets the low resolution wavelengths of a sensor. Typically this is used only internally.

setup_instrument()

Initializes the instrument geometry including spacial oversampling, this is typically called from initialize_sensors_and_optics()

Creates the high resolution lines of sight and weighting factors for each pixel using the instrument optics

setup_radtran_model(radtran)

Sets up the radiative transfer model lines of sight and wavelengths

Parameters: radtran : pointer to a radtran class See radtran for details