Point pattern matching


Functions

cpl_polynomial * irplib_ppm_engine (const cpl_vector *spectrum, const cpl_bivector *lines_catalog, const cpl_polynomial *poly_init, double slitw, double fwhm, double thresh, int degree, int doplot, cpl_table **tab_infos)
 The Wavelength Calibration using PPM.
cpl_bivector * irplib_ppm_match_positions (cpl_vector *peaks, cpl_vector *lines, double min_disp, double max_disp, double tolerance)
 Identify peak candidates.

Function Documentation

cpl_polynomial* irplib_ppm_engine const cpl_vector *  spectrum,
const cpl_bivector *  lines_catalog,
const cpl_polynomial *  poly_init,
double  slitw,
double  fwhm,
double  thresh,
int  degree,
int  doplot,
cpl_table **  tab_infos
 

The Wavelength Calibration using PPM.

Parameters:
spectrum The spectrum vector
lines_catalog The lines catalog
poly_init Polynomial with the initial guess
slitw The slit width
fwhm The spectral FWHM [pixel]
thresh The threshold for lines detection
degree The polynomial degree
doplot Plotting level (zero for none)
tab_infos The computed solution table or NULL (computed)
Returns:
the polynomial solution or NULL in error case
The returned table must be deallocated with cpl_table_delete(). The returned polynomial must be deallocated with cpl_polynomial_delete().

Definition at line 76 of file irplib_ppm.c.

cpl_bivector* irplib_ppm_match_positions cpl_vector *  peaks,
cpl_vector *  lines,
double  min_disp,
double  max_disp,
double  tolerance
 

Identify peak candidates.

Parameters:
peaks List of peaks candidates
lines List of wavelengths
min_disp Min expected spectral dispersion (Angstrom/pixel)
max_disp Max expected spectral dispersion (Angstrom/pixel)
tolerance Tolerance for interval ratio comparison
Returns:
List of pixel positions and wavelengths of all identified peaks
The list of input peaks candidates (obtained with the functions mos_peak_candidates(), and possibly mos_refine_peaks() ) is compared with a list of expected emission lines wavelengths. The algorithm is based on pattern recognition, where the pattern is contained in the array line, and is searched in the list peaks.

In order to work, this method just requires a rough expectation value of the spectral dispersion (in Angstrom/pixel), and a line catalog. The line catalog line should just include lines that are expected somewhere in the CCD exposure of the calibration lamp (note, however, that a catalog including extra lines at its blue and/or red ends is still allowed).

Typically, the arc lamp lines candidates peaks will include light contaminations, hot pixels, and other unwanted signal, but only in extreme cases this prevents the pattern-recognition algorithm from identifying all the spectral lines. The pattern is detected even in the case peaks contained more arc lamp lines than actually listed in the input line catalog.

This method is based on the assumption that the relation between wavelengths and CCD positions is with good approximation locally linear (this is always true, for any existing spectrograph).

The ratio between consecutive intervals pairs in wavelength and in pixel is invariant to linear transformations, and therefore this quantity can be used in the recognition of local portions of the searched pattern. All the examined sub-patterns will overlap, leading to the final identification of the whole pattern, notwithstanding the overall non-linearity of the relation between pixels and wavelengths.

Ambiguous cases, caused by exceptional regularities in the pattern, or by a number of undetected (but expected) peaks that disrupt the pattern on the data, are solved by linear interpolation and extrapolation of the safe identifications.

More details about the applied algorithm can be found in the comments to the function code.

Definition at line 321 of file irplib_ppm.c.


Generated on Tue Jun 19 14:39:22 2007 for UVES Pipeline Reference Manual by  doxygen 1.4.6