Documentation of the spectral calibration

This script makes the spectral calibration of the 16 outputs. This script requires the library GLINT Pipeline’s classes to work.

The inputs are averaged dark, datacubes with spectral bands and the data from the geometric calibration (cf Documentation of the geometric calibration). It is assumed one data file contains only one spectral band with its wavelength in the name. The script successively loads the data files related to one wavelength and extracts the 16 outputs. For each of them, we assume the spectral band is shaped as a Gaussian. A model fitting with this shape is performed to get the position and width (in pixel). Once all files of all wavelength are processed, a polynomial fit is performed to map the wavelength to the column of pixels for each output.

The outputs products are:
  • The polynomial coefficients mapping the wavelength respect to the column of pixels.
  • The polynomial coefficients mapping he column of pixels respect to the wavelengths.
  • The spectral psf, giving the spectral resolution.

The outputs are saved into numpy-format file (.npy).

This script is used in 3 steps.

First step: simply change the value of the variables in the section Settings:
  • save: boolean, True for saving products and monitoring data, False otherwise
Second step: change the value of the variables in the sections Inputs, Outputs and Iterate on wavelength:
  • datafolder: folder containing the datacube to use.
  • data_list: list of files in datafolder to open.
  • output_path: path to the folder where the products are saved.
  • calibration_path: path to the calibration files used to process the file (location, width of the outputs, etc.).
  • wavelength: list, list of wavelengths used to acquire the data

Third step: start the script and let it run.

glint_spectral_calibration.gaussian(x, A, x0, sig, offset)

Computes a Gaussian curve

Parameters:

x: values where the curve is estimated.

a: amplitude of the Gaussian.

x0: location of the Gaussian.

sig: scale of the Gaussian.

Returns:

Gaussian curve.