detmon_ir_lg.c

00001 /* $Id: detmon_ir_lg.c,v 1.27 2011/03/01 16:54:21 amodigli Exp $
00002  *
00003  * This file is part of the DETMON Pipeline
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: amodigli $
00023  * $Date: 2011/03/01 16:54:21 $
00024  * $Revision: 1.27 $
00025  * $Name: HEAD $
00026  */
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030 
00031 /*----------------------------------------------------------------------------
00032                              Includes
00033  ----------------------------------------------------------------------------*/
00034 
00035 #include <cpl.h>
00036 
00037 #include "irplib_detmon.h"
00038 #include "irplib_detmon_lg.h"
00039 #include "irplib_plugin.h"
00040 
00041 /* Define here the DO.CATG keywords */
00042 #define DETMON_IR_LG_ON_RAW                    "ON_RAW"
00043 #define DETMON_IR_LG_OFF_RAW            "OFF_RAW"
00044 
00045 #define RECIPE_NAME "detmon_ir_lg"
00046 
00047 #define NIR TRUE
00048 
00049 /*----------------------------------------------------------------------------
00050                 Functions prototypes
00051  ----------------------------------------------------------------------------*/
00052 
00053 IRPLIB_RECIPE_DEFINE(detmon_ir_lg, DETMON_BINARY_VERSION,
00054                      irplib_detmon_lg_fill_parlist_nir_default(recipe->parameters,
00055                                                "detmon_ir_lg", "detmon"),
00056                      "Lander de Bilbao", "lbilbao@eso.org", "2007", 
00057                      "Linearity/Gain recipe for the IR domain",
00058                      irplib_detmon_lg_get_description("detmon_ir_lg", "DETMON",
00059                                                       DETMON_IR_LG_ON_RAW,
00060                                                       DETMON_IR_LG_OFF_RAW));
00061 
00062 /*---------------------------------------------------------------------------*/
00063 /*
00064   @brief    Interpret the command line options and execute the data processing
00065   @param    frameset    the frames list
00066   @param    parlist     the parameters list
00067   @return   0 if everything is ok
00068  */
00069 /*---------------------------------------------------------------------------*/
00070 
00071 static int detmon_ir_lg(cpl_frameset            * frameset,
00072                         const cpl_parameterlist * parlist)
00073 {
00074     cpl_propertylist * lintbl = 
00075     irplib_detmon_fill_prolist("DET_LIN_INFO", "REDUCED", "TECH", CPL_FALSE);
00076 
00077     cpl_propertylist * gaintbl = 
00078     irplib_detmon_fill_prolist("GAIN_INFO",    "REDUCED", "TECH", CPL_FALSE);
00079 
00080     cpl_propertylist * coeffscube = 
00081     irplib_detmon_fill_prolist("COEFFS_CUBE",  "REDUCED", "TECH", CPL_FALSE);
00082 
00083     cpl_propertylist * bpm = 
00084     irplib_detmon_fill_prolist("BP_MAP_NL",    "REDUCED", "TECH", CPL_FALSE);
00085 
00086     cpl_propertylist * corr = 
00087     irplib_detmon_fill_prolist("AUTOCORR",     "REDUCED", "TECH", CPL_FALSE);
00088 
00089     cpl_propertylist * diff_flat = 
00090     irplib_detmon_fill_prolist("DIFF_FLAT",    "REDUCED", "TECH", CPL_FALSE);
00091 
00092     const cpl_error_code error = irplib_detmon_lg(frameset,
00093                                                   parlist,
00094                                                   DETMON_IR_LG_ON_RAW,
00095                                                   DETMON_IR_LG_OFF_RAW,
00096                                                   RECIPE_NAME,
00097                                                   PACKAGE_TARNAME,
00098                           REGEXP,
00099                                                   lintbl, gaintbl, coeffscube,
00100                           bpm, corr, diff_flat,
00101                                                   PACKAGE "/" PACKAGE_VERSION,
00102                                                   NULL, NULL, NIR);
00103 
00104     cpl_propertylist_delete(lintbl);
00105     cpl_propertylist_delete(gaintbl);
00106     cpl_propertylist_delete(coeffscube);
00107     cpl_propertylist_delete(bpm);
00108     cpl_propertylist_delete(corr);
00109     cpl_propertylist_delete(diff_flat);
00110 
00111     /* Propagate the error, if any */
00112     cpl_ensure_code(!error, error);
00113 
00114     return CPL_ERROR_NONE;
00115 }

Generated on 1 Mar 2011 for DETMON Pipeline Reference Manual by  doxygen 1.6.1