detmon.h

00001 /* $Id: detmon.h,v 1.3 2013/01/25 16:08:41 jtaylor Exp $
00002  *
00003  * This file is part of the irplib package
00004  * Copyright (C) 2002, 2003 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
00019  */
00020 
00021 /*
00022  * $Author: jtaylor $
00023  * $Date: 2013/01/25 16:08:41 $
00024  * $Revision: 1.3 $
00025  * $Name: HEAD $
00026  */
00027 
00028 #ifndef IRPLIB_DETMON_H
00029 #define IRPLIB_DETMON_H
00030 
00031 /*----------------------------------------------------------------------------
00032                                    Includes
00033  ----------------------------------------------------------------------------*/
00034 
00035 #include <cpl.h>
00036 #include <detmon_cpl_size.h>
00037 
00038 /*----------------------------------------------------------------------------
00039                                    Prototypes
00040  ----------------------------------------------------------------------------*/
00041 
00042 
00043 #define NIR TRUE
00044 #define OPT FALSE
00045 
00046 #define DETMON_QC_FREQ       "ESO QC FREQ"
00047 #define DETMON_QC_FREQ_C     "Spectrum frequency"
00048 
00049 #define DETMON_QC_POW       "ESO QC POW"
00050 #define DETMON_QC_POW_C     "Spectrum power"
00051 
00052 #define DETMON_QC_DUTYCYCL       "ESO QC DUTYCYCL"
00053 #define DETMON_QC_DUTYCYCL_C     "DUTYCYCL value (time to store a frame)"
00054 
00055 #define DETMON_QC_MASTER_MEAN    "ESO QC MASTER MEAN"
00056 #define DETMON_QC_MASTER_MEAN_C  "Master Mean value"
00057 
00058 #define DETMON_QC_MASTER_RMS    "ESO QC MASTER RMS"
00059 #define DETMON_QC_MASTER_RMS_C  "Master RMS value"
00060 
00061 #define DETMON_QC_NBCOLDPIX    "ESO QC NBCOLPIX"
00062 #define DETMON_QC_NBCOLDPIX_C  "Number of cold pixels"
00063 
00064 #define DETMON_QC_NBHOTPIX    "ESO QC NBHOTPIX"
00065 #define DETMON_QC_NBHOTPIX_C  "Number of hot pixels"
00066 
00067 #define DETMON_QC_NBDEVPIX    "ESO QC NBDEVPIX"
00068 #define DETMON_QC_NBDEVPIX_C  "Number of deviating pixels"
00069 
00070 #define DETMON_QC_BIAS_RANDOM_VAL    "ESO QC BIAS RANDOM VAL"
00071 #define DETMON_QC_BIAS_RANDOM_VAL_C  "Bias level (random sampling method) [ADU]"
00072 
00073 #define DETMON_QC_BIAS_RANDOM_RON    "ESO QC BIAS RANDOM RON"
00074 #define DETMON_QC_BIAS_RANDOM_RON_C  "Bias Read Out Noise (random sampling method) [ADU]"
00075 
00076 #define DETMON_QC_BIAS_HISTO_VAL    "ESO QC BIAS HISTO VAL"
00077 #define DETMON_QC_BIAS_HISTO_VAL_C  "Bias level (histogram method) [ADU]"
00078 
00079 #define DETMON_QC_BIAS_HISTO_RON    "ESO QC BIAS HISTO RON"
00080 #define DETMON_QC_BIAS_HISTO_RON_C  "Bias Read Out Noise (histogram method) [e- rms]"
00081 
00082 #define DETMON_QC_BIAS_PRESCAN_MEAN    "ESO QC BIAS PRESCAN MEAN"
00083 #define DETMON_QC_BIAS_PRESCAN_MEAN_C  "Bias mean level (on prescan region) [ADU]"
00084 
00085 #define DETMON_QC_BIAS_PRESCAN_MED    "ESO QC BIAS PRESCAN MED"
00086 #define DETMON_QC_BIAS_PRESCAN_MED_C  "Bias median level (on prescan region) [ADU]"
00087 
00088 #define DETMON_QC_BIAS_PRESCAN_RON    "ESO QC BIAS PRESCAN RON"
00089 #define DETMON_QC_BIAS_PRESCAN_RON_C  "Bias Read Out Noise (on prescan region) [e- rms]"
00090 
00091 
00092 #define DETMON_QC_BIAS_OVERSCAN_MEAN    "ESO QC BIAS OVERSCAN MEAN"
00093 #define DETMON_QC_BIAS_OVERSCAN_MEAN_C  "Bias mean level (on overscan region) [ADU]"
00094 
00095 #define DETMON_QC_BIAS_OVERSCAN_MED    "ESO QC BIAS OVERSCAN MED"
00096 #define DETMON_QC_BIAS_OVERSCAN_MED_C  "Bias median level (on overscan region) [ADU]"
00097 
00098 #define DETMON_QC_BIAS_OVERSCAN_RON    "ESO QC BIAS OVERSCAN RON"
00099 #define DETMON_QC_BIAS_OVERSCAN_RON_C  "Bias Read Out Noise (on overscan region) [e- rms]"
00100 
00101 #define DETMON_QC_BIAS_REGION_VAL    "ESO QC BIAS REGION VAL"
00102 #define DETMON_QC_BIAS_REGION_VAL_C  "Bias level (on user defined region) [ADU]"
00103 
00104 #define DETMON_QC_BIAS_REGION_MED    "ESO QC BIAS REGION MED"
00105 #define DETMON_QC_BIAS_REGION_MED_C  "Bias median level (on user defined region) [ADU]"
00106 
00107 #define DETMON_QC_BIAS_REGION_RON    "ESO QC BIAS REGION RON"
00108 #define DETMON_QC_BIAS_REGION_RON_C  "Bias Read Out Noise (on user defined region) [e- rms]"
00109 
00110 
00111 #define DETMON_QC_DARK    "ESO QC DARK"
00112 #define DETMON_QC_DARK_C  "Dark level [ADU]"
00113 
00114 #define DETMON_QC_DARK_STDEV    "ESO QC DARK STDEV"
00115 #define DETMON_QC_DARK_STDEV_C  "Dark stdev level [ADU]"
00116 
00117 
00118 
00119 /* Macros to generate the recipe(s) description(s) */
00120 #define detmon_ronbias_get_description(RECIPE_NAME, PIPE_NAME,          \
00121                                               DETMON_RONBIAS_RAW)              \
00122     RECIPE_NAME " -- " PIPE_NAME " ronbias recipe for OPT/IR.\n"            \
00123     "The files listed in the Set Of Frames must be tagged:\n"                  \
00124     "raw-file.fits  "DETMON_RONBIAS_RAW"\n"
00125 
00126 #define detmon_pernoise_get_description(RECIPE_NAME, PIPE_NAME,         \
00127                                               DETMON_PERNOISE_RAW)             \
00128     RECIPE_NAME " -- " PIPE_NAME " Recipe for Periodic Noise Characterisation.\n"            \
00129     "The files listed in the Set Of Frames must be tagged:\n"                  \
00130     "raw-file.fits  "DETMON_PERNOISE_RAW"\n"
00131 
00132 #define detmon_dark_get_description(RECIPE_NAME, PIPE_NAME,         \
00133                                               DETMON_DARK_RAW)             \
00134     RECIPE_NAME " -- " PIPE_NAME " Dark Recipe.\n"            \
00135     "The files listed in the Set Of Frames must be tagged:\n"                  \
00136     "raw-file.fits  "DETMON_DARK_RAW"\n"
00137 
00138 #define RANDOM       ((irplib_ronbias_method) 1 << 1)
00139 #define HISTO        ((irplib_ronbias_method) 1 << 2)
00140 #define PREOVERSCAN  ((irplib_ronbias_method) 1 << 3)
00141 #define REGION       ((irplib_ronbias_method) 1 << 4)
00142 
00143 typedef unsigned long irplib_ronbias_method;
00144 
00145 #undef REGEXP
00146 #define REGEXP "ARCFILE|MJD-OBS|ESO TPL ID|DATE-OBS|ESO DET DIT|ESO DET NDIT"
00147 
00148 
00149 cpl_image * 
00150 irplib_imagelist_collapse_stdev_create(const cpl_imagelist * imlist);
00151 
00152 cpl_error_code
00153 detmon_ronbias(cpl_frameset      *,
00154                       const cpl_parameterlist *,
00155                       const char        *,
00156                       const char        *,
00157                       const char        *,
00158                       const char        *,
00159               const cpl_propertylist *,
00160               const cpl_propertylist *,
00161               const cpl_propertylist *,
00162               const cpl_propertylist *,
00163               const cpl_propertylist *,
00164               const cpl_propertylist *,
00165               const cpl_propertylist *,
00166                       const char        *,
00167                       int              (*)(const cpl_frame *,
00168                                            const cpl_frame *),
00169                       cpl_boolean);
00170 
00171 cpl_propertylist *
00172 detmon_fill_prolist(const char *,
00173                const char *,
00174                const char *,
00175                cpl_boolean);
00176 
00177 cpl_error_code
00178 detmon_ronbias_fill_parlist_default(cpl_parameterlist *,
00179                        const char        *,
00180                        const char        *);
00181 
00182 cpl_error_code
00183 detmon_darkron_fill_parlist_default(cpl_parameterlist *,
00184                        const char        *,
00185                        const char        *);
00186 
00187 cpl_error_code
00188 detmon_ronbias_fill_parlist(cpl_parameterlist *,
00189                    const char *,
00190                    const char *,
00191                    const char *,
00192                    const char *,
00193                    const int,
00194                    const int,
00195                    const int,
00196                    const int,
00197                    const int,
00198                    const int,
00199                    const int,
00200                    const int,
00201                    const int,
00202                    const char *,
00203                    const int,
00204                    const int,
00205                    const int,
00206                    const int,
00207                    const int,
00208                    const int,
00209                    const int,
00210                    const int,
00211                    const int,
00212                    const int,
00213                                    cpl_boolean);
00214 
00215 cpl_error_code
00216 detmon_ronbias_histo_reduce(const cpl_image * c_raw,
00217                    double * bias,
00218                    double * fwhm,
00219                    double * max);
00220 cpl_image *
00221 detmon_build_synthetic(cpl_image *,
00222                               cpl_image *);
00223 
00224 cpl_error_code
00225 irplib_flux_get_bias_window(const cpl_image *,
00226                             const int       *,
00227                             int              ,
00228                             int              ,
00229                             double          *,
00230                             double          *);
00231 
00232 cpl_error_code
00233 detmon_fill_pernoise_params(cpl_parameterlist *,
00234                                    const char *,
00235                                    const char *,
00236                                    int mode,
00237                                    const char *direction,
00238                                    double speed,
00239                                    int llx,
00240                                    int lly,
00241                                    int urx,
00242                                    int ury,
00243                                    double kappa,
00244                                    int exts);
00245 
00246 int detmon_fill_pernoise_params_default(cpl_parameterlist        *,
00247                               const char        *,
00248                               const char        *);
00249 
00250 cpl_error_code
00251 detmon_pernoise(cpl_frameset      *,
00252                       const cpl_parameterlist *,
00253                       const char        *,
00254                       const char        *,
00255                       const char        *,
00256                       const char        *,
00257                       const char        *,
00258                       int              (*)(const cpl_frame *,
00259                                            const cpl_frame *));
00260 
00261 cpl_table *
00262 detmon_pernoise_reduce(cpl_image       *);
00263 
00264 cpl_error_code
00265 detmon_dark(cpl_frameset      *,
00266                    const cpl_parameterlist *,
00267                    const char        *,
00268                    const char        *,
00269                    const char        *,
00270                    const char        *,
00271                    const char        *,
00272                    const char        *,
00273                    const char        *,
00274                    int              (*)(const cpl_frame *,
00275                                         const cpl_frame *));
00276 
00277 cpl_error_code
00278 detmon_fill_dark_params(cpl_parameterlist * parlist,
00279                                const char *recipe_name,
00280                                const char *pipeline_name,
00281                                const char * ron_method,
00282                                const char * dsnu_method,
00283                                const char * optnir,
00284                                int exts);
00285 
00286 int
00287 detmon_fill_dark_params_default(cpl_parameterlist * parlist,
00288                                        const char *recipe_name,
00289                                        const char *pipeline_name);
00290 
00291 int
00292 detmon_compare_dits(const cpl_frame *, const cpl_frame *);
00293 
00294 double                  irplib_pfits_get_exptime(const cpl_propertylist *);
00295 
00296 cpl_error_code
00297 detmon_fill_parlist(cpl_parameterlist *,
00298                            const char *, const char *, int, ...);
00299 
00300 int
00301 detmon_retrieve_par_int(const char *,
00302                             const char *,
00303                             const char *, const cpl_parameterlist *);
00304 
00305 double
00306 detmon_retrieve_par_double(const char *,
00307                             const char *,
00308                             const char *, const cpl_parameterlist *);
00309 
00310 
00311 #endif

Generated on 3 Mar 2013 for DETMON Pipeline Reference Manual by  doxygen 1.6.1