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 _FINDDIST_CFG_H_
00013 #define _FINDDIST_CFG_H_
00014
00015 /*---------------------------------------------------------------------------
00016 Includes
00017 ---------------------------------------------------------------------------*/
00018
00019 /*
00020 #include <stdio.h>
00021 #include <stdlib.h>
00022 */
00023 #include "static_sz.h"
00024 #include <cpl.h>
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 finddist_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 nsFrame[FILENAMESZ] ; /* input north-south frame */
00052 char mask[FILENAMESZ] ; /* input north-south frame */
00053 char fitsname[FILENAMESZ] ;
00054 char drs_setup[FILENAMESZ] ;
00055 /*------ FindLines ------*/
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 /* number of slitlets */
00083 int nslitlets ;
00084 /* minimal pixel distance of slitlets in spectral direction */
00085 int pixeldist ;
00086 /* allowed pixel position tolerance between estimated and fitted line position */
00087 float pixel_tolerance ;
00088
00089 /*------ WaveMap ------*/
00090 /* magnifying factor for FFT */
00091 int magFactor ;
00092
00093 /*------ FitSlits ------*/
00094 /* pixel length of the row box within which the fit of the slitlet positions is carried out*/
00095 int boxLength ;
00096 /* lower row position for the estimate fit */
00097 int loPos ;
00098 /* upper row position for the estimate fit */
00099 int hiPos ;
00100 /* float box half width in spectral direction */
00101 float yBox ;
00102 /* maximal tolerable difference to the expected slitlet positions */
00103 float diffTol ;
00104 /*------ NorthSouthTest ------*/
00105 /* number of slitlets */
00106 int nslits ;
00107 /* pixel half width of a box within which the spatial profile is fitted by a Gaussian */
00108 int nshalfWidth ;
00109 /* first guess of the fwhm of the Gaussian fit function */
00110 float nsfwhm ;
00111 /* minimum amplitude above which the fit is carried out */
00112 float minDiff ;
00113 /* estimated average distance of spectra */
00114 float estimated_dist ;
00115 /* maximal pixel tolerance of the slitlet distances */
00116 float devtol ;
00117
00118 /*----qg log --------*/
00119 int qc_thresh_min;
00120 int qc_thresh_max;
00121
00122
00123 } finddist_config ;
00124 /*</python>*/
00125
00126
00127
00128 /*---------------------------------------------------------------------------
00129 Function prototypes
00130 ---------------------------------------------------------------------------*/
00131
00132
00133 /*---------------------------------------------------------------------------
00134 Function : wave_cfg_create()
00135 In : void
00136 Out : pointer to allocated base wave_cfg structure
00137 Job : allocate memory for a wave_cfg struct
00138 Notice : only the main (base) structure is allocated
00139 ---------------------------------------------------------------------------*/
00140
00141 finddist_config * finddist_cfg_create(void);
00142
00143
00144 /*---------------------------------------------------------------------------
00145 Function : wave_cfg_destroy()
00146 In : wave_config to deallocate
00147 Out : void
00148 Job : deallocate all memory associated with a wave_config data structure
00149 Notice :
00150 ---------------------------------------------------------------------------*/
00151 /*<python>*/
00152 void finddist_cfg_destroy(finddist_config * jc);
00153 /*</python>*/
00154
00155 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001