Arc Lines Detection (xsh_detect_arclines)
[DRL Functions]

Functions

static void theo_tab_filter (xsh_the_map *the_tab, xsh_arclist *arclist, int *size, double **lambda, double **n, double **s, int **s_index, double **xthe, double **ythe, int nb_pinhole)
static void theo_tab_model (xsh_xs_3 *config_model, xsh_arclist *arclist, xsh_spectralformat_list *spectralformat_list, int *size, double **lambda, double **n, double **s, double **sn, int **s_index, double **xthe, double **ythe, xsh_instrument *instr, int nb_pinhole)
static void data_wavesol_fit_with_sigma (xsh_wavesol *wavesol, double *A, double *lambda, double *n, double *s, int size, int max_iter, double min_frac, double sigma, int *rejected)
static int lines_filter_by_sn (xsh_pre *pre, double sn_ref, double x, double y, double *sn)
void xsh_detect_arclines_dan (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 solwave_type, xsh_detect_arclines_param *da, xsh_clipping_param *dac, xsh_instrument *instr, const char *rec_id, const int clean_tmp, const int resid_tab_name_sw)
 detect the position on the detector of emission lines listed in a catalogue, from expected position values given by the Physical model.
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 solwave_type, xsh_detect_arclines_param *da, xsh_clipping_param *dac, xsh_instrument *instr, const char *rec_id, const int clean_tmp, const int resid_tab_name_sw)
 detect the position on the detector of emission lines listed in a catalogue, from expected position values given by the Physical model.

Detailed Description

Functions used to detect the position on the detector of emission lines listed in a catalogue (recipe xsh_2dmap)


Function Documentation

static void data_wavesol_fit_with_sigma ( xsh_wavesol wavesol,
double *  A,
double *  lambda,
double *  n,
double *  s,
int  size,
int  max_iter,
double  min_frac,
double  sigma,
int *  rejected 
) [static]
static int lines_filter_by_sn ( xsh_pre pre,
double  sn_ref,
double  x,
double  y,
double *  sn 
) [static]
static void theo_tab_filter ( xsh_the_map the_tab,
xsh_arclist arclist,
int *  size,
double **  lambda,
double **  n,
double **  s,
int **  s_index,
double **  xthe,
double **  ythe,
int  nb_pinhole 
) [static]
static void theo_tab_model ( xsh_xs_3 config_model,
xsh_arclist arclist,
xsh_spectralformat_list spectralformat_list,
int *  size,
double **  lambda,
double **  n,
double **  s,
double **  sn,
int **  s_index,
double **  xthe,
double **  ythe,
xsh_instrument instr,
int  nb_pinhole 
) [static]
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  solwave_type,
xsh_detect_arclines_param da,
xsh_clipping_param dac,
xsh_instrument instr,
const char *  rec_id,
const int  clean_tmp,
const int  resid_tab_name_sw 
)

detect the position on the detector of emission lines listed in a catalogue, from expected position values given by the Physical model.

Parameters:
[in] frame The data frame in which we detect arclines
[in] theo_tab_frame The theoretical map contains expected positions of lines on the detector (POLYNOMIAL mode) or NULL
[in] arc_lines_tab_frame List of emission lines to be used for the calibration
[in] wave_tab_guess_frame Polynomial coefficients for the dispersion equation of the single pin hole image or NULL (POLYNOMIAL ITERATIVE mode) or NULL
[in] order_tab_recov_frame Order table frame indicates X = f(Y) or NULL (POLYNOMIAL RECOVER mode) or NULL
[in] config_model_frame Configuration model file (MODEL mode) or NULL
[in] spectralformat_frame Spectral format file (MODEL mode) or NULL
[out] resid_tab_orders_frame Residual of the lines filtering
[out] arc_lines_clean_tab_frame List of emission lines effectively used in the calibration. Non reliable lines have been discarded.
[out] wave_tab_frame Polynomial coefficients for the dispersion equation
[out] resid_tab_frame Residual of the modeled 2D mapping
[in] solwave_type Type of product wavelength solution
[in] da Detect_arclines recipe parameters
[in] dac Detect_arclines clipping parameters
[in] instr Instrument containing the arm, mode and lamp in use
[in] rec_id recipe id

Definition at line 1405 of file xsh_detect_arclines.c.

