wavecal

sofia_redux.instruments.exes.wavecal.wavecal(header, order=None)[source]

Generate a wavelength calibration map from the grating equation.

Dispersion parameters are read from the header and used to calculate the wavenumber values for each pixel. The assumed central wavenumber for the observation (WAVENO0) is used for the first pass calibration; this value may be overridden by setting header[‘WNO0’] to a more accurate value.

Parameters:
headerfits.Header

Header of EXES FITS file.

orderint, optional

Cross-dispersed order to calculate wavelengths for. If provided, only the 1D wavelength array is produced.

Returns:
wavemapnumpy.ndarray

Array containing the wavelength values. If order is not provided, then a 3D data cube is produced, where the first plane is an image containing the wavelength value at each pixel, the second plane is an image containing the spatial coordinates for each pixel, and the third is an image containing the order number for each pixel. Keywords describing the wavelength calibration are added to header. If order is specified, only the 1D wavelength array is produced and the header is not modified.