X-shooter Pipeline Reference Manual 3.8.15
Macros | Functions | Variables

Macros

#define RECIPE_ID   "xsh_mflat"
 
#define RECIPE_AUTHOR   "P.Goldoni, L.Guglielmi, R. Haigron, F. Royer, D. Bramich, A. Modigliani"
 
#define RECIPE_CONTACT   "amodigli@eso.org"
 

Functions

static int xsh_mflat_create (cpl_plugin *plugin)
 Setup the recipe options.
 
static int xsh_mflat_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
 
static int xsh_mflat_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
 
static void xsh_mflat (cpl_parameterlist *parameters, cpl_frameset *frameset)
 Interpret the command line options and execute the data processing.
 
static cpl_error_code xsh_qc_flats_raw (cpl_frameset *fset, xsh_instrument *instrument, cpl_propertylist *qclist)
 
static cpl_error_code xsh_qc_flats_raw_subset (cpl_frameset *fset, xsh_instrument *instrument, cpl_propertylist *qclist)
 
static cpl_error_code xsh_qc_flats_uvb_exp_norm (cpl_frame *q, cpl_frame *d, xsh_instrument *instrument, cpl_propertylist *qclist)
 
int cpl_plugin_get_info (cpl_pluginlist *list)
 Build the list of available plugins, for this module.
 
static cpl_frame * xsh_mflat_combine_flats (cpl_frameset *raw_set, cpl_frameset *on_set, cpl_frameset *off_set, cpl_frame *bpmap_frame, cpl_frame *master_bias_frame, cpl_frame *master_dark_frame, cpl_frame *cen_order_tab_frame, xsh_instrument *instrument, xsh_stack_param *stack_par, const int pre_overscan_corr)
 
static void xsh_combine_flats_and_detect_edges (cpl_frameset *raw_set, cpl_frameset *on_set, cpl_frameset *off_set, cpl_frame *bpmap_frame, cpl_frame *master_bias_frame, cpl_frame *master_dark_frame, cpl_frame *cen_order_tab_frame, cpl_frame *qc_cen_order_tab_frame, xsh_stack_param *stack_par, xsh_detect_order_param *detectorder_par, const int pre_overscan_corr, cpl_frame **edges_order_tab_frame, cpl_frame **rmdark, xsh_instrument *instrument)
 
static cpl_error_code xsh_params_bin_scale (cpl_frameset *raws, xsh_background_param *backg, xsh_detect_order_param *det_order)
 Rescale parameters for binning.
 
static cpl_error_code xsh_params_set_defaults (cpl_parameterlist *pars, xsh_instrument *inst, xsh_detect_order_param *det_order, xsh_background_param *backg)
 
static cpl_error_code xsh_qc_write_to_flat (cpl_frame *mflat, xsh_instrument *instrument, cpl_propertylist *qclist)
 

Variables

static char xsh_mflat_description_short []
 
static char xsh_mflat_description []
 

Detailed Description

This recipe calculates the master flat frame See man-page for details.

Macro Definition Documentation

◆ RECIPE_AUTHOR

#define RECIPE_AUTHOR   "P.Goldoni, L.Guglielmi, R. Haigron, F. Royer, D. Bramich, A. Modigliani"

Definition at line 74 of file xsh_mflat.c.

◆ RECIPE_CONTACT

#define RECIPE_CONTACT   "amodigli@eso.org"

Definition at line 75 of file xsh_mflat.c.

◆ RECIPE_ID

#define RECIPE_ID   "xsh_mflat"

Definition at line 73 of file xsh_mflat.c.

Function Documentation

◆ cpl_plugin_get_info()

int cpl_plugin_get_info ( cpl_pluginlist *  list)

Build the list of available plugins, for this module.

Parameters
listthe 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_mflat.c.

References RECIPE_AUTHOR, RECIPE_CONTACT, RECIPE_ID, xsh_get_license(), xsh_mflat_create(), xsh_mflat_description, xsh_mflat_description_short, xsh_mflat_destroy(), and xsh_mflat_exec().

