/home/amodigli/releases/xsh/2.1.1/xsh.30433/xshp/xsh/xsh_drl_check.h File Reference

#include <cpl.h>
#include <xsh_drl.h>
#include <xsh_error.h>
#include <xsh_dfs.h>
#include <xsh_utils.h>
#include <xsh_data_pre.h>
#include <xsh_data_rec.h>
#include <xsh_data_instrument.h>
#include <xsh_data_order.h>
#include <xsh_data_dispersol.h>
#include <xsh_data_slice_offset.h>
#include <xsh_parameters.h>
#include <xsh_qc_handling.h>
#include <xsh_utils_ifu.h>

Go to the source code of this file.

Functions

cpl_frame * xsh_check_load_master_bpmap (cpl_frameset *calib, xsh_instrument *inst, const char *rec_id)
void xsh_check_get_map (cpl_frame *disp_tab_frame, cpl_frame *order_tab_edges, cpl_frame *crhm_frame, cpl_frame *model_config_frame, cpl_frameset *calib, xsh_instrument *instrument, int do_computemap, int recipe_use_model, const char *rec_prefix, cpl_frame **wavemap_frame, cpl_frame **slitmap_frame)
 Check function to get wave and slit maps.
cpl_frame * xsh_check_remove_crh_multiple (cpl_frameset *raws, const char *ftag, xsh_stack_param *stack_par, xsh_clipping_param *crh_clipping, xsh_instrument *instr, cpl_imagelist **lista, cpl_image **listb)
 Check function.
void xsh_check_afc (int check_flag, cpl_frame *model_frame, cpl_frame *sci_frame, cpl_frameset *wave_frameset, cpl_frame *order_tab_frame, cpl_frame *disp_tab_frame, xsh_instrument *instrument)
 Check AFC frame.
cpl_frame * xsh_check_subtract_bias (cpl_frame *crhm_frame, cpl_frame *master_bias, xsh_instrument *instrument, const char *prefix, const int pre_overscan_corr, const int save_tmp)
 Check function to subtract bias.
cpl_frame * xsh_check_subtract_dark (cpl_frame *rmbias_frame, cpl_frame *master_dark, xsh_instrument *instrument, const char *prefix)
 Check function for dark subtraction.
cpl_frame * xsh_check_divide_flat (int do_flatfield, cpl_frame *clean_frame, cpl_frame *master_flat, xsh_instrument *instrument, const char *prefix)
 Check function.
cpl_frame * xsh_check_remove_crh_single (int nb_raws_frame, cpl_frame *subsky_frame, xsh_remove_crh_single_param *crh_single_par, xsh_instrument *instrument, const char *prefix)
 Check function.
cpl_frame * xsh_check_subtract_sky_single (int do_subsky, cpl_frame *src_frame, cpl_frame *ordertabedges_frame, cpl_frame *slitmap_frame, cpl_frame *wavemap_frame, cpl_frame *loctab_frame, cpl_frame *masterflat_frame, cpl_frame *definedbreakpoints_frame, xsh_instrument *instrument, int nbkpts, xsh_subtract_sky_single_param *sky_par, cpl_frame **sky_spectrum, cpl_frame **sky_spectrum_eso, cpl_frame **sky_img, const char *prefix, const int clean_tmp)
 Check functionfor sky subtraction on single frame.
cpl_frame * xsh_save_sky_model (cpl_frame *obj_frame, cpl_frame *sub_sky_frame, const char *sky_tag, xsh_instrument *instrument)

Function Documentation

void xsh_check_afc ( int  check_flag,
cpl_frame *  model_frame,
cpl_frame *  sci_frame,
cpl_frameset *  wave_frameset,
cpl_frame *  order_tab_frame,
cpl_frame *  disp_tab_frame,
xsh_instrument instrument 
)

Check AFC frame.

Parameters:
check_flag If TRUE do the check
model_frame Model frame
sci_frame Science frame
wave_frameset Wave solution frameset
order_tab_frame Order Table frame
disp_tab_frame Dispersion solution frame
instrument Instrument structure

Definition at line 531 of file xsh_drl_check.c.

References check, xsh_frame_check_model_cfg_is_afc_corrected(), and xsh_frame_check_model_cfg_is_proper_for_sci().

Referenced by xsh_geom_ifu().

cpl_frame* xsh_check_divide_flat ( int  do_flatfield,
cpl_frame *  clean_frame,
cpl_frame *  master_flat,
xsh_instrument instrument,
const char *  prefix 
)

Check function.

Parameters:
do_flatfield check if flat field has to be applied
clean_frame input frame cleaned by CRHs
master_flat input master flat field
instrument structure containing instrument arm and lamp setting
prefix file prefix
Returns:

Definition at line 385 of file xsh_drl_check.c.

References check, XSH_ASSURE_NOT_NULL, xsh_divide_flat(), xsh_instrument_arm_tostring(), and xsh_msg.

Referenced by xsh_absorp(), xsh_respon_slit_stare(), and xsh_scired_slit_stare().

void xsh_check_get_map ( cpl_frame *  disp_tab_frame,
cpl_frame *  order_tab_edges,
cpl_frame *  crhm_frame,
cpl_frame *  model_config_frame,
cpl_frameset *  calib,
xsh_instrument instrument,
int  do_computemap,
int  recipe_use_model,
const char *  rec_prefix,
cpl_frame **  wavemap_frame,
cpl_frame **  slitmap_frame 
)

Check function to get wave and slit maps.

Parameters:
disp_tab_frame dispersion table frame
order_tab_edges order edge table
crhm_frame frame CRH corrected
model_config_frame model cfg frame
calib calibration frame list
instrument instrument setting arm and lamp
do_computemap switch parameter to compute por not the slit/wave maps
recipe_use_model are we using the model cfg? REALLY NEEDED?
rec_prefix recipe prefix
wavemap_frame wavemap frame
slitmap_frame slitmap frame
Returns:

