00001 #ifndef WAVE_CAL_H 00002 #define WAVE_CAL_H 00003 /***************************************************************************** 00004 * E.S.O. - VLT project 00005 * 00006 * "@(#) $Id: wave_cal.h,v 1.7 2005/04/19 11:30:30 amodigli Exp $" 00007 * 00008 * who when what 00009 * -------- -------- ---------------------------------------------- 00010 * amodigli 17/09/03 created 00011 */ 00012 00013 /************************************************************************ 00014 * wave_cal.h 00015 00016 Normal method: 00017 00018 does the wavelength calibration and the fitting of the slitlet edge 00019 positions (ASCII file 32 x 2 values) if wished 00020 produces an array of the bcoefs and of the fit parameters if wished and a 00021 wavelength calibration map input is an emission line frame and a line list 00022 00023 o searching for lines by cross correlation with a line list 00024 o Gaussian fitting of emission lines in each column->positions of the lines-> 00025 resulting fit parameters can be stored in an ASCII file 00026 o Fitting of a polynomial to the line positions for each column 00027 o Smoothing: fitting of each polynomial coefficient by another polynomial 00028 across the whole frame -> resulting polynomial coefficients can be stored 00029 in an ASCII file. 00030 o Wavelength calibration map (micron value for each frame pixel) can be 00031 produced by using these coefficients and a cross correlation to the 00032 original frame 00033 00034 o The slitlet edge positions can be fitted: 00035 1) Automatically (not really stable) or by using guess edge positions 00036 2) By using a Boltzmann or a linear slope function 00037 00038 00039 Slit method: 00040 00041 does the wavelength calibration and the fitting of the slitlet edge 00042 positions (ASCII file 32 x 2 values) if wished produces a list of the fit 00043 parameters and of the smoothed coefficients if wished and a wavelength 00044 calibration map input is an emission line frame and a line list 00045 00046 o Does the same as other method but smoothes the found polynomial 00047 coefficients within each slitlet and not over the whole frame. 00048 00049 o Produces always a wavelength calibration map and does not crosscorrelate. 00050 00051 *---------------------------------------------------------------------- 00052 */ 00053 00054 /* 00055 * header files 00056 */ 00057 /* 00058 #include <stdio.h> 00059 #include <math.h> 00060 #include <cxmessages.h> 00061 00062 #include "eclipse.h" 00063 #include "spiffi.h" 00064 #include "utilities.h" 00065 */ 00066 00067 #include <cpl.h> 00068 #include "wavecal_ini_by_cpl.h" 00069 void change_header_wave_cal (fits_header ** head, char* out_name, int n_frames); 00070 00071 /*---------------------------------------------------------------------------- 00072 * Function ANSI C prototypes 00073 *--------------------------------------------------------------------------*/ 00074 00075 /*---------------------------------------------------------------------------- 00076 Function : wave_cal() 00077 In : ini_file: file name of according .ini file 00078 Out : integer (0 if it worked, -1 if it doesn't) 00079 Job : 00080 00081 00082 Normal method: 00083 00084 does the wavelength calibration and the fitting of the slitlet edge 00085 positions (ASCII file 32 x 2 values) if wished 00086 produces an array of the bcoefs and of the fit parameters if wished and a 00087 wavelength calibration map input is an emission line frame and a line list 00088 00089 00090 o searching for lines by cross correlation with a line list 00091 o Gaussian fitting of emission lines in each column->positions of the lines-> 00092 resulting fit parameters can be stored in an ASCII file 00093 o Fitting of a polynomial to the line positions for each column 00094 o Smoothing: fitting of each polynomial coefficient by another polynomial 00095 across the whole frame -> resulting polynomial coefficients can be stored 00096 in an ASCII file. 00097 o Wavelength calibration map (micron value for each frame pixel) can be 00098 produced by using these coefficients and a cross correlation to the 00099 original frame 00100 00101 o The slitlet edge positions can be fitted: 00102 1) Automatically (not really stable) or by using guess edge positions 00103 2) By using a Boltzmann or a linear slope function 00104 00105 Slit method: 00106 00107 does the wavelength calibration and the fitting of the slitlet edge 00108 positions (ASCII file 32 x 2 values) if wished produces a list of the fit 00109 parameters and of the smoothed coefficients if wished and a wavelength 00110 calibration map input is an emission line frame and a line list 00111 00112 o Does the same as other method but smoothes the found polynomial 00113 coefficients within each slitlet and not over the whole frame. 00114 00115 o Produces always a wavelength calibration map and does not crosscorrelate. 00116 ---------------------------------------------------------------------------*/ 00117 int wave_cal (cpl_parameterlist* config, cpl_frameset* sof) ; 00118 00119 00120 #endif 00121 00122 /*--------------------------------------------------------------------------*/
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001