/home/amodigli/releases/xsh/2.1.1/xsh.30433/xshp/recipes/xsh_lingain.c File Reference

#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 Documentation

#define INSTREGEXP   "ESO INS SETUP ID"

Definition at line 102 of file xsh_lingain.c.

#define NIR   TRUE
#define OPT   FALSE
#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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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   ) 
Value:
((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().


Function Documentation

int cpl_plugin_get_info ( cpl_pluginlist *  list  ) 

Build the list of available plugins, for this module.

Parameters:
list the plugin list
Returns:
0 if everything is ok, -1 otherwise

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]
static int xsh_lingain_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

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.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

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.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

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  ) 
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]

Variable Documentation

char xsh_lingain_description[] [static]
Initial value:
  "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().


Generated on 13 Mar 2013 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1