detmon_ir_lg.c

00001 /* $Id: detmon_ir_lg.c,v 1.32 2012/03/03 09:20:42 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: 2012/03/03 09:20:42 $
00024  * $Revision: 1.32 $
00025  * $Name: detmon-1_2_0 $
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 "detmon.h"
00038 #include "detmon_lg.h"
00039 #include "irplib_plugin.h"
00040 
00041 #define RECIPE_NAME "detmon_ir_lg"
00042 
00043 #define NIR TRUE
00044 
00045 /*----------------------------------------------------------------------------
00046                 Functions prototypes
00047  ----------------------------------------------------------------------------*/
00048 
00049 CPL_RECIPE_DEFINE(detmon_ir_lg, DETMON_BINARY_VERSION,
00050                      detmon_lg_fill_parlist_nir_default(recipe->parameters,
00051                                                "detmon_ir_lg", "detmon"),
00052                      "Lander de Bilbao", "lbilbao@eso.org", "2007", 
00053                      "Linearity/Gain recipe for the IR domain",
00054                      detmon_lg_get_description("detmon_ir_lg", "DETMON",
00055                            DETMON_LG_ON_RAW_NEW,
00056                            DETMON_LG_OFF_RAW_NEW,
00057                            DETMON_LG_ON_RAW_OLD,
00058                            DETMON_LG_OFF_RAW_OLD));
00060 /*---------------------------------------------------------------------------*/
00061 /*
00062   @brief    Interpret the command line options and execute the data processing
00063   @param    frameset    the frames list
00064   @param    parlist     the parameters list
00065   @return   0 if everything is ok
00066  */
00067 /*---------------------------------------------------------------------------*/
00068 
00069 static int detmon_ir_lg(cpl_frameset            * frameset,
00070                         const cpl_parameterlist * parlist)
00071 {
00072  
00073 
00074   const char * tag_on=NULL;
00075   const char * tag_off=NULL;
00076    cpl_propertylist * lintbl = 
00077     detmon_fill_prolist("DET_LIN_INFO", "REDUCED", "TECH", CPL_FALSE);
00078 
00079     cpl_propertylist * gaintbl = 
00080     detmon_fill_prolist("GAIN_INFO",    "REDUCED", "TECH", CPL_FALSE);
00081 
00082     cpl_propertylist * coeffscube = 
00083     detmon_fill_prolist("COEFFS_CUBE",  "REDUCED", "TECH", CPL_FALSE);
00084 
00085     cpl_propertylist * bpm = 
00086     detmon_fill_prolist("BP_MAP_NL",    "REDUCED", "TECH", CPL_FALSE);
00087 
00088     cpl_propertylist * corr = 
00089     detmon_fill_prolist("AUTOCORR",     "REDUCED", "TECH", CPL_FALSE);
00090 
00091     cpl_propertylist * diff_flat = 
00092     detmon_fill_prolist("DIFF_FLAT",    "REDUCED", "TECH", CPL_FALSE);
00093 
00094     cpl_error_code error=CPL_ERROR_NONE;
00095     skip_if (detmon_lg_set_tag(frameset, &tag_on, &tag_off));
00096  
00097     error = detmon_lg(frameset,
00098               parlist,
00099               tag_on,
00100               tag_off,
00101               RECIPE_NAME,
00102               PACKAGE_TARNAME,
00103               REGEXP,
00104               lintbl, gaintbl, coeffscube,
00105               bpm, corr, diff_flat,
00106               PACKAGE "/" PACKAGE_VERSION,
00107               NULL, NULL, NIR);
00108     end_skip;
00109     cpl_propertylist_delete(lintbl);
00110     cpl_propertylist_delete(gaintbl);
00111     cpl_propertylist_delete(coeffscube);
00112     cpl_propertylist_delete(bpm);
00113     cpl_propertylist_delete(corr);
00114     cpl_propertylist_delete(diff_flat);
00115 
00116     /* Propagate the error, if any */
00117     cpl_ensure_code(!error, error);
00118 
00119     return CPL_ERROR_NONE;
00120 }

Generated on 7 Mar 2012 for DETMON Pipeline Reference Manual by  doxygen 1.6.1