28 #ifndef IRPLIB_DETMON_H
29 #define IRPLIB_DETMON_H
36 #include <detmon_cpl_size.h>
46 #define DETMON_QC_FREQ "ESO QC FREQ"
47 #define DETMON_QC_FREQ_C "Spectrum frequency"
49 #define DETMON_QC_POW "ESO QC POW"
50 #define DETMON_QC_POW_C "Spectrum power"
52 #define DETMON_QC_DUTYCYCL "ESO QC DUTYCYCL"
53 #define DETMON_QC_DUTYCYCL_C "DUTYCYCL value (time to store a frame)"
55 #define DETMON_QC_MASTER_MEAN "ESO QC MASTER MEAN"
56 #define DETMON_QC_MASTER_MEAN_C "Master Mean value"
58 #define DETMON_QC_MASTER_RMS "ESO QC MASTER RMS"
59 #define DETMON_QC_MASTER_RMS_C "Master RMS value"
61 #define DETMON_QC_NBCOLDPIX "ESO QC NBCOLPIX"
62 #define DETMON_QC_NBCOLDPIX_C "Number of cold pixels"
64 #define DETMON_QC_NBHOTPIX "ESO QC NBHOTPIX"
65 #define DETMON_QC_NBHOTPIX_C "Number of hot pixels"
67 #define DETMON_QC_NBDEVPIX "ESO QC NBDEVPIX"
68 #define DETMON_QC_NBDEVPIX_C "Number of deviating pixels"
70 #define DETMON_QC_BIAS_RANDOM_VAL "ESO QC BIAS RANDOM VAL"
71 #define DETMON_QC_BIAS_RANDOM_VAL_C "Bias level (random sampling method) [ADU]"
73 #define DETMON_QC_BIAS_RANDOM_RON "ESO QC BIAS RANDOM RON"
74 #define DETMON_QC_BIAS_RANDOM_RON_C "Bias Read Out Noise (random sampling method) [ADU]"
76 #define DETMON_QC_BIAS_HISTO_VAL "ESO QC BIAS HISTO VAL"
77 #define DETMON_QC_BIAS_HISTO_VAL_C "Bias level (histogram method) [ADU]"
79 #define DETMON_QC_BIAS_HISTO_RON "ESO QC BIAS HISTO RON"
80 #define DETMON_QC_BIAS_HISTO_RON_C "Bias Read Out Noise (histogram method) [e- rms]"
82 #define DETMON_QC_BIAS_PRESCAN_MEAN "ESO QC BIAS PRESCAN MEAN"
83 #define DETMON_QC_BIAS_PRESCAN_MEAN_C "Bias mean level (on prescan region) [ADU]"
85 #define DETMON_QC_BIAS_PRESCAN_MED "ESO QC BIAS PRESCAN MED"
86 #define DETMON_QC_BIAS_PRESCAN_MED_C "Bias median level (on prescan region) [ADU]"
88 #define DETMON_QC_BIAS_PRESCAN_RON "ESO QC BIAS PRESCAN RON"
89 #define DETMON_QC_BIAS_PRESCAN_RON_C "Bias Read Out Noise (on prescan region) [e- rms]"
92 #define DETMON_QC_BIAS_OVERSCAN_MEAN "ESO QC BIAS OVERSCAN MEAN"
93 #define DETMON_QC_BIAS_OVERSCAN_MEAN_C "Bias mean level (on overscan region) [ADU]"
95 #define DETMON_QC_BIAS_OVERSCAN_MED "ESO QC BIAS OVERSCAN MED"
96 #define DETMON_QC_BIAS_OVERSCAN_MED_C "Bias median level (on overscan region) [ADU]"
98 #define DETMON_QC_BIAS_OVERSCAN_RON "ESO QC BIAS OVERSCAN RON"
99 #define DETMON_QC_BIAS_OVERSCAN_RON_C "Bias Read Out Noise (on overscan region) [e- rms]"
101 #define DETMON_QC_BIAS_REGION_VAL "ESO QC BIAS REGION VAL"
102 #define DETMON_QC_BIAS_REGION_VAL_C "Bias level (on user defined region) [ADU]"
104 #define DETMON_QC_BIAS_REGION_MED "ESO QC BIAS REGION MED"
105 #define DETMON_QC_BIAS_REGION_MED_C "Bias median level (on user defined region) [ADU]"
107 #define DETMON_QC_BIAS_REGION_RON "ESO QC BIAS REGION RON"
108 #define DETMON_QC_BIAS_REGION_RON_C "Bias Read Out Noise (on user defined region) [e- rms]"
111 #define DETMON_QC_DARK "ESO QC DARK"
112 #define DETMON_QC_DARK_C "Dark level [ADU]"
114 #define DETMON_QC_DARK_STDEV "ESO QC DARK STDEV"
115 #define DETMON_QC_DARK_STDEV_C "Dark stdev level [ADU]"
120 #define detmon_ronbias_get_description(RECIPE_NAME, PIPE_NAME, \
121 DETMON_RONBIAS_RAW) \
122 RECIPE_NAME " -- " PIPE_NAME " ronbias recipe for OPT/IR.\n" \
123 "The files listed in the Set Of Frames must be tagged:\n" \
124 "raw-file.fits "DETMON_RONBIAS_RAW"\n"
126 #define detmon_pernoise_get_description(RECIPE_NAME, PIPE_NAME, \
127 DETMON_PERNOISE_RAW) \
128 RECIPE_NAME " -- " PIPE_NAME " Recipe for Periodic Noise Characterisation.\n" \
129 "The files listed in the Set Of Frames must be tagged:\n" \
130 "raw-file.fits "DETMON_PERNOISE_RAW"\n"
132 #define detmon_dark_get_description(RECIPE_NAME, PIPE_NAME, \
134 RECIPE_NAME " -- " PIPE_NAME " Dark Recipe.\n" \
135 "The files listed in the Set Of Frames must be tagged:\n" \
136 "raw-file.fits "DETMON_DARK_RAW"\n"
138 #define RANDOM ((irplib_ronbias_method) 1 << 1)
139 #define HISTO ((irplib_ronbias_method) 1 << 2)
140 #define PREOVERSCAN ((irplib_ronbias_method) 1 << 3)
141 #define REGION ((irplib_ronbias_method) 1 << 4)
143 typedef unsigned long irplib_ronbias_method;
146 #define REGEXP "ARCFILE|MJD-OBS|ESO TPL ID|DATE-OBS|ESO DET DIT|ESO DET NDIT"
150 irplib_imagelist_collapse_stdev_create(
const cpl_imagelist * imlist);
153 detmon_ronbias(cpl_frameset *,
154 const cpl_parameterlist *,
159 const cpl_propertylist *,
160 const cpl_propertylist *,
161 const cpl_propertylist *,
162 const cpl_propertylist *,
163 const cpl_propertylist *,
164 const cpl_propertylist *,
165 const cpl_propertylist *,
167 int (*)(
const cpl_frame *,
172 detmon_fill_prolist(
const char *,
178 detmon_ronbias_fill_parlist_default(cpl_parameterlist *,
183 detmon_darkron_fill_parlist_default(cpl_parameterlist *,
188 detmon_ronbias_fill_parlist(cpl_parameterlist *,
216 detmon_ronbias_histo_reduce(
const cpl_image * c_raw,
221 detmon_build_synthetic(cpl_image *,
225 irplib_flux_get_bias_window(
const cpl_image *,
233 detmon_fill_pernoise_params(cpl_parameterlist *,
237 const char *direction,
246 int detmon_fill_pernoise_params_default(cpl_parameterlist *,
251 detmon_pernoise(cpl_frameset *,
252 const cpl_parameterlist *,
258 int (*)(
const cpl_frame *,
262 detmon_pernoise_reduce(cpl_image *);
265 detmon_dark(cpl_frameset *,
266 const cpl_parameterlist *,
274 int (*)(
const cpl_frame *,
278 detmon_fill_dark_params(cpl_parameterlist * parlist,
279 const char *recipe_name,
280 const char *pipeline_name,
281 const char * ron_method,
282 const char * dsnu_method,
287 detmon_fill_dark_params_default(cpl_parameterlist * parlist,
288 const char *recipe_name,
289 const char *pipeline_name);
292 detmon_compare_dits(
const cpl_frame *,
const cpl_frame *);
294 double irplib_pfits_get_exptime(
const cpl_propertylist *);
297 detmon_fill_parlist(cpl_parameterlist *,
298 const char *,
const char *,
int, ...);
301 detmon_retrieve_par_int(
const char *,
303 const char *,
const cpl_parameterlist *);
306 detmon_retrieve_par_double(
const char *,
308 const char *,
const cpl_parameterlist *);
310 int detmon_lg_mr(cpl_frameset * frameset,
311 const cpl_parameterlist * parlist_,