radiometric_calibration#

irispy.utils.spectrograph.radiometric_calibration(
cube: SpectrogramCube | SpectrogramCubeSequence,
) SpectrogramCube | SpectrogramCubeSequence[source]#

Performs radiometric calibration on the input cube or cube sequence.

This takes into consideration also the observation time and uses the latest response.

The data is also exposure time corrected during the conversion.

This takes into account the spectral dispersion and solid angle of the pixels based on the WCS. Which is different from the IDL code as does not take spectral dispersion into account. If you want the same results as the IDL code, can multiply the output by the spectral dispersion.

The spectral dispersion and solid angle are calculated using the WCS information. The wavelength axis and spatial axis should be determined dynamically from the WCS, rather than assuming fixed axis indices. For example, the spectral dispersion is calculated as cube.wcs.wcs.cdelt[wavelength_axis] * cube.wcs.wcs.cunit[wavelength_axis], and the solid angle as cube.wcs.wcs.cdelt[spatial_axis] * cube.wcs.wcs.cunit[spatial_axis] * SLIT_WIDTH, where wavelength_axis and spatial_axis are determined from the WCS.

Parameters:

cube (irispy.spectrograph.SpectrogramCube | irispy.spectrograph.SpectrogramCubeSequence) – The input cube to be calibrated.

Returns:

New cube in new units.

Return type:

irispy.spectrograph.SpectrogramCube or irispy.spectrograph.SpectrogramCubeSequence

Notes

This is designed to do the same as iris2/iris_calib_spectrum.pro IDL code.

The calibration output has been confirmed to provide the same results as those provided by the SolarSoft IDL routine IRIS_CALIB. The major difference being that the output here is accounting for the wavelength, which is why the units here are \(erg s^{-1} sr^{-1} cm^{-2} Å^{-1}\) and not \(erg s^{-1} sr^{-1} cm^{-2}\). Notice the extra \(Å^{-1}\) in the units.