#include <cpl.h>
#include "xsh_detmon.h"
#include "xsh_detmon_lg.h"
#include "xsh_dfs.h"
#include "xsh_drl.h"
#include "xsh_msg.h"
#include "xsh_error.h"
#include "xsh_utils.h"
#include <xsh_data_instrument.h>
#include "xsh_parameters.h"
#include "xsh_badpixelmap.h"
Go to the source code of this file.
Defines | |
#define | XSH_LINGAIN_ON_RAW(it) |
#define | XSH_LINGAIN_OFF_RAW(it) |
#define | XSH_LINGAIN_DET_LIN_INFO(it) |
#define | XSH_LINGAIN_GAIN_INFO(it) |
#define | XSH_LINGAIN_COEFFS_CUBE(it) |
#define | XSH_LINGAIN_BP_MAP_NL(it) |
#define | XSH_LINGAIN_RAW_BP_MAP_NL(it) |
#define | XSH_LINGAIN_AUTOCORR(it) |
#define | XSH_LINGAIN_DIFF_FLAT(it) |
#define | RECIPE_ID "xsh_lingain" |
#define | RECIPE_AUTHOR "Lander de Bilbao,A.Modigliani" |
#define | RECIPE_CONTACT "amodigli@eso.org" |
#define | INSTREGEXP "ESO INS SETUP ID" |
#define | PAFREGEXP "^(" REGEXP "|" INSTREGEXP ")$" |
#define | NIR TRUE |
#define | OPT FALSE |
#define | XSH_PIX2PIX CPL_TRUE |
#define | XSH_EXTS_RED -1 |
#define | XSH_BPMBIN 1 |
#define | XSH_TOL 0.1 |
Functions | |
static int | xsh_lingain_create (cpl_plugin *plugin) |
Setup the recipe options. | |
static int | xsh_lingain_exec (cpl_plugin *plugin) |
Execute the plugin instance given by the interface. | |
static int | xsh_lingain_destroy (cpl_plugin *plugin) |
Destroy what has been created by the 'create' function. | |
static int | xsh_lingain (cpl_frameset *frameset, cpl_parameterlist *parlist) |
cpl_error_code | xsh_lingain_fill_parlist_default_opt (cpl_parameterlist *parlist) |
cpl_error_code | xsh_lingain_fill_parlist_default_nir (cpl_parameterlist *parlist) |
static cpl_error_code | xsh_lingain_set_saturation_limit (cpl_parameterlist *parlist, xsh_instrument *instrument) |
int | cpl_plugin_get_info (cpl_pluginlist *list) |
Build the list of available plugins, for this module. | |
static cpl_error_code | xsh_params_set_defaults (cpl_parameterlist *pars, xsh_instrument *inst) |
Variables | |
static char | xsh_lingain_description_short [] = "Computes detector's gain/linearity-map" |
static char | xsh_lingain_description [] |
#define INSTREGEXP "ESO INS SETUP ID" |
Definition at line 102 of file xsh_lingain.c.
#define NIR TRUE |
Definition at line 105 of file xsh_lingain.c.
Referenced by xsh_detmon_darkron_fill_parlist_default(), xsh_detmon_gain(), xsh_detmon_gain_table_create(), xsh_detmon_lg_fill_parlist_nir_default(), xsh_detmon_lg_reduce_all(), xsh_detmon_lg_reduce_dit(), xsh_detmon_lin(), xsh_detmon_lin_table_create(), xsh_detmon_ronbias_retrieve_parlist(), and xsh_lingain().
#define OPT FALSE |
Definition at line 106 of file xsh_lingain.c.
Referenced by xsh_detmon_add_adl_column(), xsh_detmon_dark(), xsh_detmon_dark_save(), xsh_detmon_gain(), xsh_detmon_lg_fill_parlist_opt_default(), xsh_detmon_lg_reduce_dit(), xsh_detmon_lg_retrieve_parlist(), xsh_detmon_lg_split_onoff(), xsh_detmon_lin(), xsh_detmon_ronbias_fill_parlist(), xsh_detmon_ronbias_fill_parlist_default(), xsh_detmon_ronbias_retrieve_parlist(), and xsh_lingain().
#define PAFREGEXP "^(" REGEXP "|" INSTREGEXP ")$" |
Definition at line 104 of file xsh_lingain.c.
Referenced by xsh_lingain().
#define RECIPE_AUTHOR "Lander de Bilbao,A.Modigliani" |
Definition at line 98 of file xsh_lingain.c.
#define RECIPE_CONTACT "amodigli@eso.org" |
Definition at line 99 of file xsh_lingain.c.
#define RECIPE_ID "xsh_lingain" |
Definition at line 97 of file xsh_lingain.c.
#define XSH_BPMBIN 1 |
Definition at line 109 of file xsh_lingain.c.
Referenced by xsh_lingain_fill_parlist_default_nir().
#define XSH_EXTS_RED -1 |
Definition at line 108 of file xsh_lingain.c.
#define XSH_LINGAIN_AUTOCORR | ( | it | ) |
((it) == 0 ? XSH_AUTOCORR_UVB : \ (it) == 1 ? XSH_AUTOCORR_VIS : \ (it) == 2 ? XSH_AUTOCORR_NIR : \ "???")
Definition at line 87 of file xsh_lingain.c.
#define XSH_LINGAIN_BP_MAP_NL | ( | it | ) |
((it) == 0 ? XSH_BP_MAP_NL_UVB : \ (it) == 1 ? XSH_BP_MAP_NL_VIS : \ (it) == 2 ? XSH_BP_MAP_NL_NIR : \ "???")
Definition at line 77 of file xsh_lingain.c.
#define XSH_LINGAIN_COEFFS_CUBE | ( | it | ) |
((it) == 0 ? XSH_COEFFS_CUBE_UVB : \ (it) == 1 ? XSH_COEFFS_CUBE_VIS : \ (it) == 2 ? XSH_COEFFS_CUBE_NIR : \ "???")
Definition at line 72 of file xsh_lingain.c.
#define XSH_LINGAIN_DET_LIN_INFO | ( | it | ) |
((it) == 0 ? XSH_DET_LIN_INFO_UVB : \ (it) == 1 ? XSH_DET_LIN_INFO_VIS : \ (it) == 2 ? XSH_DET_LIN_INFO_NIR : \ "???")
Definition at line 62 of file xsh_lingain.c.
#define XSH_LINGAIN_DIFF_FLAT | ( | it | ) |
((it) == 0 ? XSH_DIFF_FLAT_UVB : \ (it) == 1 ? XSH_DIFF_FLAT_VIS : \ (it) == 2 ? XSH_DIFF_FLAT_NIR : \ "???")
Definition at line 92 of file xsh_lingain.c.
#define XSH_LINGAIN_GAIN_INFO | ( | it | ) |
((it) == 0 ? XSH_GAIN_INFO_UVB : \ (it) == 1 ? XSH_GAIN_INFO_VIS : \ (it) == 2 ? XSH_GAIN_INFO_NIR : \ "???")
Definition at line 67 of file xsh_lingain.c.
#define XSH_LINGAIN_OFF_RAW | ( | it | ) |
((it) == 0 ? XSH_LINEARITY_UVB_OFF : \ (it) == 1 ? XSH_LINEARITY_VIS_OFF : \ (it) == 2 ? XSH_LINEARITY_NIR_OFF : \ "???")
Definition at line 57 of file xsh_lingain.c.
#define XSH_LINGAIN_ON_RAW | ( | it | ) |
((it) == 0 ? XSH_LINEARITY_UVB_ON : \ (it) == 1 ? XSH_LINEARITY_VIS_ON : \ (it) == 2 ? XSH_LINEARITY_NIR_ON : \ "???")
Definition at line 52 of file xsh_lingain.c.
#define XSH_LINGAIN_RAW_BP_MAP_NL | ( | it | ) |
((it) == 0 ? XSH_RAW_BP_MAP_NL_UVB : \ (it) == 1 ? XSH_RAW_BP_MAP_NL_VIS : \ (it) == 2 ? XSH_RAW_BP_MAP_NL_NIR : \ "???")
Definition at line 82 of file xsh_lingain.c.
#define XSH_PIX2PIX CPL_TRUE |
Definition at line 107 of file xsh_lingain.c.
Referenced by xsh_lingain_fill_parlist_default_opt().
#define XSH_TOL 0.1 |
Definition at line 110 of file xsh_lingain.c.
Referenced by xsh_lingain_fill_parlist_default_opt().
int cpl_plugin_get_info | ( | cpl_pluginlist * | list | ) |
Build the list of available plugins, for this module.
list | the plugin list |
Create the recipe instance and make it available to the application using the interface. This function is exported.
Definition at line 175 of file xsh_lingain.c.
References RECIPE_AUTHOR, RECIPE_CONTACT, RECIPE_ID, xsh_get_license(), xsh_lingain_create(), xsh_lingain_description, xsh_lingain_description_short, xsh_lingain_destroy(), and xsh_lingain_exec().
static int xsh_lingain | ( | cpl_frameset * | frameset, | |
cpl_parameterlist * | parlist | |||
) | [static] |
Definition at line 348 of file xsh_lingain.c.
References check, instrument, NIR, OPT, PAFREGEXP, QFLAG_NON_LINEAR_PIXEL, RECIPE_ID, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_begin(), XSH_BP_MAP_NL, XSH_BP_MAP_RP, xsh_bpmap_bitwise_to_flag(), xsh_detmon_fill_prolist(), xsh_detmon_lg(), xsh_dfs_extract_pro_frames(), xsh_find_frame_with_tag(), xsh_frameset_merge(), xsh_free_frame(), xsh_free_frameset(), xsh_free_image(), xsh_free_propertylist(), xsh_image_flag_bptype_with_crox(), xsh_instrument_arm_tostring(), xsh_instrument_get_arm(), XSH_LINEARITY_NIR_OFF, XSH_LINEARITY_NIR_ON, XSH_LINEARITY_UVB_OFF, XSH_LINEARITY_UVB_ON, XSH_LINEARITY_VIS_OFF, XSH_LINEARITY_VIS_ON, xsh_lingain_description_short, xsh_lingain_fill_parlist_default_nir(), xsh_lingain_fill_parlist_default_opt(), xsh_lingain_set_saturation_limit(), xsh_msg, xsh_parameterlist_duplicate(), xsh_params_set_defaults(), xsh_pre_create(), xsh_pre_free(), xsh_pre_save(), and XSH_RAW_BP_MAP_NL.
Referenced by xsh_lingain_exec().
static int xsh_lingain_create | ( | cpl_plugin * | plugin | ) | [static] |
Setup the recipe options.
plugin | the plugin |
Create the recipe instance and make it available to the application using the interface.
Definition at line 217 of file xsh_lingain.c.
References assure, check, RECIPE_ID, xsh_error_dump, xsh_init(), xsh_lingain_fill_parlist_default_opt(), xsh_parameters_decode_bp(), and xsh_parameters_generic().
Referenced by cpl_plugin_get_info().
static int xsh_lingain_destroy | ( | cpl_plugin * | plugin | ) | [static] |
Destroy what has been created by the 'create' function.
plugin | the plugin |
Definition at line 293 of file xsh_lingain.c.
References assure, xsh_error_reset, and xsh_free_parameterlist().
Referenced by cpl_plugin_get_info().
static int xsh_lingain_exec | ( | cpl_plugin * | plugin | ) | [static] |
Execute the plugin instance given by the interface.
plugin | the plugin |
Definition at line 260 of file xsh_lingain.c.
References assure, xsh_error_dump, and xsh_lingain().
Referenced by cpl_plugin_get_info().
cpl_error_code xsh_lingain_fill_parlist_default_nir | ( | cpl_parameterlist * | parlist | ) |
Definition at line 692 of file xsh_lingain.c.
References RECIPE_ID, XSH_BPMBIN, and xsh_detmon_lg_fill_parlist_nir_default().
Referenced by xsh_lingain().
cpl_error_code xsh_lingain_fill_parlist_default_opt | ( | cpl_parameterlist * | parlist | ) |
Definition at line 662 of file xsh_lingain.c.
References RECIPE_ID, xsh_detmon_lg_fill_parlist_opt_default(), XSH_PIX2PIX, and XSH_TOL.
Referenced by xsh_lingain(), and xsh_lingain_create().
static cpl_error_code xsh_lingain_set_saturation_limit | ( | cpl_parameterlist * | parlist, | |
xsh_instrument * | instrument | |||
) | [static] |
Definition at line 721 of file xsh_lingain.c.
References RECIPE_ID, XSH_ARM_NIR, and xsh_instrument_get_arm().
Referenced by xsh_lingain().
static cpl_error_code xsh_params_set_defaults | ( | cpl_parameterlist * | pars, | |
xsh_instrument * | inst | |||
) | [static] |
Definition at line 318 of file xsh_lingain.c.
References check, RECIPE_ID, XSH_ARM_UVB, xsh_instrument_get_arm(), xsh_parameter_get_default_flag(), and xsh_parameters_find().
Referenced by xsh_lingain().
char xsh_lingain_description[] [static] |
"This recipe computes detector linearity coefficients and gain\n\ Input Frames : \n\ arm = UVB-VIS: \n\ - A set of n RAW linearity frames (Format=RAW, n >=8, Tag = LINEARITY_arm_ON)\n\ - A set of n RAW bias frames (Format=RAW, n >=1, Tag = LINEARITY_arm_OFF)\n\ arm = NIR:\n\ - A set of n RAW linearity on frames (Format=RAW, n >=8, Tag = LINEARITY_arm_ON)\n\ - A set of n RAW linearity off frames (Format=RAW, n >=8, Tag = LINEARITY_arm_OFF)\n\ - [OPTIONAL] a static bad pixel map (PRO.CATG=BP_MAP_RP_arm) \n\ Note: on and off frames are taken in pairs sequence: OFF-ON-ON-OFF, \n\ at least 16 frames.\n\ Products : \n\ - A linearity map table, PRO.CATG = BP_MAP_LIN_NIR\n\ - A gain table, PRO.CATG = GAIN_INFO\n\ - A cube cointaining the linearity coefficients, PRO.CATG = COEFFS_CUBE_arm\n\ - A linearity map image (RAW format), PRO.CATG = RAW_BP_MAP_NL_arm\n\ - A linearity map image (PRE format), PRO.CATG = BP_MAP_NL_arm\n"
Definition at line 142 of file xsh_lingain.c.
Referenced by cpl_plugin_get_info().
char xsh_lingain_description_short[] = "Computes detector's gain/linearity-map" [static] |
Definition at line 140 of file xsh_lingain.c.
Referenced by cpl_plugin_get_info(), and xsh_lingain().