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
00028 #ifdef HAVE_CONFIG_H
00029 #include <config.h>
00030 #endif
00031
00032
00033
00034
00035
00036 #include <cpl.h>
00037
00038 #include "irplib_detmon.h"
00039 #include "irplib_detmon_lg.h"
00040 #include "irplib_plugin.h"
00041
00042
00043 #define ISAAC_LINGAIN_ON_RAW "ON_RAW"
00044 #define ISAAC_LINGAIN_OFF_RAW "OFF_RAW"
00045
00046 #define RECIPE_NAME "isaac_lingain"
00047
00048
00049 #define INSTREGEXP "ESO DET CHIP NAME|ESO DET MODE NAME"
00050
00051 #define PAFREGEXP "^(" REGEXP "|" INSTREGEXP ")$"
00052
00053 #define NIR TRUE
00054
00055
00056
00057
00058
00059 IRPLIB_RECIPE_DEFINE(isaac_lingain, DETMON_BINARY_VERSION,
00060
00061
00062 irplib_detmon_lg_fill_parlist_nir_default(recipe->parameters,
00063 RECIPE_NAME, "isaac"),
00064
00065
00066 "Lander de Bilbao", PACKAGE_BUGREPORT, "2007",
00067 "Linearity/Gain recipe for the IR domain",
00068 irplib_detmon_lg_get_description(RECIPE_NAME, "ISAAC",
00069 ISAAC_LINGAIN_ON_RAW,
00070 ISAAC_LINGAIN_OFF_RAW));
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 static int isaac_lingain(cpl_frameset * frameset,
00082 const cpl_parameterlist * parlist)
00083 {
00084 cpl_propertylist * lintbl =
00085 irplib_detmon_fill_prolist("DET_LIN_INFO", "REDUCED", "TECH", CPL_FALSE);
00086
00087 cpl_propertylist * gaintbl =
00088 irplib_detmon_fill_prolist("GAIN_INFO", "REDUCED", "TECH", CPL_FALSE);
00089
00090 cpl_propertylist * coeffscube =
00091 irplib_detmon_fill_prolist("COEFFS_CUBE", "REDUCED", "TECH", CPL_FALSE);
00092
00093 cpl_propertylist * bpm =
00094 irplib_detmon_fill_prolist("BP_MAP_NL", "REDUCED", "TECH", CPL_FALSE);
00095
00096 cpl_propertylist * corr =
00097 irplib_detmon_fill_prolist("AUTOCORR", "REDUCED", "TECH", CPL_FALSE);
00098
00099 cpl_propertylist * diff_flat =
00100 irplib_detmon_fill_prolist("DIFF_FLAT", "REDUCED", "TECH", CPL_FALSE);
00101
00102 const cpl_error_code error = irplib_detmon_lg(frameset,
00103 parlist,
00104 ISAAC_LINGAIN_ON_RAW,
00105 ISAAC_LINGAIN_OFF_RAW,
00106 RECIPE_NAME,
00107 "isaac",
00108 PAFREGEXP,
00109 lintbl, gaintbl, coeffscube,
00110 bpm, corr, diff_flat,
00111 PACKAGE "/" PACKAGE_VERSION,
00112 NULL, NULL, NIR);
00113
00114 cpl_propertylist_delete(lintbl);
00115 cpl_propertylist_delete(gaintbl);
00116 cpl_propertylist_delete(coeffscube);
00117 cpl_propertylist_delete(bpm);
00118 cpl_propertylist_delete(corr);
00119 cpl_propertylist_delete(diff_flat);
00120
00121
00122 cpl_ensure_code(!error, error);
00123
00124 return CPL_ERROR_NONE;
00125 }