isaac_img_darkron.c

00001 /* $Id: isaac_img_darkron.c,v 1.4 2011/07/11 13:39:50 llundin 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: llundin $
00023  * $Date: 2011/07/11 13:39:50 $
00024  * $Revision: 1.4 $
00025  * $Name: isaac-6_1_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 "irplib_detmon.h"
00038 #include "irplib_plugin.h"
00039 
00040 #include "isaac_dfs.h"
00041 
00042 #define RECIPE_NAME "isaac_img_darkron"
00043 
00044 /*----------------------------------------------------------------------------
00045                 Functions prototypes
00046  ----------------------------------------------------------------------------*/
00047 
00048 cpl_recipe_define(isaac_img_darkron, ISAAC_BINARY_VERSION,
00049                   "Lars Lundin", PACKAGE_BUGREPORT, "2008",
00050                   "Dark/RON recipe",
00051                   irplib_detmon_ronbias_get_description(RECIPE_NAME,
00052                                                         PACKAGE_TARNAME,
00053                                                         ISAAC_IMG_DARK_RAW));
00054 
00055 /*----------------------------------------------------------------------------*/
00063 /*----------------------------------------------------------------------------*/
00064 static
00065 cpl_error_code isaac_img_darkron_fill_parameterlist(cpl_parameterlist * self) {
00066 
00067     return irplib_detmon_darkron_fill_parlist_default(self, RECIPE_NAME,
00068                                                       PACKAGE_TARNAME)
00069         ? cpl_error_set_where(cpl_func) : CPL_ERROR_NONE;
00070 }
00071 
00072 /*---------------------------------------------------------------------------*/
00073 /*
00074   @brief    Interpret the command line options and execute the data processing
00075   @param    frameset    the frames list
00076   @param    parlist     the parameters list
00077   @return   0 if everything is ok
00078  */
00079 /*---------------------------------------------------------------------------*/
00080 
00081 static int isaac_img_darkron(cpl_frameset            * frameset,
00082                  const cpl_parameterlist * parlist)
00083 {
00084     cpl_propertylist * master = 
00085     irplib_detmon_fill_prolist("MASTER_BIAS", "TYPE", "TECH", CPL_TRUE);
00086 
00087     cpl_propertylist * synth = 
00088     irplib_detmon_fill_prolist("SYNTH",       "TYPE", "TECH", CPL_TRUE);
00089 
00090     cpl_propertylist * bpmhot = 
00091     irplib_detmon_fill_prolist("BP_MAP_HP",   "TYPE", "TECH", CPL_TRUE);
00092 
00093     cpl_propertylist * bpmcold = 
00094     irplib_detmon_fill_prolist("BP_MAP_CP",   "TYPE", "TECH", CPL_TRUE);
00095 
00096     cpl_propertylist * bpmdev = 
00097     irplib_detmon_fill_prolist("BP_MAP_DP",   "TYPE", "TECH", CPL_TRUE);
00098 
00099     const cpl_error_code error = 
00100     irplib_detmon_ronbias(frameset, parlist, ISAAC_IMG_DARK_RAW,
00101                   RECIPE_NAME, PACKAGE_TARNAME, REGEXP,
00102                   master, NULL, NULL, synth, 
00103                   bpmhot, bpmcold, bpmdev,
00104                   PACKAGE "/" PACKAGE_VERSION, NULL, NIR);
00105 
00106     cpl_propertylist_delete(master);
00107     cpl_propertylist_delete(synth);
00108     cpl_propertylist_delete(bpmhot);
00109     cpl_propertylist_delete(bpmcold);
00110     cpl_propertylist_delete(bpmdev);
00111 
00112     /* Propagate the error, if any */
00113     cpl_ensure_code(!error, error);
00114 
00115     return CPL_ERROR_NONE;
00116 }

Generated on Mon Feb 6 14:44:02 2012 for ISAAC Pipeline Reference Manual by  doxygen 1.5.8