00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030
00031
00032
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
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
00063
00064
00065
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
00117 cpl_ensure_code(!error, error);
00118
00119 return CPL_ERROR_NONE;
00120 }