xsh_flexcomp
[Xshooter RecipesDRL Functions]

Defines

#define RECIPE_ID   "xsh_flexcomp"
#define RECIPE_AUTHOR   "P.Goldoni, L.Guglielmi, R. Haigron, F. Royer"
#define RECIPE_CONTACT   "amodigli@eso.org"
#define XSH_AFC_UVB_XMIN   573
#define XSH_AFC_UVB_YMIN   1501
#define XSH_AFC_UVB_XMAX   1572
#define XSH_AFC_UVB_YMAX   2500
#define XSH_AFC_UVB_ORDER   18
#define XSH_AFC_VIS_XMIN   534
#define XSH_AFC_VIS_YMIN   2301
#define XSH_AFC_VIS_XMAX   1533
#define XSH_AFC_VIS_YMAX   3300
#define XSH_AFC_VIS_ORDER   26

Functions

static int xsh_flexcomp_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_flexcomp_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_flexcomp_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static void xsh_flexcomp (cpl_parameterlist *parameters, cpl_frameset *frameset)
 Interpret the command line options and execute the data processing.
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, xsh_detect_arclines_param *detect_arclines_p)
static cpl_error_code xsh_frame_check_is_right_afcatt (cpl_frame *afcatt_frame, xsh_instrument *instrument)
cpl_frame * xsh_flexcor (cpl_frame *afc_frame, cpl_frame *wave_tab_frame, cpl_frame *model_config_frame, cpl_frame *order_tab_frame, cpl_frame *attresidtab_frame, int afc_xmin, int afc_ymin, xsh_instrument *instr, cpl_frame **afc_order_tab_frame, cpl_frame **afc_model_config_frame)
 This function applies the computed shift betwwen AFC CAL and AFC ATT frame.
cpl_frame * xsh_afcthetab_create (cpl_frame *wave_tab_frame, cpl_frame *model_config_frame, int order, cpl_frame *spectralformat_frame, cpl_frame *arclines_frame, int xmin, int ymin, xsh_instrument *instr, const int clean_tmp)
 Create a The tab for AFC.

Variables

static char xsh_flexcomp_description_short []
static char xsh_flexcomp_description []

Detailed Description

This recipe is used compute flexure compensation See man-page for details.

and ATT


Define Documentation

#define RECIPE_AUTHOR   "P.Goldoni, L.Guglielmi, R. Haigron, F. Royer"

Definition at line 76 of file xsh_flexcomp.c.

#define RECIPE_CONTACT   "amodigli@eso.org"

Definition at line 77 of file xsh_flexcomp.c.

#define RECIPE_ID   "xsh_flexcomp"

Definition at line 75 of file xsh_flexcomp.c.

#define XSH_AFC_UVB_ORDER   18

Definition at line 83 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_UVB_XMAX   1572

Definition at line 81 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_UVB_XMIN   573

Definition at line 79 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_UVB_YMAX   2500

Definition at line 82 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_UVB_YMIN   1501

Definition at line 80 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_VIS_ORDER   26

Definition at line 89 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_VIS_XMAX   1533

Definition at line 87 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_VIS_XMIN   534

Definition at line 85 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_VIS_YMAX   3300

Definition at line 88 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().

#define XSH_AFC_VIS_YMIN   2301

Definition at line 86 of file xsh_flexcomp.c.

Referenced by xsh_flexcomp().


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 147 of file xsh_flexcomp.c.

References RECIPE_AUTHOR, RECIPE_CONTACT, RECIPE_ID, xsh_flexcomp_create(), xsh_flexcomp_description, xsh_flexcomp_description_short, xsh_flexcomp_destroy(), xsh_flexcomp_exec(), and xsh_get_license().

cpl_frame* xsh_afcthetab_create ( cpl_frame *  wave_tab_frame,
cpl_frame *  model_config_frame,
int  order,
cpl_frame *  spectralformat_frame,
cpl_frame *  arclines_frame,
int  xmin,
int  ymin,
xsh_instrument instr,
const int  clean_tmp 
)

Create a The tab for AFC.

Parameters:
[in] wave_tab_frame wavelength table
[in] model_config_frame model cfg frame
[in] order order at which computations are done
[in] spectralformat_frame spectral format frame
[in] arclines_frame arc lines frame
[in] xmin x min
[in] ymin y min
[in] instr Instrument containing the arm , mode and lamp in use

Definition at line 339 of file xsh_flexcor.c.

References check, size, x, xsh_add_temporary_file(), xsh_arclist_free(), xsh_arclist_get_size(), xsh_arclist_get_wavelength(), xsh_arclist_load(), XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_vector(), xsh_instrument_arm_tostring(), xsh_model_config_load_best(), xsh_model_get_xy(), xsh_msg, XSH_REGDEBUG, xsh_spectralformat_list_free(), xsh_spectralformat_list_get_orders(), xsh_spectralformat_list_load(), xsh_the_map_create(), xsh_the_map_free(), xsh_the_map_save(), xsh_the_map_set_arcline(), xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_free(), xsh_wavesol_load(), and y.

