NACO Pipeline Reference Manual  4.4.0
Functions
Wavelength calibration routines

Functions

computed_disprelnaco_spectro_compute_disprel (const cpl_image *in, int discard_lo, int discard_hi, int discard_le, int discard_ri, int remove_thermal, const char *table_name, double slit_width, int order, int output_ascii, double *phdisprel)
 Compute a 3rd degree dispersion relation. More...
 

Detailed Description

Function Documentation

computed_disprel* naco_spectro_compute_disprel ( const cpl_image *  in,
int  discard_lo,
int  discard_hi,
int  discard_le,
int  discard_ri,
int  remove_thermal,
const char *  table_name,
double  slit_width,
int  order,
int  output_ascii,
double *  phdisprel 
)

Compute a 3rd degree dispersion relation.

Parameters
inAllocated spectroscopic image
discard_loNumber of pixels to discard at the bottom
discard_hiNumber of pixels to discard at the top
discard_leNumber of pixels to discard on the left
discard_riNumber of pixels to discard on the right
remove_thermalFlag to force thermal background removal.
table_nameSpectral table name (see below)
slit_widthWidth in pixels of the slit used
orderOrder used in the spectral table look-up
output_asciiFlag for ascii products
phdisprel4 polynomial coefficients as first guess (phys. mod.?)
Returns
a computed_disprel object containing among others the solution poly.

Compute a dispersion relation from a spectroscopic image showing some strong emission lines. A vital assumption is that strong emission lines can be seen in the image.

The first guess polynomial may have degree 2. In that case the 3rd degree coefficient (4th value) must be zero.

The removal of thermal background will attempt to remove from the spectroscopic image any low-frequency components, i.e. any features that are a lot wider than the slit width.

The spectral table name is a character string. Possible values are:

"oh" (OH lines) "Xe" (Xenon lines) "Ar" (Argon lines) "Xe+Ar" (Xenon and Argon lines)

The order determines at which location in the spectral table the look-up for emission lines will be done.

The output cross-correlation factor is a number between 0 and 1. A good fit typically results in a value in the range 0.7 to 0.95, while a spectroscopic image without a number of well separated strong emission lines typically will yield a value down to about 0.5. Early spectroscopic images from the ESO ISAAC instrument cross-correlate down to 0.38.

Algorithm:

  1. Spectrum extraction along the spectrum direction (horizontal). For each column the lower and higher pixels are discarded, then a median value of the remaining pixels in the column is returned. This forms a 1d signal of same size as the image in the spectrum direction.
  2. If a thermal background should be removed, this is done at this point.
  3. If some values must be discarded (set to zero) in the input spectrum, they are zeroed at that point.
  4. Spectral lines are retrieved from a catalog (internal).
  5. A search is done for the polynomial that maximizes the cross-correlation of the extracted signal and the spectral lines catalog.

Setting parts of the input spectrum to zero enables a correct wavelength calibration in the thermal regime. You should provide -1 and -1 if you want to let this function decide for you about a correct zeroing interval, (0,0) if you do not want to zero the spectrum at all, and any other values depending on which interval you want to set to zero on each side of the spectrum. Notice that setting these values to (10,20) will set to zero the 10 left pixels and 20 rightmost pixels of the input spectrum before throwing it into the cross-correlation procedure.

Definition at line 122 of file naco_wavelength.c.