00001
00002 /*---------------------------------------------------------------------------
00003
00004 File name : wavecal_cfg.h
00005 Author : Juergen Schreiber
00006 Created on : September 2001
00007 Description : wavecal_ini definitions + handling prototypes
00008
00009 ---------------------------------------------------------------------------*/
00010
00011
00012 #ifndef _WAVECAL_CFG_H_
00013 #define _WAVECAL_CFG_H_
00014
00015 /*---------------------------------------------------------------------------
00016 Includes
00017 ---------------------------------------------------------------------------*/
00018
00019 /*
00020 #include <stdio.h>
00021 */
00022 #include <stdlib.h>
00023 #include "static_sz.h"
00024
00025
00026 /*---------------------------------------------------------------------------
00027 Defines
00028 ---------------------------------------------------------------------------*/
00029
00030
00031 /*---------------------------------------------------------------------------
00032 New types
00033 ---------------------------------------------------------------------------*/
00034
00035
00036 /*
00037 Wavelength calibration blackboard container
00038
00039 This structure holds all information related to the wavelength calibration
00040 routine. It is used as a container for the flux of ancillary data,
00041 computed values, and algorithm status. Pixel flux is separated from
00042 the blackboard.
00043 */
00044
00045 /*<python>*/
00046 typedef struct wave_config {
00047 /*-------General---------*/
00048 char inFrame[FILENAMESZ] ; /* input emission line frame */
00049 char lineList[FILENAMESZ] ; /* input wavelength and intensity line list */
00050 char outName[FILENAMESZ] ; /* output name of resulting fits wavelength map */
00051 char drs_setup[FILENAMESZ] ; /* DRS setup table */
00052
00053 /*------ FindLines ------*/
00054 /* indicates if the dispersion relation is already determined or not */
00055 int calibIndicator ;
00056 /* estimated central wavelength of the image */
00057 float guessBeginWavelength ;
00058 /* estimated linear dispersion of emission line frame */
00059 float guessDispersion1 ;
00060 /* estimated square dispersion of emission line frame */
00061 float guessDispersion2 ;
00062 /* minimal difference of mean and median column intensity */
00063 float mindiff ;
00064 /* half width of a box within which the line must sit */
00065 int halfWidth ;
00066 /* sigma of Gaussian of artificial model spectra */
00067 float sigma ;
00068
00069 /*------ WaveCalib ------*/
00070 /* guess value for fwhm of emission lines */
00071 float fwhm ;
00072 /* minimum amplitude of a line to be fitted */
00073 float minAmplitude ;
00074 /* maximal residual value for a valid fit */
00075 float maxResidual ;
00076 /* # of polynomial coefficients used for the dispersion relation */
00077 int nrDispCoefficients ;
00078 /* # of polynomial coefficients used for the fit of the dispersion coefficients */
00079 int nrCoefCoefficients ;
00080 /* minimal factor of the standard deviation of the fit coefficients */
00081 float sigmaFactor ;
00082 /* indicates if the parameterized dispersion relation coefficients
00083 should be written into an ASCII file */
00084 int writeCoeffsInd ;
00085 /* indicates if the fit parameters should be written into an ASCII file */
00086 int writeParInd ;
00087 /* name of the ASCII file containing the fit parameters */
00088 char paramsList[FILENAMESZ] ;
00089 /* name of the ASCII file containing the coefficients of the parameterized dispersion relation */
00090 char coeffsName[FILENAMESZ] ;
00091 /* number of slitlets */
00092 int nslitlets ;
00093 /* minimal pixel distance of slitlets in spectral direction */
00094 int pixeldist ;
00095 /* allowed pixel position tolerance between estimated and fitted line position */
00096 float pixel_tolerance ;
00097
00098 /*------ WaveMap ------*/
00099 /* indicator if wavelength map should be generated or not */
00100 int wavemapInd ;
00101 /* magnifying factor for FFT */
00102 int magFactor ;
00103
00104 /*------ FitSlits ------*/
00105 /* indicator if the fit of the slit edge positions is carried through or not */
00106 int slitposIndicator ;
00107 /* indicator if the fit model function is a Boltzmann function or not */
00108 int fitBoltzIndicator ;
00109 /* indicator if the fit model function is a simple edge function or not */
00110 int fitEdgeIndicator ;
00111 /* indicator if the fit guess position are user given or calculated automatically */
00112 int estimateIndicator ;
00113 /* pixel length of the row box within which the fit of the slitlet positions is carried out*/
00114 int boxLength ;
00115 /* lower row position for the estimate fit */
00116 int loPos ;
00117 /* upper row position for the estimate fit */
00118 int hiPos ;
00119 /* float box half width in spectral direction */
00120 float yBox ;
00121 /* maximal tolerable difference to the expected slitlet positions */
00122 float diffTol ;
00123 /* name of the ASCII file containing the slitlet edge positions */
00124 char slitposName[FILENAMESZ] ;
00125 /* name of the ASCII file containing the estimated slitlet edge positions */
00126 char slitposGuessName[FILENAMESZ] ;
00127
00128
00129 int qc_thresh_min;
00130 int qc_thresh_max;
00131
00132 } wave_config ;
00133 /*</python>*/
00134
00135
00136
00137 /*---------------------------------------------------------------------------
00138 Function prototypes
00139 ---------------------------------------------------------------------------*/
00140
00141
00142 /*---------------------------------------------------------------------------
00143 Function : wave_cfg_create()
00144 In : void
00145 Out : pointer to allocated base wave_cfg structure
00146 Job : allocate memory for a wave_cfg struct
00147 Notice : only the main (base) structure is allocated
00148 ---------------------------------------------------------------------------*/
00149
00150 wave_config * wave_cfg_create(void);
00151
00152
00153 /*---------------------------------------------------------------------------
00154 Function : wave_cfg_destroy()
00155 In : wave_config to deallocate
00156 Out : void
00157 Job : deallocate all memory associated with a wave_config data structure
00158 Notice :
00159 ---------------------------------------------------------------------------*/
00160 /*<python>*/
00161 void wave_cfg_destroy(wave_config * jc);
00162 /*</python>*/
00163
00164 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001