#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) |
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.
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.
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 |
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.
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 |
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 | |||
) |
Definition at line 51 of file xsh_drl_check.c.
References binx, xsh_add_temporary_file(), XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_badpixelmap_coadd(), XSH_BP_MAP, XSH_BP_MAP_NL, XSH_BP_MAP_RP, xsh_bpmap_2pre(), xsh_find_frame_with_tag(), xsh_free_frame(), xsh_free_frameset(), xsh_free_image(), xsh_free_propertylist(), xsh_instrument_arm_tostring(), xsh_instrument_get_arm(), xsh_msg, xsh_pfits_get_binx(), xsh_pfits_get_naxis1(), xsh_pfits_set_pcatg(), and XSH_PRE_DATA_BPP.
Referenced by xsh_2dmap(), xsh_flexcomp(), xsh_mbias(), xsh_mdark(), xsh_mflat(), xsh_orderpos(), xsh_predict(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod_get_calibs(), xsh_slit_offset_get_calibs(), xsh_slit_stare_get_calibs(), and xsh_wavecal().
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.
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 |
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.
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 |
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.
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? |
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.
rmbias_frame | input frame | |
master_dark | master dark | |
instrument | instrument arm and lamp setting | |
prefix | file prefix |
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.
[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 |
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().