GIRAFFE Pipeline Reference Manual

Wavelength Calibration

Functions

cpl_image * giraffe_compute_pixel_abcissa (cpl_matrix *m_wavelengths, GiSlitGeometry *fiber_slit_position, cpl_matrix *m_opt_mod_params, lmrq_model lmrq_opt_mod_x)
 X abcissa computation.
cxint giraffe_wavelength_calibration (GiTable *result, GiExtraction *extraction, GiLocalization *localization, GiTable *grating, GiTable *slitgeo, GiTable *wavelengths, GiWcalConfig *config, GiWcalSolution *wavcoeff)
 Perform Wavelength Calibration.
void giraffe_wavecalibration_config_add (cpl_parlist *list)
 Adds parameters for the Wavelength Calibration.
GiWcalConfiggiraffe_wavecalibration_config_create (cpl_parlist *list)
 Creates a setup structure for the Wavelength Calibration.
void giraffe_wavecalibration_config_destroy (GiWcalConfig *config)
 Destroys a setup structure for the Wavecalibration.
GiWcalSolution * giraffe_wcalsolution_new (void)
 Create a new GiWcalSolution.
void giraffe_wcalsolution_delete (GiWcalSolution *ws)
 Destroy an GiWcalSolution.
void giraffe_wcalsolution_dump (GiWcalSolution *ws)
 Dump the the information contained in a GiWcalSolution to output.
GiWcalSolution * giraffe_wcalsolution_create (GiTable *wavesolution)
 Create a wavecalibration results structure based on a GiTable read from disk.

Detailed Description

Main processing functions for Wavelength Calibration

  1. Retrieves Grating Data
  2. Retrieves Slit Geometry Data
  3. Retrieves Wavelength Catalog Data
  4. Remove crowded wavelengths from wavelength catalog
  5. Calculate X position of reference wavelenghts
  6. Perform LMRQ Fit of reference lines to actual data
  7. Update wavelength information in fitted image
  8. Perform fitting of PSF X width
  9. Find optimal physical optical parameters (optional)
  10. Update X and Y coordinates based on (new) physical optical model parameters
  11. Find Residulas of observerd versus computed solution
  12. Fit Residuals to polynomial
  13. Calculate Statistics of fit

Function Documentation

cpl_image* giraffe_compute_pixel_abcissa ( cpl_matrix *  m_wavelengths,
GiSlitGeometry fiber_slit_position,
cpl_matrix *  m_opt_mod_params,
lmrq_model  lmrq_opt_mod_x 
)

X abcissa computation.

Parameters:
m_wavelengths wavelengths of reference lines {mm} [nwlen]
fiber_slit_position Fiber X and Y slit positions {mm}
m_opt_mod_params X optical model parameters: (ny{pix},ypixsize{mm},fcoll{mm},cfact, gtheta{rad},gorder,gspace{mm}, slitdx{mm},slitdy{mm},slitphi{rad})
lmrq_opt_mod_x Physical optical model to use.
Returns:
xref image [nwlen,ns] of X abcissa for each line and spectrum or NULL if an error occured
Description
This procedure computes, for a given combination of spectrum (actually fibre) stored in fiber_slit_position and reference wavelength m_wavelengths[1..nwlen], the absolute position (in pixels, along the spectrum) on the extracted spectra image. This is done using a theoretical-physical optical model optical model lmrq_opt_mod_x() and model parameters specified in m_opt_mod_params().
Attention:
The returned image xref must be freed using cpl_image_delete().
See also:
giraffe_fit_opt_mod()
mrqxoptmod()
mrqxoptmod2()
lmrq_model

Definition at line 1117 of file giwavecalib.c.

References lmrq_model::cfunc, and lmrq_model::ninputs.

void giraffe_wavecalibration_config_add ( cpl_parlist *  list  ) 

Adds parameters for the Wavelength Calibration.

Parameters:
list Parameter list to which parameters are added.
Returns:
Nothing.
Description :
TBD

Definition at line 5634 of file giwavecalib.c.

void giraffe_wavecalibration_config_destroy ( GiWcalConfig config  ) 

Destroys a setup structure for the Wavecalibration.

Parameters:
config The setup structure to destroy.
Returns:
Nothing.
Description :
The function deallocates the memory used by the setup structure config.

Definition at line 6268 of file giwavecalib.c.

References GiWcalConfig::line_widths.

Referenced by giraffe_wavecalibration_config_create().

cxint giraffe_wavelength_calibration ( GiTable *  result,
GiExtraction *  extraction,
GiLocalization *  localization,
GiTable *  grating,
GiTable *  slitgeo,
GiTable *  wavelengths,
GiWcalConfig config,
GiWcalSolution *  wavcoeff 
)

Perform Wavelength Calibration.

