detmon_ronbias.c

00001 /* $Id: detmon_ronbias.c,v 1.10 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.10 $
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_plugin.h"
00039 
00040 /* Define here the DO.CATG keywords */
00041 #define DETMON_RONBIAS_RAW                    "BIAS"
00042 
00043 #define RECIPE_NAME "detmon_ronbias"
00044 
00045 /*----------------------------------------------------------------------------
00046                 Functions prototypes
00047  ----------------------------------------------------------------------------*/
00048 
00049 IRPLIB_RECIPE_DEFINE(detmon_ronbias, DETMON_BINARY_VERSION,
00050                      irplib_detmon_ronbias_fill_parlist_default(recipe->parameters,
00051                                                        "detmon_ronbias",
00052                                                        "detmon"),
00053                      "Lander de Bilbao", "lbilbao@eso.org", "2007", 
00054                      "RON/Bias recipe",
00055                      irplib_detmon_ronbias_get_description("detmon_ronbias",
00056                                                            "DETMON",
00057                                                            DETMON_RONBIAS_RAW));
00058 
00059 /*---------------------------------------------------------------------------*/
00060 /*
00061   @brief    Interpret the command line options and execute the data processing
00062   @param    frameset    the frames list
00063   @param    parlist     the parameters list
00064   @return   0 if everything is ok
00065  */
00066 /*---------------------------------------------------------------------------*/
00067 
00068 static int detmon_ronbias(cpl_frameset            * frameset,
00069                           const cpl_parameterlist * parlist)
00070 {
00071     cpl_propertylist * master = 
00072     irplib_detmon_fill_prolist("MASTER_BIAS", "REDUCED", "TECH", CPL_FALSE);
00073 
00074     cpl_propertylist * synth = 
00075     irplib_detmon_fill_prolist("SYNTH", "REDUCED", "TECH", CPL_FALSE);
00076 
00077     cpl_propertylist * bpmhot = 
00078     irplib_detmon_fill_prolist("BP_MAP_HP", "REDUCED", "TECH", CPL_FALSE);
00079 
00080     cpl_propertylist * bpmcold = 
00081     irplib_detmon_fill_prolist("BP_MAP_CP","REDUCED", "TECH", CPL_FALSE);
00082 
00083     cpl_propertylist * bpmdev = 
00084     irplib_detmon_fill_prolist("BP_MAP_DP","REDUCED", "TECH", CPL_FALSE);
00085 
00086     const cpl_error_code error = irplib_detmon_ronbias(frameset,
00087                                                        parlist,
00088                                                        DETMON_RONBIAS_RAW,
00089                                                        RECIPE_NAME,
00090                                                        PACKAGE_TARNAME,
00091                                REGEXP,
00092                                                        master, NULL, NULL,
00093                                synth, bpmhot,
00094                                bpmcold, bpmdev,
00095                                                        PACKAGE "/" PACKAGE_VERSION,
00096                                                        NULL, OPT);
00097 
00098     cpl_propertylist_delete(master);
00099     cpl_propertylist_delete(synth);
00100     cpl_propertylist_delete(bpmhot);
00101     cpl_propertylist_delete(bpmcold);
00102     cpl_propertylist_delete(bpmdev);
00103 
00104     /* Propagate the error, if any */
00105     cpl_ensure_code(!error, error);
00106 
00107     return CPL_ERROR_NONE;
00108 }

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