◆ xsh_combine_flats_and_detect_edges()

static void xsh_combine_flats_and_detect_edges ( cpl_frameset *  raw_set,
cpl_frameset *  on_set,
cpl_frameset *  off_set,
cpl_frame *  bpmap_frame,
cpl_frame *  master_bias_frame,
cpl_frame *  master_dark_frame,
cpl_frame *  cen_order_tab_frame,
cpl_frame *  qc_cen_order_tab_frame,
xsh_stack_param stack_par,
xsh_detect_order_param detectorder_par,
const int  pre_overscan_corr,
cpl_frame **  edges_order_tab_frame,
cpl_frame **  rmdark,
xsh_instrument instrument 
)
static

◆ xsh_mflat()

static void xsh_mflat ( cpl_parameterlist *  parameters,
cpl_frameset *  frameset 
)
static

Interpret the command line options and execute the data processing.

Parameters
parametersthe parameters list
framesetthe frames list

In case of failure the cpl_error_code is set.

Definition at line 854 of file xsh_mflat.c.

References xsh_instrument::arm, check, instrument, xsh_instrument::lamp, xsh_detect_order_param::min_sn, xsh_d2_detect_order_param::min_sn, RECIPE_ID, xsh_add_product_image(), xsh_add_product_pre(), xsh_add_product_table(), XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, XSH_ASSURE_NOT_ILLEGAL_MSG, xsh_begin(), xsh_check_load_master_bpmap(), xsh_combine_flats_and_detect_edges(), xsh_create_master_flat_with_mask(), xsh_dfs_split_nir(), xsh_dfs_split_qth_d2(), xsh_end(), xsh_error_reset, xsh_find_frame_with_tag(), xsh_find_order_tab_centr(), XSH_FLAT, xsh_flat_merge_qth_d2(), xsh_flat_merge_qth_d2_tabs(), XSH_FREE, xsh_free_frame(), xsh_free_frameset(), xsh_free_propertylist(), xsh_free_table(), xsh_image_mflat_detect_blemishes(), xsh_instrument_arm_tostring(), xsh_instrument_free(), xsh_instrument_get_arm(), xsh_instrument_mode_tostring(), xsh_instrument_nir_corr_if_JH(), xsh_instrument_update_from_spectralformat(), xsh_instrument_update_lamp(), XSH_LAMP_D2, XSH_LAMP_QTH, XSH_LAMP_QTH_D2, XSH_LAMP_UNDEFINED, XSH_MASTER_BIAS, XSH_MASTER_DARK, xsh_mflat_description_short, xsh_msg, xsh_msg_warning, xsh_order_split_qth_d2(), xsh_parameters_background_get(), xsh_parameters_d2_detect_order_get(), xsh_parameters_detect_order_get(), xsh_parameters_get_int(), xsh_params_bin_scale(), xsh_params_set_defaults(), xsh_qc_flats_raw(), xsh_qc_flats_raw_subset(), xsh_qc_flats_uvb_exp_norm(), xsh_qc_write_to_flat(), xsh_recipe_params_check(), XSH_SPECTRAL_FORMAT, xsh_stack_frames_get(), and xsh_subtract_background().

Referenced by xsh_mflat_exec().

◆ xsh_mflat_combine_flats()

static cpl_frame * xsh_mflat_combine_flats ( cpl_frameset *  raw_set,
cpl_frameset *  on_set,
cpl_frameset *  off_set,
cpl_frame *  bpmap_frame,
cpl_frame *  master_bias_frame,
cpl_frame *  master_dark_frame,
cpl_frame *  cen_order_tab_frame,
xsh_instrument instrument,
xsh_stack_param stack_par,
const int  pre_overscan_corr 
)
static

◆ xsh_mflat_create()

static int xsh_mflat_create ( cpl_plugin *  plugin)
static

Setup the recipe options.