Referenced by xsh_flexcomp().

static void xsh_flexcomp ( cpl_parameterlist *  parameters,
cpl_frameset *  frameset 
) [static]

Interpret the command line options and execute the data processing.

Parameters:
parameters the parameters list
frameset the frames list

In case of failure the cpl_error_code is set.

Definition at line 422 of file xsh_flexcomp.c.

References xs_3::arm, assure, check, instrument, RECIPE_ID, xsh_add_product_table(), XSH_AFC_ATT, XSH_AFC_UVB_ORDER, XSH_AFC_UVB_XMAX, XSH_AFC_UVB_XMIN, XSH_AFC_UVB_YMAX, XSH_AFC_UVB_YMIN, XSH_AFC_VIS_ORDER, XSH_AFC_VIS_XMAX, XSH_AFC_VIS_XMIN, XSH_AFC_VIS_YMAX, XSH_AFC_VIS_YMIN, xsh_afcthetab_create(), XSH_ARC_LINE_LIST_AFC, XSH_ARM_NIR, XSH_ARM_UNDEFINED, XSH_ARM_VIS, XSH_ASSURE_NOT_NULL_MSG, xsh_badpixelmap_extract(), xsh_begin(), xsh_check_load_master_bpmap(), xsh_create_dispersol_physmod(), xsh_create_model_map(), xsh_create_poly_wavemap(), xsh_detect_arclines(), XSH_DISP_TAB_AFC, xsh_end(), xsh_error_reset, xsh_find_frame_with_tag(), xsh_find_order_tab_edges(), xsh_find_wave_tab(), xsh_flexcomp_description_short, xsh_flexcor(), xsh_frame_check_is_right_afcatt(), XSH_FREE, xsh_free_frame(), xsh_free_frameset(), XSH_GET_TAG_FROM_ARM, xsh_instrument_arm_tostring(), xsh_instrument_free(), xsh_instrument_get_arm(), xsh_instrument_update_from_spectralformat(), XSH_MASTER_BIAS, XSH_MASTER_DARK, XSH_MOD_CFG_OPT_2D, XSH_MOD_CFG_TAB, xsh_mode_is_physmod(), xsh_msg, xsh_msg_error, xsh_msg_warning, xsh_parameters_clipping_detect_arclines_get(), xsh_parameters_detect_arclines_get(), xsh_parameters_dispersol_get(), xsh_parameters_get_int(), xsh_params_set_defaults(), xsh_preframe_extract(), xsh_prepare(), xsh_recipe_params_check(), XSH_SOLUTION_RELATIVE, XSH_SPECTRAL_FORMAT, xsh_subtract_bias(), xsh_subtract_dark(), and XSH_WAVE_TAB_2D.

Referenced by xsh_flexcomp_exec().

static int xsh_flexcomp_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 189 of file xsh_flexcomp.c.

References assure, check, DECODE_BP_FLAG_DEF, RECIPE_ID, xsh_error_dump, XSH_GAUSSIAN_METHOD, xsh_init(), xsh_parameters_clipping_detect_arclines_create(), xsh_parameters_decode_bp(), xsh_parameters_detect_arclines_create(), xsh_parameters_dispersol_create(), xsh_parameters_generic(), xsh_parameters_new_double(), xsh_parameters_new_int(), and xsh_parameters_pre_overscan().

Referenced by cpl_plugin_get_info().

static int xsh_flexcomp_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 337 of file xsh_flexcomp.c.

References assure, and xsh_free_parameterlist().

Referenced by cpl_plugin_get_info().

static int xsh_flexcomp_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 304 of file xsh_flexcomp.c.

References assure, xsh_error_dump, and xsh_flexcomp().

Referenced by cpl_plugin_get_info().

cpl_frame* xsh_flexcor ( cpl_frame *  afc_frame,
cpl_frame *  wave_tab_frame,
cpl_frame *  model_config_frame,
cpl_frame *  order_tab_frame,
cpl_frame *  attresidtab_frame,
int  afc_xmin,
int  afc_ymin,
xsh_instrument instr,
cpl_frame **  afc_order_tab_frame,
cpl_frame **  afc_model_config_frame 
)

This function applies the computed shift betwwen AFC CAL and AFC ATT frame.

Parameters:
[in] afc_frame flexure compensation frame
[in] wave_tab_frame wave tab frame
[in] model_config_frame model cfg frame
[in] order_tab_frame order tab frame
[in] attresidtab_frame residual tables for attached AFC frame
[in] afc_xmin AFC xmin
[in] afc_ymin AFC ymin
[in] instr Instrument containing the arm , mode and lamp in use
[out] afc_order_tab_frame order table AFC corrected
[out] afc_model_config_frame model cfg frame AFC corrected

