detmon_opt_lg.c

00001 /* $Id: detmon_opt_lg.c,v 1.25 2013/01/29 08:56:40 jtaylor 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., 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: jtaylor $
00023  * $Date: 2013/01/29 08:56:40 $
00024  * $Revision: 1.25 $
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 "detmon.h"
00038 #include "detmon_lg.h"
00039 #include "irplib_plugin.h"
00040 
00041 #define RECIPE_NAME "detmon_opt_lg"
00042 
00043 #define OPT FALSE
00044 
00045 /*----------------------------------------------------------------------------
00046                 Functions prototypes
00047  ----------------------------------------------------------------------------*/
00048 
00049 CPL_RECIPE_DEFINE(detmon_opt_lg, DETMON_BINARY_VERSION,
00050                      detmon_lg_fill_parlist_opt_default(recipe->parameters,
00051                                                "detmon_opt_lg", "detmon"),
00052                      "Lander de Bilbao", "lbilbao@eso.org", "2007", 
00053                      "Linearity/Gain recipe for the optical domain",
00054                      detmon_lg_get_description("detmon_opt_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_opt_lg(cpl_frameset            * frameset,
00070                          const cpl_parameterlist * parlist)
00071 {
00072 
00073   const char * tag_on=NULL;
00074   const char * tag_off=NULL;
00075     cpl_propertylist * lintbl = 
00076     detmon_fill_prolist("DET_LIN_INFO", "REDUCED", "TECH", CPL_FALSE);
00077 
00078     cpl_propertylist * gaintbl = 
00079     detmon_fill_prolist("GAIN_INFO",    "REDUCED", "TECH", CPL_FALSE);
00080 
00081     cpl_propertylist * coeffscube = 
00082     detmon_fill_prolist("COEFFS_CUBE",  "REDUCED", "TECH", CPL_FALSE);
00083 
00084     cpl_propertylist * bpm = 
00085     detmon_fill_prolist("BP_MAP_NL",    "REDUCED", "TECH", CPL_FALSE);
00086 
00087     cpl_propertylist * corr = 
00088     detmon_fill_prolist("AUTOCORR",     "REDUCED", "TECH", CPL_FALSE);
00089 
00090     cpl_propertylist * diff_flat = 
00091     detmon_fill_prolist("DIFF_FLAT",    "REDUCED", "TECH", CPL_FALSE);
00092 
00093     cpl_error_code error = CPL_ERROR_NONE;
00094     skip_if (detmon_lg_set_tag(frameset, &tag_on, &tag_off));
00095 
00096     error = detmon_lg(frameset,
00097               parlist,
00098               tag_on,
00099               tag_off,
00100               RECIPE_NAME,
00101               PACKAGE_TARNAME,
00102               REGEXP,
00103               lintbl, gaintbl, coeffscube,
00104               bpm, corr, diff_flat,
00105               PACKAGE "/" PACKAGE_VERSION,
00106               NULL, NULL, OPT);
00107 
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 3 Mar 2013 for DETMON Pipeline Reference Manual by  doxygen 1.6.1