Parameters
pluginthe 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_mflat.c.

References assure, check, RECIPE_ID, xsh_error_dump, xsh_init(), xsh_parameters_background_create(), xsh_parameters_d2_detect_order_create(), xsh_parameters_decode_bp(), xsh_parameters_detect_order_create(), xsh_parameters_generic(), xsh_parameters_pre_overscan(), and xsh_parameters_stack_create().

Referenced by cpl_plugin_get_info().

◆ xsh_mflat_destroy()

static int xsh_mflat_destroy ( cpl_plugin *  plugin)
static

Destroy what has been created by the 'create' function.

Parameters
pluginthe plugin
Returns
0 if everything is ok

Definition at line 283 of file xsh_mflat.c.

References assure, and xsh_free_parameterlist().

Referenced by cpl_plugin_get_info().

◆ xsh_mflat_exec()

static int xsh_mflat_exec ( cpl_plugin *  plugin)
static

Execute the plugin instance given by the interface.

Parameters
pluginthe plugin
Returns
0 if everything is ok

Definition at line 249 of file xsh_mflat.c.

References assure, xsh_error_dump, and xsh_mflat().

Referenced by cpl_plugin_get_info().

◆ xsh_params_bin_scale()

static cpl_error_code xsh_params_bin_scale ( cpl_frameset *  raws,
xsh_background_param backg,
xsh_detect_order_param det_order 
)
static

Rescale parameters for binning.

Parameters
rawsraw frames set
backgparameters to control inter-order background subtraction
det_orderparameters to control order edges detection In case of failure the cpl_error_code is set.

Definition at line 446 of file xsh_mflat.c.

References binx, biny, check, xsh_detect_order_param::min_order_size_x, xsh_background_param::radius_x, xsh_background_param::radius_y, xsh_detect_order_param::search_window_hsize, xsh_free_propertylist(), xsh_pfits_get_binx(), and xsh_pfits_get_biny().

Referenced by xsh_mflat().

◆ xsh_params_set_defaults()

static cpl_error_code xsh_params_set_defaults ( cpl_parameterlist *  pars,
xsh_instrument inst,
xsh_detect_order_param det_order,
xsh_background_param backg 
)
static

◆ xsh_qc_flats_raw()

static cpl_error_code xsh_qc_flats_raw ( cpl_frameset *  fset,
xsh_instrument instrument,
cpl_propertylist *  qclist 
)
static

Definition at line 542 of file xsh_mflat.c.

References instrument, nx, ny, XSH_ARM_NIR, and xsh_instrument_get_arm().

Referenced by xsh_mflat().

◆ xsh_qc_flats_raw_subset()

static cpl_error_code xsh_qc_flats_raw_subset ( cpl_frameset *  fset,
xsh_instrument instrument,
cpl_propertylist *  qclist 
)
static

Definition at line 637 of file xsh_mflat.c.

Referenced by xsh_mflat().

◆ xsh_qc_flats_uvb_exp_norm()

static cpl_error_code xsh_qc_flats_uvb_exp_norm ( cpl_frame *  q,
cpl_frame *  d,
xsh_instrument instrument,
cpl_propertylist *  qclist 
)
static

Definition at line 611 of file xsh_mflat.c.

Referenced by xsh_mflat().

◆ xsh_qc_write_to_flat()

static cpl_error_code xsh_qc_write_to_flat ( cpl_frame *  mflat,
xsh_instrument instrument,
cpl_propertylist *  qclist 
)
static

Variable Documentation

◆ xsh_mflat_description

char xsh_mflat_description[]
static

Definition at line 101 of file xsh_mflat.c.

Referenced by cpl_plugin_get_info().

◆ xsh_mflat_description_short

char xsh_mflat_description_short[]
static
Initial value:
=
"Create the master flat and the orders edges traces table frames"

Definition at line 98 of file xsh_mflat.c.

Referenced by cpl_plugin_get_info(), and xsh_mflat().