References xs_3::arm, assure, xsh_wavesol::bin_x, xsh_wavesol::bin_y, xsh_order::cenpoly, check, check_msg, xsh_pre::data, xsh_pre::data_header, data_wavesol_fit_with_sigma(), xsh_pre::errs, xsh_detect_arclines_param::find_center_method, xsh_detect_arclines_param::fit_window_hsize, xsh_clipping_param::frac, lines_filter_by_sn(), xsh_order_list::list, xsh_wavesol::max_x, xsh_detect_arclines_param::min_sn, xsh_wavesol::min_x, xsh_arclist::nbrejected, xsh_clipping_param::niter, xsh_pre::nx, xsh_pre::ny, order, xsh_detect_arclines_param::running_median_hsize, xsh_detect_arclines_param::search_window_hsize, xsh_clipping_param::sigma, xsh_arclist::size, theo_tab_filter(), theo_tab_model(), x, xsh_add_temporary_file(), XSH_AFC_ATT, XSH_AFC_CAL, XSH_ARC_LINE_LIST_2DMAP, XSH_ARC_LINE_LIST_PREDICT, xsh_arclist_clean_from_list(), xsh_arclist_free(), xsh_arclist_get_header(), xsh_arclist_get_size(), xsh_arclist_lambda_sort(), xsh_arclist_load(), xsh_arclist_save(), XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_ILLEGAL_MSG, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_debug_level_get(), XSH_DEBUG_LEVEL_HIGH, XSH_DETECT_ARCLINES_MODE_CORRECTED, XSH_DETECT_ARCLINES_MODE_NORMAL, XSH_DETECT_ARCLINES_MODE_RECOVER, XSH_DETECT_ARCLINES_TYPE_MODEL, XSH_DETECT_ARCLINES_TYPE_POLY, xsh_error_reset, XSH_FREE, xsh_free_propertylist(), xsh_free_table(), XSH_GAUSSIAN_METHOD, XSH_GET_TAG_FROM_ARM, xsh_image_find_barycenter(), xsh_instrument_arm_tostring(), XSH_MALLOC, XSH_MOD_CFG_TAB, xsh_model_config_load_best(), xsh_model_temperature_update_frame(), xsh_model_temperature_update_structure(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_order_list_free(), xsh_order_list_get_index_by_absorder(), xsh_order_list_load(), xsh_pfits_get_dpr_type(), xsh_pfits_get_nb_pinhole(), xsh_pfits_set_pcatg(), xsh_pfits_set_qc_nlinecat(), xsh_pfits_set_qc_nlinecat_clean(), xsh_pfits_set_qc_nlinefound(), xsh_pfits_set_qc_nlinefound_clean(), xsh_pre_free(), xsh_pre_load(), xsh_pre_window_best_median_flux_pos(), XSH_REGDEBUG, xsh_resid_tab_create(), xsh_resid_tab_free(), xsh_resid_tab_save(), XSH_SOLUTION_RELATIVE, xsh_spectralformat_list_free(), xsh_spectralformat_list_load(), xsh_the_map_free(), xsh_the_map_lambda_order_slit_sort(), xsh_the_map_load(), xsh_unwrap_vector(), XSH_WAVE_TAB_2D, XSH_WAVE_TAB_GUESS, XSH_WAVESOL_2D, xsh_wavesol_compute(), xsh_wavesol_create(), xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_free(), xsh_wavesol_get_header(), xsh_wavesol_get_polx(), XSH_WAVESOL_GUESS, xsh_wavesol_load(), xsh_wavesol_save(), xsh_wavesol_set_type(), xsh_wavesol_trace(), and y.

Referenced by xsh_2dmap(), and xsh_flexcomp().

void xsh_detect_arclines_dan ( 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  solwave_type,
xsh_detect_arclines_param da,
xsh_clipping_param dac,
xsh_instrument instr,
const char *  rec_id,
const int  clean_tmp,
const int  resid_tab_name_sw 
)

detect the position on the detector of emission lines listed in a catalogue, from expected position values given by the Physical model.

Parameters:
[in] frame The data frame in which we detect arclines
[in] theo_tab_frame The theoretical map contains expected positions of lines on the detector (POLYNOMIAL mode) or NULL
[in] arc_lines_tab_frame List of emission lines to be used for the calibration
[in] wave_tab_guess_frame Polynomial coefficients for the dispersion equation of the single pin hole image or NULL (POLYNOMIAL ITERATIVE mode) or NULL
[in] order_tab_recov_frame Order table frame indicates X = f(Y) or NULL (POLYNOMIAL RECOVER mode) or NULL
[in] config_model_frame Configuration model file (MODEL mode) or NULL
[in] spectralformat_frame Spectral format file (MODEL mode) or NULL
[out] resid_tab_orders_frame Residual of the lines filtering
[out] arc_lines_clean_tab_frame List of emission lines effectively used in the calibration. Non reliable lines have been discarded.
[out] wave_tab_frame Polynomial coefficients for the dispersion equation
[out] resid_tab_frame Residual of the modeled 2D mapping
[in] solwave_type Type of product wavelength solution
[in] da Detect_arclines recipe parameters
[in] dac Detect_arclines clipping parameters
[in] instr Instrument containing the arm, mode and lamp in use
[in] rec_id recipe id

Definition at line 507 of file xsh_detect_arclines.c.

References xs_3::arm, assure, xsh_wavesol::bin_x, xsh_wavesol::bin_y, xsh_order::cenpoly, check, check_msg, xsh_pre::data, xsh_pre::data_header, data_wavesol_fit_with_sigma(), xsh_detect_arclines_param::find_center_method, xsh_detect_arclines_param::fit_window_hsize, xsh_clipping_param::frac, lines_filter_by_sn(), xsh_order_list::list, xsh_wavesol::max_x, xsh_detect_arclines_param::min_sn, xsh_wavesol::min_x, xsh_arclist::nbrejected, xsh_clipping_param::niter, xsh_pre::nx, xsh_pre::ny, order, xsh_detect_arclines_param::running_median_hsize, xsh_detect_arclines_param::search_window_hsize, xsh_clipping_param::sigma, xsh_arclist::size, theo_tab_filter(), theo_tab_model(), x, xsh_add_temporary_file(), XSH_AFC_ATT, XSH_AFC_CAL, XSH_ARC_LINE_LIST_2DMAP, XSH_ARC_LINE_LIST_PREDICT, xsh_arclist_clean_from_list_not_flagged(), xsh_arclist_free(), xsh_arclist_get_header(), xsh_arclist_get_size(), xsh_arclist_lambda_sort(), xsh_arclist_load(), xsh_arclist_save(), XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_ILLEGAL_MSG, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_DETECT_ARCLINES_MODE_CORRECTED, XSH_DETECT_ARCLINES_MODE_NORMAL, XSH_DETECT_ARCLINES_MODE_RECOVER, XSH_DETECT_ARCLINES_TYPE_MODEL, XSH_DETECT_ARCLINES_TYPE_POLY, xsh_error_reset, XSH_FREE, xsh_free_propertylist(), xsh_free_table(), XSH_GAUSSIAN_METHOD, XSH_GET_TAG_FROM_ARM, xsh_image_find_barycenter(), xsh_instrument_arm_tostring(), XSH_MALLOC, XSH_MOD_CFG_TAB, xsh_model_config_load_best(), xsh_model_temperature_update_frame(), xsh_model_temperature_update_structure(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_order_list_free(), xsh_order_list_get_index_by_absorder(), xsh_order_list_load(), xsh_pfits_get_dpr_type(), xsh_pfits_get_nb_pinhole(), xsh_pfits_set_pcatg(), xsh_pfits_set_qc_nlinecat(), xsh_pfits_set_qc_nlinecat_clean(), xsh_pfits_set_qc_nlinefound(), xsh_pfits_set_qc_nlinefound_clean(), xsh_pre_free(), xsh_pre_load(), xsh_pre_window_best_median_flux_pos(), XSH_REGDEBUG, xsh_resid_tab_create(), xsh_resid_tab_create_not_flagged(), xsh_resid_tab_free(), xsh_resid_tab_save(), XSH_SOLUTION_RELATIVE, xsh_spectralformat_list_free(), xsh_spectralformat_list_load(), xsh_the_map_free(), xsh_the_map_lambda_order_slit_sort(), xsh_the_map_load(), xsh_unwrap_array(), XSH_WAVE_TAB_2D, XSH_WAVE_TAB_GUESS, XSH_WAVESOL_2D, xsh_wavesol_compute(), xsh_wavesol_create(), xsh_wavesol_eval_polx(), xsh_wavesol_eval_poly(), xsh_wavesol_free(), xsh_wavesol_get_header(), xsh_wavesol_get_polx(), XSH_WAVESOL_GUESS, xsh_wavesol_load(), xsh_wavesol_save(), xsh_wavesol_set_type(), xsh_wavesol_trace(), and y.

Referenced by xsh_2dmap(), and xsh_predict().


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