Parameters:
result 
extraction 
localization 
grating 
slitgeo 
wavelengths 
config 
wavcoeff 
Description:
Needs to be written...
Returns:
==0 if successfull, >0 if an error occured
Status Codes :
1 = Error in input parameters (NULL value somewhere) 2 = Could not read necessary value from FITS Keyword 3 = Error retrieving grating data 4 = Error retrieving slit geometry data 5 = Error retrieving wavelength setup 6 = Error eliminating crowded wavelengths 7 = Invalid line fitting model 8 = Error during line fitting 9 = Error updating wavelength data 10 = Error during PSF Fitting 11 = Error during optical model fitting 12 = Error during optical residuals fitting 13 = Error removing bad lines 14 = Error computing position of reference wavelengths

Definition at line 4643 of file giwavecalib.c.

References GiGrating::band, GiGrating::fcoll, GiWcalConfig::fit_subslits, GiWcalConfig::flux_ratio, GiGrating::gcam, giraffe_grating_delete(), giraffe_grating_new(), giraffe_grating_setup(), giraffe_image_delete(), giraffe_image_get(), giraffe_image_get_properties(), giraffe_image_new(), giraffe_imagestack_delete(), giraffe_imagestack_get(), giraffe_imagestack_set(), giraffe_slitgeometry_create(), giraffe_slitgeometry_delete(), giraffe_table_delete(), giraffe_table_duplicate(), giraffe_table_get(), giraffe_table_get_properties(), giraffe_table_new(), giraffe_table_set_properties(), GiWcalConfig::line_dchsq, GiWcalConfig::line_model, GiWcalConfig::line_niter, GiWcalConfig::line_ntest, GiWcalConfig::line_offset, GiWcalConfig::line_reswidratio, GiWcalConfig::line_threshold, GiWcalConfig::line_widexpo, GiWcalConfig::line_widths, lmrq_model::name, GiWcalConfig::opt_direction, GiWcalConfig::opt_mod_dchsq, GiWcalConfig::opt_mod_niter, GiWcalConfig::opt_mod_ntest, GiWcalConfig::opt_model, GiWcalConfig::opt_solution, GiGrating::order, GiWcalConfig::pxw_clip_level, GiWcalConfig::pxw_clip_mfrac, GiWcalConfig::pxw_clip_niter, GiWcalConfig::pxw_poly_x_deg, GiWcalConfig::pxw_poly_y_deg, GiGrating::resol, GiGrating::sdx, GiGrating::sdy, GiGrating::space, GiGrating::sphi, GiGrating::theta, GiGrating::wlen0, GiWcalConfig::xws_clip_level, GiWcalConfig::xws_clip_mfrac, GiWcalConfig::xws_clip_niter, GiWcalConfig::xws_poly_x_deg, and GiWcalConfig::xws_poly_y_deg.

GiWcalSolution* giraffe_wcalsolution_create ( GiTable *  wavesolution  ) 

Create a wavecalibration results structure based on a GiTable read from disk.

Parameters:
wavesolution GiTable containing wavecalibration solution
Returns:
Pointer to new GiWcalSolution or NULL if an error occured
Description:
Creates a GiWcalSolution structure filled with the coefficients of the wavecalibration solution which are stored in the GiTable wavesolution

Definition at line 172 of file giwavecalib_types.c.

References giraffe_slitgeometry_delete(), giraffe_slitgeometry_new(), giraffe_slitgeometry_resize(), giraffe_slitgeometry_set(), giraffe_table_get(), and giraffe_table_get_properties().

void giraffe_wcalsolution_delete ( GiWcalSolution *  ws  ) 

Destroy an GiWcalSolution.

Parameters:
ws GiWcalSolution to destroy
Description:
Destroys an GiWcalSolution and frees all associated memory

Definition at line 84 of file giwavecalib_types.c.

References giraffe_slitgeometry_delete().

void giraffe_wcalsolution_dump ( GiWcalSolution *  ws  ) 

Dump the the information contained in a GiWcalSolution to output.

Parameters:
ws GiWcalSolution to dump
Description:
Dump the information contained in a GiWcalSolution ws using the CPL messaging subsystem.

Definition at line 109 of file giwavecalib_types.c.

References giraffe_matrix_dump(), giraffe_slitgeometry_get(), and giraffe_slitgeometry_size().

GiWcalSolution* giraffe_wcalsolution_new ( void   ) 

Create a new GiWcalSolution.

Returns:
Pointer to newly created GiWcalSolution or NULL if an error occured
Description :
Creates a new GiWcalSolution

Definition at line 57 of file giwavecalib_types.c.


This file is part of the GIRAFFE Pipeline Reference Manual 2.8.8.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri Mar 4 10:50:29 2011 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004