Documentation of the geometric calibration

This script determines the position and width of the outputs per spectral channel, assuming a Gaussian profile. This script requires the library GLINT Pipeline’s classes to work.

The inputs are averaged dark and datacube with no fringe. To get them, either you can try to be out of the coherent envelop for all baselines or having a large time-varying phase. In the last case, the average frame of the datacube blurs the fringe.

The product is:
  • the coefficients of the Gaussian profile as an array of shape: (spectral channels, output, coefficient).

The saved coefficients are in this order: the amplitude, the location, the sigma and the offset of the Gaussian. While only the location and the sigma are really useful for the DRS, the others are kept for deep diagnotics. The product is saved into numpy-format file (.npy).

This script is used in 3 steps.

First step: simply change the value of the variables in the Settings section:
  • save: boolean, True for saving products and monitoring data, False otherwise
  • monitoring: boolean, True for displaying the results of the model fitting and the residuals for both location and width for all outputs
Second step: change the value of the variables in the Inputs and Outputs sections:
  • datafolder: folder containing the datacube to use.
  • root: path to datafolder.
  • data_list: list of files in datafolder to open.
  • output_path: path to the folder where the products are saved.
  • spectral_calibration_path: path to the files of the spectral calibration
  • wl_to_px_coeff: file of the conversion of wavelength (nm) to pixel
  • px_to_wl_coeff:file of the conversion of pixel to wavelength (nm)

Third step: start the script and let it run.

glint_geometric_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.