Wavelength Cross correlation


Functions

cpl_polynomial * cpl_wlcalib_xc_best_poly (const cpl_vector *spectrum, const cpl_bivector *lines_catalog, int degree, const cpl_polynomial *guess_poly, const cpl_vector *wl_error, int nsamples, double slitw, double fwhm, double *xc, cpl_table **wlres, cpl_vector **xcorrs)
 Find the best polynomial in a given range.
cpl_bivector * cpl_wlcalib_xc_cat_extract (const cpl_bivector *lines_catalog, double wave_min, double wave_max)
 Extract a sub catalog.
int cpl_wlcalib_xc_convolve (cpl_vector *smoothed, const cpl_vector *conv_kernel)
 Convolve a 1d-signal with a symmetric 1D-signal.
cpl_vector * cpl_wlcalib_xc_convolve_create_kernel (double slitw, double fwhm)
 Create Right Half of a symmetric smoothing kernel.
cpl_table * cpl_wlcalib_xc_gen_spc_table (const cpl_vector *spectrum, const cpl_bivector *lines_catalog, double slitw, double fwhm, const cpl_polynomial *guess_poly, const cpl_polynomial *corr_poly)
 Generate the infos table.

Detailed Description

Synopsis:
   #include "cpl_wlcalib_xc.h"

Function Documentation

cpl_polynomial* cpl_wlcalib_xc_best_poly ( const cpl_vector *  spectrum,
const cpl_bivector *  lines_catalog,
int  degree,
const cpl_polynomial *  guess_poly,
const cpl_vector *  wl_error,
int  nsamples,
double  slitw,
double  fwhm,
double *  xc,
cpl_table **  wlres,
cpl_vector **  xcorrs 
)

Find the best polynomial in a given range.

Parameters:
spectrum The spectrum vector
lines_catalog The lines catalog
degree The polynomial degree
guess_poly Guess Dispersion Polynomial
wl_error Search range around the anchor points
nsamples Number of samples around the anchor points
slitw The slit width
fwhm The spectral FWHM [pixel]
xc Cross-correlation factor (returned)
wlres The table with the calibration results or NULL
xcorrs The vector with the correlation values or NULL
Returns:
the best polynomial or NULL in error case
wl_error must be of size degree+1.

The returned polynomial must be deallocated with cpl_polynomial_delete().

cpl_bivector* cpl_wlcalib_xc_cat_extract ( const cpl_bivector *  lines_catalog,
double  wave_min,
double  wave_max 
)

Extract a sub catalog.

Parameters:
lines_catalog Bivector with the lines
wave_min The wavelength min
wave_max The wavelength max
Returns:
the extracted bivector or NULL in error case

int cpl_wlcalib_xc_convolve ( cpl_vector *  smoothed,
const cpl_vector *  conv_kernel 
)

Convolve a 1d-signal with a symmetric 1D-signal.

Parameters:
smoothed Preallocated vector to be smoothed in place
conv_kernel Vector with symmetric convolution function
Returns:
0 or -1 in error case
The length of conv_kernel must be smaller than that of smoothed.

cpl_vector* cpl_wlcalib_xc_convolve_create_kernel ( double  slitw,
double  fwhm 
)

Create Right Half of a symmetric smoothing kernel.

Parameters:
slitw The slit width [pixel]
fwhm The spectral FWHM [pixel]
Returns:
Right Half of (symmetric) smoothing vector
The smoothing function is the right half of the convolution of a Gaussian with sigma = fwhm / (2 * sqrt(2*log(2))) and a top-hat with a width equal to the slit width. Since this function is symmetric only the central, maximum value and the right half is returned. The length of the resulting vector is 1 + 5 * sigma + slitw/2

cpl_table* cpl_wlcalib_xc_gen_spc_table ( const cpl_vector *  spectrum,
const cpl_bivector *  lines_catalog,
double  slitw,
double  fwhm,
const cpl_polynomial *  guess_poly,
const cpl_polynomial *  corr_poly 
)

Generate the infos table.

Parameters:
spectrum The spectrum vector
lines_catalog The lines catalog
slitw The slit width
fwhm The spectral FWHM [pixel]
guess_poly Guess Dispersion Polynomial
corr_poly Corrected Dispersion Polynomial
Returns:
the table with the results of the calibration or NULL in error case
The returned table must be deallocated with cpl_table_delete().


Generated on Thu Mar 6 17:29:21 2008 for Common Pipeline Library Reference Manual by  doxygen 1.5.1