Definition at line 91 of file xsh_flexcor.c.

References check, xsh_resid_tab::lambda, XSH_INSTRCONFIG::ny, xsh_resid_tab::order, order, xsh_resid_tab::slit_index, xsh_resid_tab::thpre_x, xsh_resid_tab::thpre_y, xsh_resid_tab::xgauss, XSH_ARM_NIR, XSH_ARM_UNDEFINED, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_propertylist(), xsh_free_table(), xsh_free_vector(), XSH_GET_TAG_FROM_ARM, XSH_GET_TAG_FROM_MODE, xsh_instrument_get_arm(), xsh_instrument_get_config(), XSH_MOD_CFG_OPT_AFC, xsh_model_config_load_best(), xsh_model_get_xy(), xsh_model_io_output_cfg(), xsh_model_offset(), xsh_model_pipe_anneal(), xsh_model_temperature_update_frame(), xsh_msg, xsh_order_list_apply_shift(), xsh_order_list_free(), xsh_order_list_load(), xsh_order_list_save(), XSH_ORDER_TAB_AFC, xsh_pfits_set_pcatg(), XSH_QC_AFC_XSHIFT, XSH_QC_AFC_XSHIFT_C, XSH_QC_AFC_YSHIFT, XSH_QC_AFC_YSHIFT_C, XSH_REGDEBUG, xsh_resid_tab_free(), xsh_resid_tab_get_size(), xsh_resid_tab_load(), XSH_WAVE_TAB_AFC, xsh_wavesol_apply_shift(), xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_free(), xsh_wavesol_load(), xsh_wavesol_save(), xsh_wavesol_trace(), and xsh_resid_tab::ygauss.

Referenced by xsh_flexcomp().

static cpl_error_code xsh_frame_check_is_right_afcatt ( cpl_frame *  afcatt_frame,
xsh_instrument instrument 
) [static]

Definition at line 389 of file xsh_flexcomp.c.

References check, xsh_free_propertylist(), xsh_msg_error, and xsh_pfits_get_slit_value().

Referenced by xsh_flexcomp().

static cpl_error_code xsh_params_set_defaults ( cpl_parameterlist *  pars,
xsh_instrument inst,
xsh_detect_arclines_param detect_arclines_p 
) [static]

Variable Documentation

char xsh_flexcomp_description[] [static]
Initial value:
"This recipe computes the flexure of the instrument and correct CAL files.\n\
  Input Frames :\n\
    - [UVB, VIS] One RAW frame (Format = RAW, Tag = AFF_ATT_arm)\n\
    - [NIR] Two RAW frames ((Format = RAW,  Tag = AFC_ATT_arm_ON,\
AFC_ATT_arm_OFF)\n\
    - An arc line list (Format = TABLE, Tag = ARC_LINE_LIST_AFC_arm)\n\
    - A spectral format table frame (Format = TABLE, Tag = SPECTRAL_FORMAT_TAB_arm)\n\
    - [UVB,VIS] A master bias (Format = PRE, Tag = MASTER_BIAS_arm)\n\
    - [UVB,VIS] A master dark (Format = PRE, Tag = MASTER_DARK_arm)\n\
    - An order table frame (Format = TABLE, Tag = ORDER_TAB_EDGES_IFU_arm)\n\
  - [OPTIONAL] A non-linear badpixel map (Tag = BP_MAP_NL_arm)\n\
  - [OPTIONAL] A reference badpixel map (Tag = BP_MAP_RP_arm)\n\
    - [poly mode]  A wave solution frame (Format = TABLE, Tag = WAVE_TAB_2D_arm)\n\
    - [physical model mode] A model cfg table (Format = TABLE, Tag = XSH_MOD_CFG_OPT_2D_arm)\n\
  Products : \n\
    - [poly mode]  An updated wave solution frame (Format = TABLE, Tag = WAVE_TAB_AFC_arm)\n\
    - [physical model mode] An updated  model cfg table (Format = TABLE, Tag = XSH_MOD_CFG_OPT_AFC_arm)\n\
    - An updated order table frame (Format = TABLE, Tag = ORDER_TAB_AFC_IFU_arm)\n\
    - [poly mode] A dispersion table frame (Format = TABLE, Tag =  DISP_TAB_AFC_arm)\n"

Definition at line 112 of file xsh_flexcomp.c.

Referenced by cpl_plugin_get_info().

Initial value:
"Compute the flexure of the instrument"

Definition at line 109 of file xsh_flexcomp.c.

Referenced by cpl_plugin_get_info(), and xsh_flexcomp().


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