Definition at line 204 of file xsh_drl_check.c.

References check, check_msg, xsh_create_map(), xsh_create_model_map(), xsh_find_slitmap(), xsh_find_wavemap(), xsh_instrument_arm_tostring(), xsh_model_temperature_update_frame(), xsh_msg, XSH_SLIT_MAP_MODEL, and XSH_WAVE_MAP_MODEL.

Referenced by xsh_respon_slit_offset(), xsh_scired_slit_nod_get_calibs(), and xsh_scired_slit_offset().

cpl_frame* xsh_check_load_master_bpmap ( cpl_frameset *  calib,
xsh_instrument inst,
const char *  rec_id 
)
cpl_frame* xsh_check_remove_crh_multiple ( cpl_frameset *  raws,
const char *  ftag,
xsh_stack_param stack_par,
xsh_clipping_param crh_clipping_par,
xsh_instrument instr,
cpl_imagelist **  lista,
cpl_image **  listb 
)

Check function.

Parameters:
raws input raw frames
ftag file tag
crh_clipping_par parameter controlling CRH
instr instrument arm and lamp setting
lista output imagelist
listb output image
Returns:
frame cleaned from CRHs via stacking and kappa sigma clip

Definition at line 261 of file xsh_drl_check.c.

References check, check_msg, XSH_ASSURE_NOT_NULL, xsh_msg, and xsh_remove_crh_multiple().

Referenced by xsh_absorp(), xsh_geom_ifu(), and xsh_scired_slit_stare().

cpl_frame* xsh_check_remove_crh_single ( int  nb_raws_frame,
cpl_frame *  subsky_frame,
xsh_remove_crh_single_param crh_single_par,
xsh_instrument instrument,
const char *  prefix 
)

Check function.

Parameters:
nb_raws_frame number of raw frames
subsky_frame frame sky subtracted
crh_single_par parameters to control CRH (single frame) subtraction
instrument instrument arm and lamp setting
prefix file prefix
Returns:

Definition at line 423 of file xsh_drl_check.c.

References check, xsh_remove_crh_single_param::nb_iter, xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_instrument_arm_tostring(), xsh_msg, and xsh_remove_crh_single().

cpl_frame* xsh_check_subtract_bias ( cpl_frame *  crhm_frame,
cpl_frame *  master_bias,
xsh_instrument instrument,
const char *  prefix,
const int  pre_overscan_corr,
const int  save_tmp 
)

Check function to subtract bias.

Parameters:
crhm_frame input frame (eventually cleaned by CRH)
master_bias master bias
instrument instrument arm and lamp setting
prefix file prefix
pre_overscan_corr correct for overscan?
Returns:

Definition at line 297 of file xsh_drl_check.c.

References check, XSH_ARM_NIR, XSH_ASSURE_NOT_NULL, xsh_instrument_arm_tostring(), xsh_instrument_get_arm(), xsh_msg, and xsh_subtract_bias().

Referenced by xsh_absorp(), xsh_geom_ifu(), xsh_respon_slit_stare(), xsh_scired_ifu_stare(), and xsh_scired_slit_stare().

cpl_frame* xsh_check_subtract_dark ( cpl_frame *  rmbias_frame,
cpl_frame *  master_dark,
xsh_instrument instrument,
const char *  prefix 
)

Check function for dark subtraction.

Parameters:
rmbias_frame input frame
master_dark master dark
instrument instrument arm and lamp setting
prefix file prefix
Returns:

Definition at line 346 of file xsh_drl_check.c.

References check, xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_msg, and xsh_subtract_dark().

Referenced by xsh_absorp(), xsh_geom_ifu(), xsh_respon_slit_stare(), xsh_scired_slit_stare(), and xsh_wavecal().

cpl_frame* xsh_check_subtract_sky_single ( int  do_subsky,
cpl_frame *  src_frame,
cpl_frame *  ordertabedges_frame,
cpl_frame *  slitmap_frame,
cpl_frame *  wavemap_frame,
cpl_frame *  loctab_frame,
cpl_frame *  masterflat_frame,
cpl_frame *  definedbreakpoints_frame,
xsh_instrument instrument,
int  nbkpts,
xsh_subtract_sky_single_param sky_par,
cpl_frame **  sky_spectrum,
cpl_frame **  sky_spectrum_eso,
cpl_frame **  sky_img,
const char *  prefix,
const int  clean_tmp 
)

Check functionfor sky subtraction on single frame.

Parameters:
[in] do_subsky do sky subtraction?
[in] src_frame source frame
[in] ordertabedges_frame order edge table
[in] slitmap_frame slit map frame
[in] wavemap_frame wave map frame
[in] loctab_frame localization table
[in] masterflat_frame master flat frame
[in] definedbreakpoints_frame frame defining break points order by order
[in] instrument instrument arm and lamp setting
[in] nbkpts number of break points
[in] sky_par parameters controlling sky subtraction
[out] sky_spectrum output sky spectrum 1D
[out] sky_spectrum_eso output sky spectrum ESO format
[out] sky_img sky image for QC
[in] prefix file prefix
Returns:
frame corrected for sky background in DRL format

Definition at line 477 of file xsh_drl_check.c.

References check, xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_instrument_arm_tostring(), xsh_msg, xsh_save_sky_model(), and xsh_subtract_sky_single().

Referenced by xsh_absorp(), xsh_respon_slit_stare(), xsh_scired_slit_stare(), and xsh_slit_stare_correct_crh_and_sky().


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