#include <cpl.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>
Go to the source code of this file.
Defines | |
#define | XSH_CONCAT(A, B) A ## B |
#define | XSH_STRING(A) # A |
#define | PICKUP_NOISE_HOT_PIXEL_MAP |
#define | REGDEBUG_OPTEXTRACT 1 |
#define | XSH_DIVIDE_FLAT_THRESH 1e-10 |
#define | XSH_MULTIPLY_FLAT_THRESH 1e+30 |
#define | WAVELENGTH_PRECISION 0.00001 |
#define | SLIT_PRECISION 0.00001 |
#define | SLIT_PRECISION_IFU 0.21 |
#define | XSH_DETECT_ARCLINES_TYPE_POLY 0 |
#define | XSH_DETECT_ARCLINES_TYPE_MODEL 1 |
#define | XSH_DETECT_ARCLINES_MODE_NORMAL 0 |
#define | XSH_DETECT_ARCLINES_MODE_CORRECTED 1 |
#define | XSH_DETECT_ARCLINES_MODE_RECOVER 2 |
#define | XSH_RECTIFY_TYPE_POLY 0 |
#define | XSH_RECTIFY_TYPE_MODEL 1 |
#define | XSH_MATH_SQRT_2 1.4142135623730951 |
#define | REGDEBUG_GAUSSIAN 0 |
#define | REGDEBUG_MODEL 0 |
#define | REGDEBUG_BLAZE 0 |
#define | REGDEBUG_EXTRACT 0 |
#define | REGDEBUG_EXTRACT_XY 0 |
#define | REGDEBUG_SUBEXTRACT 0 |
#define | REGDEBUG_SUBEXTRACT_XY 0 |
#define | REGDEBUG_EXTRACT_STD 1 |
#define | REGDEBUG_WEIGHT 0 |
#define | REGDEBUG_EXTRACT_OPT 0 |
#define | REGDEBUG_N 0 |
Enumerations | |
enum | xsh_sol_wavelength { XSH_SOLUTION_ABSOLUTE, XSH_SOLUTION_RELATIVE } |
Functions | |
cpl_frame * | xsh_bpmap_2pre (cpl_frame *bpmap, const char *prefix, xsh_instrument *inst) |
This function transform a BP map from raw to pre format. | |
void | xsh_prepare (cpl_frameset *frames, cpl_frame *bpmap, cpl_frame *mbias, const char *prefix, xsh_instrument *instr, const int pre_overscan_corr) |
This function transform RAW frames dataset in PRE frames dataset attaching the default bad pixel map and an error image. | |
cpl_frame * | xsh_preframe_extract (cpl_frame *frame, int xmin, int ymin, int xmax, int ymax, const char *name, xsh_instrument *instr) |
This function create a sub frame from PRE frame. the sub frame is described by a box. | |
cpl_frame * | xsh_remove_crh_multiple (cpl_frameset *rawFrames, const char *name, xsh_clipping_param *crh_clipping, xsh_instrument *inst, cpl_imagelist **, cpl_image **) |
cpl_frame * | xsh_compute_noise_map (cpl_imagelist *, cpl_frame *bpmap, xsh_clipping_param *, xsh_instrument *instr, cpl_frame **noisemap) |
cpl_frame * | xsh_create_master_dark (cpl_frame *bpMap, xsh_instrument *instr, cpl_parameterlist *parameters, cpl_parameterlist *drs_params, cpl_frame *crh_frm, cpl_frame *bp_map_frm) |
cpl_frame * | xsh_create_master_bias (cpl_frameset *raws, cpl_frame *frame, xsh_instrument *instr, cpl_parameterlist *parameters) |
Creates a master bias frame. | |
cpl_frame * | xsh_create_master_flat (cpl_frame *frame, xsh_instrument *instr) |
cpl_frame * | xsh_create_master_bpmap (cpl_frame *frame, xsh_instrument *instr) |
cpl_frame * | xsh_compute_linearity (cpl_frameset *, xsh_instrument *, xsh_clipping_param *) |
int | xsh_linear_group_by_exptime (cpl_frameset *, xsh_instrument *, double, cpl_frameset **) |
cpl_frame * | xsh_subtract_bias (cpl_frame *frame, cpl_frame *bias, xsh_instrument *instr, const char *type, const int pre_overscan_corr) |
Subtract the master bias frame from PRE frame. | |
cpl_frameset * | xsh_subtract_nir_on_off (cpl_frameset *on, cpl_frameset *off, xsh_instrument *instr) |
(NIR only) subtract the OFF set of files from the On set of files | |
cpl_frame * | xsh_subtract_dark (cpl_frame *frame, cpl_frame *dark, const char *filename, xsh_instrument *instr) |
subtract the master dark frame from PRE frame | |
cpl_frame * | xsh_divide_flat (cpl_frame *frame, cpl_frame *flat, const char *filename, xsh_instrument *instr) |
divide PRE frame with the master FLAT frame | |
cpl_frame * | xsh_multiply_flat (cpl_frame *frame, cpl_frame *flat, const char *filename, xsh_instrument *instr) |
multiply PRE frame with the master FLAT frame | |
cpl_frame * | xsh_subtract_background (cpl_frame *frame, cpl_frame *ordertable, xsh_background_param *bckg, xsh_instrument *instr, const char *prefix, cpl_frame **grid_frame, cpl_frame **frame_backg) |
Subtract the background from PRE frame. | |
cpl_frame * | xsh_detect_order_edge (cpl_frame *frame, cpl_frame *order_table, xsh_detect_order_param *det_param, xsh_instrument *instr) |
Detect order edges and compute polynomial description of ordermin and order max. | |
cpl_frame * | xsh_detect_continuum (cpl_frame *frame, cpl_frame *order_table, cpl_frame *spectral_format, xsh_detect_continuum_param *param, xsh_clipping_param *dcn_clipping, xsh_instrument *instr, cpl_frame **resid_frame) |
Detect order and compute polynomial description of ordermin and order max. Uses a guess order table if available. If not, tries to compute one (see function xsh_order_table_from_fmtchk). | |
cpl_frame * | xsh_order_table_from_fmtchk (xsh_pre *pre, cpl_frame *spectral_frame, xsh_detect_continuum_param *detect_param, xsh_instrument *instrument) |
void | xsh_create_map (cpl_frame *dispsol_frame, cpl_frame *ordertab_frame, cpl_frame *pre_frame, xsh_instrument *instrument, cpl_frame **wavemap_frame, cpl_frame **slitmap_frame, const char *rec_prefix) |
cpl_frame * | xsh_create_wavemap (cpl_frame *in_frame, cpl_frame *resid_frame, cpl_frame *order_frame, xsh_dispersol_param *dispersol_param, xsh_instrument *instrument) |
cpl_frame * | xsh_create_poly_wavemap (cpl_frame *pre_frame, cpl_frame *wave_tab_2d_frame, cpl_frame *order_tab_frame, cpl_frame *spectral_format_frame, xsh_dispersol_param *dispsol_par, xsh_instrument *instrument, const char *filename, cpl_frame **dispersol_frame, cpl_frame **slitmap_frame) |
void | xsh_create_model_map (cpl_frame *model_frame, xsh_instrument *instrument, const char *wave_map_tag, const char *slit_map_tag, cpl_frame **wavemap_frame, cpl_frame **slitmap_frame) |
cpl_frame * | xsh_create_order_table (cpl_frame *in_frame, cpl_frame *spectralformat_frame, cpl_frame *resid_frame, cpl_frame *arclines, xsh_detect_arclines_param *da, xsh_clipping_param *dac, xsh_instrument *instrument) |
void | xsh_detect_arclines (cpl_frame *frame, cpl_frame *theo_tab_frame, cpl_frame *arc_lines_tab_frame, cpl_frame *wave_tab_guess_frame, cpl_frame *order_tab_recov_frame, cpl_frame *config_model_frame, cpl_frame *spectralformat_frame, cpl_frame **resid_tab_orders_frame, cpl_frame **arc_lines_clean_tab_frame, cpl_frame **wave_tab_frame, cpl_frame **resid_tab_frame, xsh_sol_wavelength type, xsh_detect_arclines_param *da, xsh_clipping_param *dac, xsh_instrument *instr, const char *rec_id) |
detect the position on the detector of emission lines listed in a catalogue, from expected position values given by the Physical model. | |
void | xsh_follow_arclines_slit (cpl_frame *inframe, cpl_frame *arclines, cpl_frame *wavesol, cpl_frame *order_table, cpl_frame *spectralformat_frame, cpl_frame *model_config_frame, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, cpl_frame *disptab_frame, xsh_follow_arclines_param *param, xsh_instrument *instrument, cpl_frame **tilt_list, cpl_frame **shift_frame) |
void | xsh_follow_arclines (cpl_frame *inframe, cpl_frame *arclines, cpl_frame *wavesol, cpl_frame *order_table, cpl_frame *spectralformat_frame, cpl_frame *model_config_frame, cpl_frame *wavemap_frame, cpl_frame *disptab_frame, xsh_follow_arclines_param *param, double slit, double slit_min, double slit_max, const char *tag_id, int ifu_flag, xsh_instrument *instrument, cpl_frame **tilt_list, cpl_frame **shift_frame) |
Detect and follow arc lines. Computes center, width and tilt parameters. The position of the center of each line is computed using the wavesol table, with arguments: lambda, order and slit. lambda is taken from the arclines table, order and slit is taken from the theoretical table. | |
void | xsh_follow_arclines_ifu (cpl_frame *inframe, cpl_frame *arclines, cpl_frame *wavesol, cpl_frame *order_table, cpl_frame *spectralformat_frame, cpl_frame *model_config_frame, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, cpl_frame *disptab_frame, xsh_follow_arclines_param *follow_param, xsh_instrument *instrument, cpl_frameset *tilt_set, cpl_frame **shift_frame) |
Detect and follow arc lines. Computes center, width and tilt parameters. The position of the center of each line is computed using the wavesol table, with arguments: lambda, order and slit. lambda is taken from the arclines table, order and slit is taken from the theoretical table. | |
void | xsh_rec_slit_size (xsh_rectify_param *rectify_par, double *slit_min, int *nslit, XSH_MODE mode) |
rectify frame | |
cpl_frame * | xsh_rectify_orders (cpl_frame *sci_frame, xsh_order_list *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *disp_tab_frame, const char *res_name, const char *tag, cpl_frame **res_frame_ext, cpl_frame **res_frame_tab, int min_index, int max_index, double slit_min, int nslit, double slit_shift) |
Create a grid in wavelength with the step in lambda and slit. Steps are defined in the parameters. Lambda min and max are taken from the spectralformat list. Slit min/max are hard coded. Range orders arve given. | |
cpl_frameset * | xsh_rectify_orders_ifu (cpl_frame *sci_frame, xsh_order_list *orderlist, cpl_frameset *wavesol_frameset, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *sliceoffset_frame, cpl_frame *slitmap_frame, cpl_frameset **rec_frameset_ext, cpl_frameset **rec_frameset_tab, int min_index, int max_index, const char *rec_prefix) |
cpl_frame * | xsh_rectify (cpl_frame *sci_frame, cpl_frame *order_table_frame, cpl_frame *wavesol_frame, cpl_frame *model_config_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectral_format, cpl_frame *disp_tab_frame, const char *fname, cpl_frame **res_frame_ext, cpl_frame **res_frame_tab, const char *prefix) |
Create a grid in wavelength with the step in lambda and slit. Steps are defined in the parameters. Lambda min and max are taken from the spectralformat list. Slit min/max are hard coded. | |
cpl_frame * | shift_with_kw (cpl_frame *rec_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, const char *fname, cpl_frame **res_frame_ext, double **ref_ra, double **ref_dec, int flag) |
This function creates a structure containing for each order the shift to be applied. | |
cpl_frame * | xsh_rectify_and_shift (cpl_frame *sci_frame, cpl_frame *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectralformat_frame, cpl_frame *loc_frame, cpl_frame *loc0_frame, double *throw_shift, cpl_frame *disp_tab_frame, const char *res_name, cpl_frame **res_frame_ext, cpl_frame **res_frame_tab) |
cpl_frameset * | xsh_rectify_ifu (cpl_frame *sci_frame, cpl_frame *order_table_frame, cpl_frameset *wavesol_frame_set, cpl_frame *model_config_frame, xsh_instrument *instrument, xsh_rectify_param *rectify_par, cpl_frame *spectral_format, cpl_frame *slice_offset_frame, cpl_frame *slitmap_frame, cpl_frameset **rec_frameset_ext, cpl_frameset **rec_frameset_tab, const char *rec_prefix) |
cpl_frame * | xsh_shift_rectified (cpl_frame *rec_frame, cpl_frame *loc_frame, cpl_frame *loc0_frame, const char *file_name, xsh_combine_nod_param *combine_nod_param, xsh_rectify_param *rectif_par, xsh_instrument *instrument, cpl_frame **res_frame_ext) |
void | xsh_compute_slitlet_center (xsh_order_list *order_list, cpl_frame *slitmap_frame, double *down, double *cen, double *up, XSH_ARM arm) |
void | xsh_get_slit_edges (cpl_frame *slitmap_frame, double *sdown, double *sup, double *sldown, double *slup, xsh_instrument *instrument) |
Trace slit edges in a master flat. | |
cpl_frame * | xsh_subtract_sky_single (cpl_frame *sci_frame, cpl_frame *order_table_frame, cpl_frame *slitmap_frame, cpl_frame *wavemap_frame, cpl_frame *locTable_frame, cpl_frame *mflat_frame, cpl_frame *usr_defined_break_points_frame, xsh_instrument *instrument, int nbkpts, xsh_subtract_sky_single_param *sky_par, cpl_frame **sky_spectrum, cpl_frame **sky_spectrum_eso, const char *rec_prefix) |
Subtract the sky background for single frame. If sky_spectrum is NOT NULL it is saved as a product, of type REC. | |
cpl_frame * | xsh_save_sky_model (cpl_frame *obj_frame, cpl_frame *sub_sky_frame, const char *sky_tag, xsh_instrument *instrument) |
cpl_frame * | xsh_add_sky_model (cpl_frame *sub_sky_frame, cpl_frame *sky_frame, xsh_instrument *instrument, const char *rec_prefix) |
cpl_frame * | xsh_localize_obj (cpl_frame *sci_frame, cpl_frame *skymask_frame, xsh_instrument *instrument, xsh_localize_obj_param *loc_obj_par, xsh_slit_limit_param *slit_limit_param, const char *fname) |
Build the localization table. | |
cpl_frameset * | xsh_localize_obj_ifu (cpl_frameset *sci_frame, cpl_frame *skymask_frame, xsh_instrument *instrument, xsh_localize_obj_param *loc_obj_par, xsh_slit_limit_param *slit_limit_param) |
cpl_frame * | xsh_extract (cpl_frame *rec_frame, cpl_frame *loc_frame, xsh_instrument *instrument, xsh_extract_param *extract_par, cpl_frame **res_frame_ext, const char *rec_prefix) |
simple 1D extraction of point source like object | |
cpl_frameset * | xsh_extract_ifu (cpl_frameset *rec_frame_set, cpl_frameset *loc_frame_set, xsh_instrument *instrument, xsh_extract_param *extract_par, const char *rec_prefix) |
Loop on IFU Frames to extract simple 1D (1 per slitlet). | |
cpl_frame * | xsh_abs_remove_crh_single (cpl_frame *sci_frame, cpl_frame *wavemap_frame, xsh_instrument *instrument, xsh_remove_crh_single_param *single_par, const char *res_tag) |
cpl_frame * | xsh_remove_crh_single (cpl_frame *sci_frame, cpl_frame *wave_frame, xsh_instrument *instrument, xsh_remove_crh_single_param *single_par, const char *name) |
Remove cosmic rays from a single frame. | |
cpl_frame * | xsh_merge_ord_slitlet (cpl_frame *rec_frame, xsh_instrument *instrument, xsh_merge_param *merge_par, int slitlet, const char *rec_prefix) |
Merge orders of the rectified frame using merge parameters. | |
cpl_frame * | xsh_merge_ord (cpl_frame *sci_frame, xsh_instrument *instrument, xsh_merge_param *merge, const char *rec_prefix) |
Merge orders of the rectified frame using merge parameters. | |
cpl_frameset * | xsh_merge_ord_ifu (cpl_frameset *rec_frameset, xsh_instrument *instrument, xsh_merge_param *merge_par, const char *rec_prefix) |
Merge orders of the rectified frame using merge parameters. | |
cpl_frameset * | xsh_subtract_sky_nod (cpl_frameset *raws, xsh_instrument *instrument, int mode_fast) |
void | xsh_flat_merge_qth_d2 (cpl_frame *qth_frame, cpl_frame *qth_order_tab_frame, cpl_frame *d2_frame, cpl_frame *d2_order_tab_frame, cpl_frame *qth_bkg_frame, cpl_frame *d2_bkg_frame, cpl_frame **qth_d2_flat_frame, cpl_frame **qth_d2_bkg_frame, cpl_frame **qth_d2_order_tab_frame, xsh_instrument *instrument) |
Merge two master flat fields and order tables according the spectral format. | |
void | xsh_opt_extract (cpl_frame *sci_frame, cpl_frame *order_table_frame, cpl_frame *wavesol_frame, cpl_frame *model_frame, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, cpl_frame *loc_frame, cpl_frame *spectralformat_frame, cpl_frame *masterflat_frame, xsh_instrument *instrument, xsh_opt_extract_param *opt_extract_par, const char *rec_prefix, cpl_frame **orderext1d_frame, cpl_frame **orderoxt1d_frame) |
Create a SPECTRUM 1D from a Science frame. | |
void | xsh_opt_extract_orders (cpl_frame *sci_frame, cpl_frame *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_frame, cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, cpl_frame *loc_frame, cpl_frame *spectralformat_frame, cpl_frame *masterflat_frame, xsh_instrument *instrument, xsh_opt_extract_param *opt_extract_par, int min_index, int max_index, const char *rec_refix, cpl_frame **orderext1d_frame, cpl_frame **orderoxt1d_frame) |
Create a SPECTRUM 1D from a Science frame. | |
cpl_frame * | xsh_combine_nod (cpl_frameset *frames, xsh_combine_nod_param *param, const char *fname, xsh_instrument *instrument, cpl_frame **res_frame_ext) |
cpl_frame * | xsh_create_master_bias2 (cpl_frameset *rawFrames, xsh_instrument *instr, const char *result_name) |
Creates master bias. | |
cpl_frame * | xsh_compute_slice_dist (cpl_frameset *loc_frame_set, cpl_frame *order_tab, cpl_frame *slitmap_frame, cpl_frameset *merge_frameset, double lambda, xsh_instrument *instrument) |
cpl_frame * | xsh_format (cpl_frameset *rect_frame_set, const char *result_name, xsh_instrument *instrument, const char *rec_prefix) |
cpl_frameset * | xsh_subtract_sky_offset (cpl_frameset *object_raws, cpl_frameset *sky_raws, int nraws, xsh_instrument *instrument) |
cpl_frame * | xsh_combine_offset (cpl_frameset *rawFrames, const char *result_name, xsh_clipping_param *crh_clipping, xsh_instrument *instr, cpl_imagelist **list, cpl_image **crh_ima) |
cpl_frame * | xsh_compute_response (cpl_frame *rect_frame, cpl_frame *std_star_flux_frame, cpl_frame *atmos_ext_frame, cpl_frame *high_abs_tab_frame, xsh_instrument *instrument, double exptime) |
cpl_frame * | xsh_compute_response_ord (cpl_frame *rect_frame, cpl_frame *std_star_flux_frame, cpl_frame *atmos_ext_frame, cpl_frame *high_abs_tab_frame, xsh_instrument *instrument, double exptime) |
void | xsh_data_check_spectralformat (cpl_frame *spectralformat_frame, cpl_frame *orderlist_frame, cpl_frame *wavesol_frame, cpl_frame *model_config, xsh_instrument *instr) |
Check the borders of wavelength foreach orders in spectral format. | |
cpl_error_code | xsh_wavemap_qc (cpl_frame *frm_map, const cpl_frame *frm_tab) |
Monitor Flux level along the orders traces given by an input table. | |
cpl_error_code | xsh_wavetab_qc (cpl_frame *frm_tab, const int is_poly) |
Monitor min/max/med/avg distance between detected lines on each ordee. | |
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) |
Create a The tab for AFC. | |
cpl_frameset * | xsh_ifu_wavetab_create (cpl_frame *wave_tab_frame, cpl_frame *shift_tab_frame, xsh_instrument *instr) |
Create an IFU wave tab frame set. | |
cpl_frame * | xsh_calibrate_flux (cpl_frame *spectrum_frame, cpl_frame *respon_frame, cpl_frame *atmos_ext_frame, const char *fname, xsh_instrument *instrument) |
cpl_frame * | xsh_create_dispersol_physmod (cpl_frame *pre_frame, cpl_frame *order_tab_frame, cpl_frame *mod_cfg_frame, cpl_frame *wave_map_frame, cpl_frame *slit_map_frame, xsh_dispersol_param *dispsol_param, cpl_frame *spectral_format_frame, xsh_instrument *instrument) |
#define WAVELENGTH_PRECISION 0.00001 |
Definition at line 179 of file xsh_drl.h.
Referenced by theo_tab_filter(), xsh_arclist_clean_from_list(), xsh_the_map_lambda_order_slit_compare(), xsh_the_map_load(), and xsh_vector_interpolate_linear().
#define XSH_DETECT_ARCLINES_MODE_CORRECTED 1 |
Definition at line 217 of file xsh_drl.h.
Referenced by xsh_detect_arclines().
#define XSH_DETECT_ARCLINES_MODE_NORMAL 0 |
Definition at line 216 of file xsh_drl.h.
Referenced by xsh_detect_arclines().
#define XSH_DETECT_ARCLINES_MODE_RECOVER 2 |
Definition at line 218 of file xsh_drl.h.
Referenced by xsh_detect_arclines().
#define XSH_DETECT_ARCLINES_TYPE_MODEL 1 |
Definition at line 215 of file xsh_drl.h.
Referenced by xsh_detect_arclines(), and xsh_resid_tab_load().
#define XSH_DETECT_ARCLINES_TYPE_POLY 0 |
Definition at line 214 of file xsh_drl.h.
Referenced by main(), xsh_detect_arclines(), xsh_resid_tab_load(), xsh_resid_tab_log(), and xsh_resid_tab_save().
#define XSH_DIVIDE_FLAT_THRESH 1e-10 |
Definition at line 140 of file xsh_drl.h.
Referenced by xsh_divide_flat().
#define XSH_MATH_SQRT_2 1.4142135623730951 |
Definition at line 474 of file xsh_drl.h.
Referenced by xsh_image_create_gaussian_image().
#define XSH_MULTIPLY_FLAT_THRESH 1e+30 |
Definition at line 144 of file xsh_drl.h.
Referenced by xsh_multiply_flat().
#define XSH_RECTIFY_TYPE_MODEL 1 |
Definition at line 360 of file xsh_drl.h.
Referenced by xsh_rectify_orders().
#define XSH_RECTIFY_TYPE_POLY 0 |
Definition at line 359 of file xsh_drl.h.
Referenced by xsh_rectify_orders().
enum xsh_sol_wavelength |
cpl_frame* xsh_compute_noise_map | ( | cpl_imagelist * | , | |
cpl_frame * | bpmap, | |||
xsh_clipping_param * | , | |||
xsh_instrument * | instr, | |||
cpl_frame ** | noisemap | |||
) |
cpl_frame* xsh_compute_response | ( | cpl_frame * | spectrum_frame, | |
cpl_frame * | flux_std_star_cat_frame, | |||
cpl_frame * | atmos_ext_frame, | |||
cpl_frame * | high_abs_frame, | |||
xsh_instrument * | instrument, | |||
double | exptime | |||
) |
Compute the instrument response using the rectified frame and the Standard star flux frame. The input should include also the Master Response Function and the Athmospheric Extinction Curve. Also should be produced the Efficiency frame.
spectrum_frame | Rectified frame (1D spectrum) | |
flux_std_star_cat_frame | Standard star flux catalog frame | |
atmos_ext_frame | Atmospheric Extinction Frame | |
instrument | Instrument strcture | |
exptime | Exposure time |
< computed response frame
< Std star flux
< 1d spectrum
< 1d spectrum
Definition at line 945 of file xsh_compute_response.c.
References check, check_msg, do_compute(), INTERPOL_WSTEP_NM, STAR_MATCH_DEPSILON, XSH_ARM_NIR, XSH_ASSURE_NOT_NULL, xsh_atmos_ext_list_free(), xsh_atmos_ext_list_load(), xsh_fill_high_abs_regions(), xsh_frame_product(), xsh_frame_sci_get_ra_dec_airmass(), xsh_free_frame(), xsh_free_propertylist(), xsh_free_table(), xsh_instrument_arm_tostring(), xsh_instrument_get_arm(), xsh_instrument_mode_tostring(), xsh_msg, xsh_parse_catalog_std_stars(), xsh_pfits_get_cdelt1(), xsh_pfits_get_crval1(), xsh_pfits_get_gain(), xsh_pfits_get_naxis1(), xsh_spectrum_free(), xsh_spectrum_interpolate_linear(), xsh_spectrum_load(), xsh_spectrum_resample(), xsh_spectrum_save(), xsh_star_flux_list_free(), xsh_star_flux_list_load(), and xsh_star_flux_list_save().
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), and xsh_util_integrate().
cpl_frame* xsh_compute_response_ord | ( | cpl_frame * | spectrum_frame, | |
cpl_frame * | flux_std_star_cat_frame, | |||
cpl_frame * | atmos_ext_frame, | |||
cpl_frame * | high_abs_win_frame, | |||
xsh_instrument * | instrument, | |||
double | exptime | |||
) |
Compute the instrument response using the rectified frame and the Standard star flux frame. The input should include also the Master Response Function and the Athmospheric Extinction Curve. Also should be produced the Efficiency frame.
spectrum_frame | Rectified frame (1D spectrum) | |
flux_std_star_cat_frame | Standard star flux catalog frame | |
atmos_ext_frame | Atmospheric Extinction Frame | |
instrument | Instrument strcture | |
exptime | Exposure time |
< computed response frame
< Std star flux
< 1d spectrum
< 1d spectrum
Definition at line 1124 of file xsh_compute_response.c.
References check, check_msg, do_compute(), INTERPOL_WSTEP_NM, STAR_MATCH_DEPSILON, XSH_ARM_NIR, XSH_ASSURE_NOT_NULL, xsh_atmos_ext_list_free(), xsh_atmos_ext_list_load(), xsh_fill_high_abs_regions(), xsh_frame_product(), xsh_frame_sci_get_ra_dec_airmass(), xsh_free_frame(), xsh_free_propertylist(), xsh_free_table(), xsh_instrument_arm_tostring(), xsh_instrument_get_arm(), xsh_instrument_mode_tostring(), xsh_msg, xsh_parse_catalog_std_stars(), xsh_pfits_get_cdelt1(), xsh_pfits_get_crval1(), xsh_pfits_get_gain(), xsh_pfits_get_naxis1(), xsh_spectrum_free(), xsh_spectrum_interpolate(), xsh_spectrum_load_order(), xsh_spectrum_save_order(), xsh_star_flux_list_free(), xsh_star_flux_list_load(), and xsh_star_flux_list_save_order().
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), and xsh_util_compute_response().
void xsh_compute_slitlet_center | ( | xsh_order_list * | order_list, | |
cpl_frame * | slitmap_frame, | |||
double * | down, | |||
double * | cen, | |||
double * | up, | |||
XSH_ARM | arm | |||
) |
cpl_frame* xsh_create_dispersol_physmod | ( | cpl_frame * | pre_frame, | |
cpl_frame * | order_tab_frame, | |||
cpl_frame * | mod_cfg_frame, | |||
cpl_frame * | wave_map_frame, | |||
cpl_frame * | slit_map_frame, | |||
xsh_dispersol_param * | dispsol_param, | |||
cpl_frame * | spectral_format_frame, | |||
xsh_instrument * | instrument | |||
) |
Definition at line 359 of file xsh_create_wavemap.c.
References xsh_spectralformat::absorder, xsh_instrument::binx, binx, xsh_instrument::biny, biny, check, xsh_spectralformat::lambda_max_full, xsh_spectralformat::lambda_min_full, lambda_step, xsh_spectralformat_list::list, xsh_spectralformat_list::size, size, slit_step, x, XSH_ASSURE_NOT_ILLEGAL_MSG, XSH_ASSURE_NOT_NULL_MSG, xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, XSH_FREE, xsh_free_image(), xsh_instrument_arm_tostring(), xsh_instrument_get_binx(), xsh_instrument_get_biny(), XSH_MALLOC, xsh_model_binxy(), xsh_model_config_load_best(), xsh_model_get_xy(), xsh_msg, xsh_msg_dbg_medium, xsh_pre_free(), xsh_pre_load(), xsh_spectralformat_list_free(), xsh_spectralformat_list_load(), xsh_wavemap_list_compute_poly(), xsh_wavemap_list_create(), xsh_wavemap_list_free(), xsh_wavemap_list_save_poly(), and y.
Referenced by xsh_2dmap(), and xsh_flexcomp().
void xsh_create_map | ( | cpl_frame * | dispsol_frame, | |
cpl_frame * | ordertab_frame, | |||
cpl_frame * | pre_frame, | |||
xsh_instrument * | instrument, | |||
cpl_frame ** | wavemap_frame, | |||
cpl_frame ** | slitmap_frame, | |||
const char * | rec_prefix | |||
) |
Definition at line 77 of file xsh_create_wavemap.c.
References check, XSH_ASSURE_NOT_NULL, xsh_dispersol_list_free(), xsh_dispersol_list_load(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), XSH_GET_TAG_FROM_ARM, xsh_pre_free(), xsh_pre_load(), XSH_SLIT_MAP_POLY, and XSH_WAVE_MAP_POLY.
Referenced by main(), xsh_check_get_map(), xsh_geom_ifu(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), and xsh_slit_stare_get_maps().
void xsh_create_model_map | ( | cpl_frame * | model_frame, | |
xsh_instrument * | instrument, | |||
const char * | wave_map_tag, | |||
const char * | slit_map_tag, | |||
cpl_frame ** | wavemap_frame, | |||
cpl_frame ** | slitmap_frame | |||
) |
Definition at line 126 of file xsh_create_wavemap.c.
References xsh_instrument::binx, xsh_instrument::biny, check, XSH_ASSURE_NOT_NULL, xsh_model_binxy(), xsh_model_config_load_best(), and xsh_model_maps_create().
Referenced by main(), xsh_2dmap(), xsh_check_get_map(), xsh_flexcomp(), xsh_geom_ifu(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_slit_stare_get_maps(), xsh_util_physmod(), and xsh_wavecal().
cpl_frame* xsh_create_order_table | ( | cpl_frame * | in_frame, | |
cpl_frame * | spectralformat_frame, | |||
cpl_frame * | resid_frame, | |||
cpl_frame * | arclines, | |||
xsh_detect_arclines_param * | da, | |||
xsh_clipping_param * | dac, | |||
xsh_instrument * | instrument | |||
) |
Definition at line 74 of file xsh_create_order_table.c.
References xsh_order::cenpoly, check, data_order_compare(), xsh_order::endy, xsh_resid_tab::header, xsh_spectralformat_list::list, xsh_order_list::list, xsh_detect_arclines_param::mode_iterative, xsh_pre::ny, xsh_detect_arclines_param::ordertab_deg_y, xsh_order_list::size, size, xsh_order::starty, xsh_add_temporary_file(), xsh_arclist_free(), xsh_arclist_get_size(), xsh_arclist_load(), XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, XSH_FREE, xsh_free_table(), XSH_GET_TAG_FROM_ARM, xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_order_list_create(), xsh_order_list_fit(), xsh_order_list_free(), xsh_order_list_get_header(), xsh_order_list_save(), XSH_ORDER_TAB_GUESS, xsh_pfits_get_date(), xsh_pfits_set_qc(), xsh_pfits_set_qc_nlinecat(), xsh_pfits_set_qc_nlinefound(), xsh_pre_free(), xsh_pre_load(), XSH_QC_MODEL_FMTCHK_DATE, xsh_reindex(), xsh_resid_tab_free(), xsh_resid_tab_get_lambda_data(), xsh_resid_tab_get_order_data(), xsh_resid_tab_get_size(), xsh_resid_tab_get_thpre_x_data(), xsh_resid_tab_get_thpre_y_data(), xsh_resid_tab_get_xgauss_data(), xsh_resid_tab_get_ygauss_data(), xsh_resid_tab_load(), xsh_sort(), xsh_spectralformat_list_free(), xsh_spectralformat_list_load(), XSH_SPECTRALFORMAT_TABLE_COLNAME_XMIN, xsh_spectralformat::ymax, and xsh_spectralformat::ymin.
Referenced by xsh_predict().
cpl_frame* xsh_create_poly_wavemap | ( | cpl_frame * | pre_frame, | |
cpl_frame * | wave_tab_2d_frame, | |||
cpl_frame * | order_tab_frame, | |||
cpl_frame * | spectral_format_frame, | |||
xsh_dispersol_param * | dispsol_par, | |||
xsh_instrument * | instrument, | |||
const char * | filename, | |||
cpl_frame ** | dispersol_frame, | |||
cpl_frame ** | slitmap_frame | |||
) |
Definition at line 195 of file xsh_create_wavemap.c.
References xsh_spectralformat::absorder, binx, biny, check, xsh_spectralformat::lambda_max_full, xsh_spectralformat::lambda_min_full, lambda_step, xsh_spectralformat_list::list, xsh_wavesol::max_lambda, xsh_wavesol::max_order, xsh_wavesol::max_slit, xsh_wavesol::min_lambda, xsh_wavesol::min_order, xsh_wavesol::min_slit, xsh_spectralformat_list::size, size, slit_step, x, xsh_add_temporary_file(), XSH_ASSURE_NOT_ILLEGAL_MSG, XSH_ASSURE_NOT_NULL, xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, XSH_FREE, XSH_GET_TAG_FROM_ARM, xsh_instrument_get_binx(), xsh_instrument_get_biny(), XSH_MALLOC, xsh_msg, xsh_msg_dbg_medium, xsh_pre_free(), xsh_pre_load(), XSH_SLIT_MAP_POLY, xsh_spectralformat_list_free(), xsh_spectralformat_list_load(), xsh_wavemap_list_compute(), xsh_wavemap_list_compute_poly(), xsh_wavemap_list_create(), xsh_wavemap_list_free(), xsh_wavemap_list_save_poly(), xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_free(), xsh_wavesol_load(), xsh_wavesol_set_bin_x(), xsh_wavesol_set_bin_y(), and y.
Referenced by xsh_2dmap(), and xsh_flexcomp().
cpl_frame* xsh_create_wavemap | ( | cpl_frame * | in_frame, | |
cpl_frame * | resid_frame, | |||
cpl_frame * | order_frame, | |||
xsh_dispersol_param * | dispersol_param, | |||
xsh_instrument * | instrument | |||
) |
cpl_error_code xsh_wavemap_qc | ( | cpl_frame * | frm_map, | |
const cpl_frame * | frm_tab | |||
) |
Monitor Flux level along the orders traces given by an input table.
frm_map | The input frame image whose flux is to be monitored | |
frm_tab | input frame table with order traces |
Definition at line 552 of file xsh_create_wavemap.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_image(), xsh_free_propertylist(), xsh_free_table(), XSH_QC_WMAP_WAVEC, and xsh_update_pheader_in_image_multi().
Referenced by xsh_2dmap().
cpl_error_code xsh_wavetab_qc | ( | cpl_frame * | frm_tab, | |
const int | is_poly | |||
) |
Monitor min/max/med/avg distance between detected lines on each ordee.
frm_tab | input frame table with order traces | |
is_poly | data reduction method |
Definition at line 630 of file xsh_create_wavemap.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_propertylist(), xsh_free_table(), xsh_free_vector(), xsh_msg_warning, XSH_QC_LINE_DIFAVG, XSH_QC_LINE_DIFAVG_C, XSH_QC_LINE_DIFMAX, XSH_QC_LINE_DIFMAX_C, XSH_QC_LINE_DIFMAX_ORD, XSH_QC_LINE_DIFMED, XSH_QC_LINE_DIFMED_C, XSH_QC_LINE_DIFMIN, XSH_QC_LINE_DIFMIN_C, and XSH_QC_LINE_DIFMIN_ORD.
Referenced by xsh_2dmap(), and xsh_predict().