IIINSTRUMENT Pipeline Reference Manual  1.5.13
Functions
Wavelength calibration routines

Functions

cpl_polynomial * sofi_wavelength_engine (const cpl_image *in, const char *table_name, const char *oh, const char *xe, const char *ne, const cpl_polynomial *phdisprel, double slit_width, int degree, double wl_err, int nsamples, int use_ppm, int plot, double *xcorr)
 Compute a dispersion relation. More...
 
double sofi_get_slitwidth (const char *filename)
 Find out the slit width. More...
 
cpl_polynomial * sofi_get_disprel_estimate (const char *filename, int poly_deg)
 Estimate the instrument dispersion relation. More...
 

Detailed Description

Function Documentation

◆ sofi_get_disprel_estimate()

cpl_polynomial* sofi_get_disprel_estimate ( const char *  filename,
int  poly_deg 
)

Estimate the instrument dispersion relation.

Parameters
filenameinput file name
poly_degpolynomial degree
Returns
1 newly allocated cpl_polynomial or NULL on error

Definition at line 313 of file sofi_wavelength.c.

References sofi_pfits_get_mode(), and sofi_pfits_get_naxis2().

◆ sofi_get_slitwidth()

double sofi_get_slitwidth ( const char *  filename)

Find out the slit width.

Parameters
filenameSOFI fits file name
Returns
the slit width in pixels or -1 in error case

Definition at line 263 of file sofi_wavelength.c.

References sofi_pfits_get_opti1_id(), and sofi_pfits_get_pixscale().

◆ sofi_wavelength_engine()

cpl_polynomial* sofi_wavelength_engine ( const cpl_image *  in,
const char *  table_name,
const char *  oh,
const char *  xe,
const char *  ne,
const cpl_polynomial *  phdisprel,
double  slit_width,
int  degree,
double  wl_err,
int  nsamples,
int  use_ppm,
int  plot,
double *  xcorr 
)

Compute a dispersion relation.

Parameters
inAllocated spectroscopic image
table_nameSpectral table name (see below)
ohthe oh lines catalog
xethe xe lines catalog
nethe ne lines catalog
phdisprelfirst guess polynomial (phys. mod.?)
slit_widthWidth in pixels of the slit used
degreeDegree of the polynomial to fit the matched lines
wl_errthe wl error
nsamplesNumber of samples for wavelength computation
use_ppmUse the point pattern matching at the end
plotFlag for plots
xcorrthe cross correlation factor (computed)
Returns
The polynomial with th solution or NULL in error case

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

Definition at line 150 of file sofi_wavelength.c.