|
X-shooter Pipeline Reference Manual 3.8.15
|
Macros | |
| #define | HAVE_INLINE 1 |
| #define | REGDEBUG_MEDIAN_SPLINE 0 |
| #define | REGDEBUG_BSPLINE 0 |
Functions | |
| static xsh_wavemap_list * | xsh_wavemap_list_new (cpl_frame *wavemap_frame, cpl_frame *slitmap_frame, xsh_localization *list, cpl_frame *order_table_frame, xsh_pre *pre_sci, int nbkpts, cpl_frame *usr_def_sampl_points, cpl_frame *ref_sky_list, cpl_frame *sky_orders_chunks, xsh_subtract_sky_single_param *sky_par, xsh_instrument *instrument) |
| static xsh_rec_list * | xsh_wavemap_list_build_sky (xsh_wavemap_list *wave_list, xsh_instrument *instr) |
| Build the sky spectrum list. | |
| static int | xsh_wave_compare (const void *un, const void *deux) |
| static cpl_frame * | xsh_wavelist_subtract_sky (xsh_pre *pre_sci, xsh_rec_list *sky_list, xsh_wavemap_list *wave_list, xsh_instrument *instrument, const char *rec_prefix, xsh_subtract_sky_single_param *sky_par) |
| subtract sky | |
| static cpl_table * | xsh_table_unique_wave (cpl_table *tab, const char *wname, const char *fname) |
| static cpl_table * | xsh_model_to_table (const xsh_wavemap_list *wlist, const int order) |
| determines sky outliers on a 1D spectrum via kappa-sigma clipping | |
| static cpl_error_code | xsh_table_column_smooth (cpl_table **tab, const char *name_i, const char *name_o, const int hsize) |
| determines sky outliers on a 1D spectrum via kappa-sigma clipping | |
| static cpl_error_code | xsh_table_column_clip (cpl_table **tab, const char *name_d, const char *name_s, const double kappa, const int niter, const double gain, const double ron2, const int decode_bp) |
| static cpl_table * | xsh_detect_raw_data_outliers_1d (const xsh_wavemap_list *wlist, const int hsize, const double ron2, const double gain, const int order, const int iter, const int decode_bp) |
| determines sky outliers on a 1D spectrum via kappa-sigma clipping | |
| static cpl_table * | xsh_detect_raw_data_outliers_1d_slice (const xsh_wavemap_list *wlist, const int hsize, const double ron2, const double gain, const int order, const int iter, const int decode_bp, const double s1, const double s2, const int slice_id) |
| determines sky outliers on a 1D spectrum via kappa-sigma clipping | |
| static int | xsh_get_edge_x_min (xsh_order_list *otab, const int iorder, const int iy) |
| static int | xsh_get_edge_x_max (xsh_order_list *otab, const int iorder, const int iy) |
| static void | xsh_dump_table_on_region_file (cpl_table *tab, const char *fname, const int symbol) |
| static cpl_table * | xsh_create_sampl_table (const int iorder, double *wave_ref, const int nref, xsh_wavemap_list *wlist, const int nsampl_2, const char *prefix) |
| static cpl_table * | xsh_create_sampl_uniform_continuum (const int iorder, xsh_wavemap_list *wlist, const int nsampl, const char *prefix) |
| static cpl_error_code | xsh_wavemap_list_rms_sky_image_save (xsh_wavemap_list *smap, const double ron2, const double gain, xsh_instrument *instr, const int iter) |
| static double | xsh_skycorr_rms (xsh_wavemap_list *wlist, const int iorder, const double ron2, const double gain) |
| static cpl_table * | xsh_table_unique_column (cpl_table *tab_inp, const char *col_wav) |
| static cpl_table * | xsh_skycorr_sample_continuum (xsh_wavemap_list *wlist, const int ord, const int n) |
| static cpl_table * | xsh_skycorr_sampl_lines_from_static_tab (xsh_wavemap_list *wlist, const cpl_table *tab_ord, const int ord) |
| static cpl_table * | xsh_model2tab (xsh_wavemap_list *wlist, int order) |
| static cpl_table * | xsh_skycorr_wave_sampling_create (xsh_wavemap_list *wlist, const int ord, const int nbkpts_ord, const cpl_table *bkpts_tab) |
| static cpl_table * | xsh_detect_outliers_thres_new (xsh_wavemap_list *wlist, const double kappa2, const double ron2, const double gain, const int order, const int iter, cpl_table **tab_line_res) |
| static cpl_error_code | xsh_model_fill_fit (xsh_wavemap_list *wlist, const int order, cpl_table *stab, const float ron2, const float gain) |
| static cpl_error_code | xsh_model_fill_obj (xsh_wavemap_list *wlist, const int order, const double s1, const double s2, cpl_table *stab, const float ron2, const float gain) |
| static cpl_error_code | xsh_model_fill_fit_bfit (xsh_wavemap_list *wlist, const int order, cpl_table *stab, const float ron2, const float gain) |
| static cpl_error_code | xsh_model_fill_fit_slice (xsh_wavemap_list *wlist, const int order, const double s1, const double s2, cpl_table *stab, const float ron2, const float gain) |
| static cpl_error_code | xsh_model_fill_fit_slice_bfit (xsh_wavemap_list *wlist, const int order, const double s1, const double s2, cpl_table *stab, const float ron2, const float gain) |
| static void | test_gsl_example (double *data_x, double *data_y, double *data_e, double *yfit, const int i_start, const size_t n, const size_t ncoeffs) |
| static void | xsh_gsl_bspline_non_uniform (double *data_x, double *data_y, double *data_e, double *bkpts, double *yfit, const int i_start, const size_t n, const size_t ncoeffs) |
| cpl_error_code | xsh_bspline_smooth_uniform_sl (cpl_table **tab, xsh_instrument *instrument, const double s1, const double s2) |
| cpl_error_code | xsh_bspline_smooth_uniform (cpl_table **tab, xsh_instrument *instrument) |
| static cpl_error_code | xsh_bspline_smooth_non_uniform2 (cpl_table *bkpts, cpl_frame *sky_orders_chunks, cpl_table **tab, const int iorder, xsh_instrument *instrument) |
| static cpl_table * | xsh_fit_spline1 (xsh_wavemap_list *wlist, int order, cpl_table *sampl_tab, cpl_frame *sky_orders_chunks, int sampl_pts_no, int iter_no, xsh_subtract_sky_single_param *sky_par, float ron2, float gain, cpl_table **tab_line_res) |
| This routine performs the B-SPLINE fit of a set of sky data non-uniformly sampled. | |
| static cpl_table * | xsh_fit_spline2 (xsh_wavemap_list *wlist, int order, cpl_table *sampl_tab, cpl_frame *sky_orders_chunks, int sampl_pts_no, int iter_no, xsh_subtract_sky_single_param *sky_par, float ron2, float gain, cpl_table **tab_line_res) |
| This routine performs the B-SPLINE fit of a set of sky data non-uniformly sampled. | |
| static cpl_error_code | xsh_get_obj_and_sky_extraction_slits (xsh_subtract_sky_single_param *sky_par, xsh_localization *list, const double smap_min, const double smap_max, double *obj_slit_min, double *obj_slit_max, double *sky_slit_min, double *sky_slit_max) |
| static cpl_error_code | xsh_get_sky_edges_min_max_and_size (xsh_subtract_sky_single_param *sky_par, const int miny, const int maxy, const int iorder, const int order, const int nx, const int wmap_xsize_diff, xsh_order_list *ord_tab, cpl_image *slitmap, double *sky_slit_min, double *sky_slit_max, int *max_size, int *max_size_x) |
| static cpl_error_code | xsh_wavecal_list_pupulate (xsh_pre *pre_sci, const int iorder, const int miny, const int maxy, const int wmap_xsize_diff, const int decode_bp, const double obj_slit_min, const double obj_slit_max, const double sky_slit_min, const double sky_slit_max, const int order, xsh_wavemap_list *wave_list, int *sky_size, xsh_order_list *ord_tab, cpl_image *wavemap, cpl_image *slitmap) |
| static cpl_error_code | xsh_skycor_def_nbkpts_ord (const int iorder, const int nbkpts, cpl_frame *break_pts_frame, xsh_instrument *inst, int bspline_sampling_method, int *nbkpts_ord) |
| cpl_error_code | xsh_wavemap_list_full_sky_save (xsh_wavemap_list *wave_list, xsh_instrument *instr) |
| static void | xsh_obj_fit_dump (int iorder, xsh_wavemap_list *wave_list) |
| static cpl_error_code | xsh_subtract_sky_at_pix2 (const int all_size, const int sky_size, const int nx, wavemap_item *pall, wavemap_item *psky, float *pflux, float *pflat, float *perrs, int *pqual) |
| static cpl_error_code | xsh_subtract_sky_at_pix (const int sky_size, const int nx, wavemap_item *psky, float *pflux, float *pflat, float *perrs, int *pqual) |
| static cpl_error_code | xsh_subtract_sky_on_obj_at_pix (xsh_rec_list *sky_list, const int iorder, const int object_size, const int nx, wavemap_item **pobject, float *pflux, float *perrs, int *pqual) |
| 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 *loc_table_frame, cpl_frame *ref_sky_list, cpl_frame *ref_sky_orders_chunks, cpl_frame *usr_def_sampl_points, 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, const int clean_tmp) |
| 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 *subsky_frame, cpl_frame *sky_frame, xsh_instrument *instrument, const char *prefix) |
Variables | |
| double | xsh_nbkpts_uvb [XSH_ORDERS_UVB] |
| Create the wavemap list. | |
| double | xsh_nbkpts_vis [XSH_ORDERS_VIS] |
| double | xsh_nbkpts_nir [XSH_ORDERS_NIR] |
Function ...
| #define HAVE_INLINE 1 |
Definition at line 75 of file xsh_subtract_sky_single.c.
| #define REGDEBUG_BSPLINE 0 |
Definition at line 77 of file xsh_subtract_sky_single.c.
| #define REGDEBUG_MEDIAN_SPLINE 0 |
Definition at line 76 of file xsh_subtract_sky_single.c.
|
static |
| cpl_frame * xsh_add_sky_model | ( | cpl_frame * | subsky_frame, |
| cpl_frame * | sky_frame, | ||
| xsh_instrument * | instrument, | ||
| const char * | prefix | ||
| ) |
Definition at line 5818 of file xsh_subtract_sky_single.c.
References check, xsh_pre::data, instrument, xsh_free_image(), xsh_instrument_arm_tostring(), xsh_pre_free(), xsh_pre_load(), and xsh_pre_save().
Referenced by xsh_slit_stare_correct_crh_and_sky().
|
static |
Definition at line 3449 of file xsh_subtract_sky_single.c.
References xsh_instrument::arm, instrument, xsh_instrument::nir_orders_nb, xsh_instrument::uvb_orders_nb, xsh_instrument::vis_orders_nb, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_free_table(), xsh_gsl_bspline_non_uniform(), and xsh_msg.
Referenced by xsh_fit_spline1(), and xsh_fit_spline2().
| cpl_error_code xsh_bspline_smooth_uniform | ( | cpl_table ** | tab, |
| xsh_instrument * | instrument | ||
| ) |
Definition at line 3326 of file xsh_subtract_sky_single.c.
References test_gsl_example(), xsh_free_table(), and xsh_msg.
Referenced by xsh_fit_spline1(), and xsh_fit_spline2().
| cpl_error_code xsh_bspline_smooth_uniform_sl | ( | cpl_table ** | tab, |
| xsh_instrument * | instrument, | ||
| const double | s1, | ||
| const double | s2 | ||
| ) |
Definition at line 3280 of file xsh_subtract_sky_single.c.
References test_gsl_example(), xsh_free_table(), xsh_msg, and xsh_sort_table_1().
|
static |
Definition at line 1234 of file xsh_subtract_sky_single.c.
References check, wavemap_item::lambda, xsh_wavemap::lambda_min, xsh_wavemap_list::list, m, xsh_wavemap::sky, xsh_wavemap::sky_size, xsh_dump_table_on_region_file(), xsh_msg, xsh_print_rec_status(), and xsh_sort_table_3().
Referenced by xsh_skycorr_sampl_lines_from_static_tab().
|
static |
Definition at line 1467 of file xsh_subtract_sky_single.c.
References check, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_wavemap_list::list, xsh_wavemap::sky, xsh_wavemap::sky_size, xsh_msg, xsh_print_rec_status(), and xsh_sort_table_3().
Referenced by xsh_skycorr_sample_continuum().
|
static |
Definition at line 2437 of file xsh_subtract_sky_single.c.
References wavemap_item::fitted, wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, kappa, wavemap_item::lambda, xsh_wavemap_list::list, order, QFLAG_SKY_MODEL_BAD_FIT, wavemap_item::qual, wavemap_item::sigma, xsh_wavemap::sky, xsh_wavemap::sky_size, xsh_dump_table_on_region_file(), xsh_free_table(), xsh_histogram(), and xsh_msg.
Referenced by xsh_fit_spline1(), and xsh_fit_spline2().
|
static |
determines sky outliers on a 1D spectrum via kappa-sigma clipping
| [in] | wlist | i/o structure with sky data and its B-spline model info |
| [in] | hsize | median filter half window size |
| [in] | ron2 | square of RON |
| [in] | gain | gain value |
| [in] | order | extraction order (relative no) |
| [in] | iter | model iteration ID |
Definition at line 751 of file xsh_subtract_sky_single.c.
References kappa, xsh_wavemap_list::list, n, niter, order, QFLAG_SKY_MODEL_BAD_PIX, wavemap_item::qual, xsh_wavemap::sky, xsh_wavemap::sky_size, xsh_free_table(), xsh_model_to_table(), xsh_msg, xsh_msg_dbg_medium, xsh_table_column_clip(), and xsh_table_column_smooth().
Referenced by xsh_fit_spline1().
|
static |
determines sky outliers on a 1D spectrum via kappa-sigma clipping
| [in] | wlist | i/o structure with sky data and its B-spline model info |
| [in] | hsize | median filter half window size |
| [in] | ron2 | square of RON |
| [in] | gain | gain value |
| [in] | order | extraction order (relative no) |
| [in] | iter | model iteration ID |
Definition at line 847 of file xsh_subtract_sky_single.c.
References check, wavemap_item::ix, wavemap_item::iy, kappa, wavemap_item::lambda, xsh_wavemap_list::list, n, niter, order, QFLAG_SKY_MODEL_BAD_PIX, wavemap_item::qual, xsh_wavemap::sky, xsh_wavemap::sky_size, wavemap_item::slit, xsh_free_table(), xsh_model_to_table(), xsh_msg, xsh_msg_dbg_medium, xsh_table_column_clip(), and xsh_table_column_smooth().
Referenced by xsh_fit_spline2().
|
static |
Definition at line 1145 of file xsh_subtract_sky_single.c.
Referenced by xsh_create_sampl_table(), xsh_detect_outliers_thres_new(), xsh_skycorr_wave_sampling_create(), and xsh_wavemap_list_new().
|
static |
This routine performs the B-SPLINE fit of a set of sky data non-uniformly sampled.
S
| [in] | wlist | i/o structure with sky data and its B-spline model info |
| [in] | order | extraction order (relative no) |
| [in] | sampl_pts_no | number of sampling points (NOT USED: parameter to be removed) |
| [in] | iter_no | model iteration ID |
| [in] | sky_par | sky extraction parameters |
| [in] | ron2 | square of RON |
| [in] | gain | gain value |
| [out] | tab_line_res | i/o table with location of line sampling points |
Definition at line 3576 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, xsh_instrument::arm, BSPLINE_METHOD, BSPLINE_METHOD1, check, xsh_instrument::decode_bp, xsh_wavemap_list::instrument, kappa, xsh_subtract_sky_single_param::kappa, wavemap_item::lambda, xsh_wavemap_list::list, xsh_subtract_sky_single_param::median_hsize, xsh_subtract_sky_single_param::method, n, xsh_wavemap::order, order, xsh_wavemap::sky_size, XSH_ARM_UVB, xsh_bspline_interpolate_data_at_pos(), xsh_bspline_smooth_non_uniform2(), xsh_bspline_smooth_uniform(), xsh_detect_outliers_thres_new(), xsh_detect_raw_data_outliers_1d(), xsh_free_table(), xsh_model2tab(), xsh_model_fill_fit(), xsh_model_to_table(), xsh_msg, xsh_sort_table_1(), and xsh_table_unique_wave().
Referenced by xsh_wavemap_list_new().
|
static |
This routine performs the B-SPLINE fit of a set of sky data non-uniformly sampled.
S
| [in] | wlist | i/o structure with sky data and its B-spline model info |
| [in] | order | extraction order (relative no) |
| [in] | sampl_pts_no | number of sampling points (NOT USED: parameter to be removed) |
| [in] | iter_no | model iteration ID |
| [in] | sky_par | sky extraction parameters |
| [in] | ron2 | square of RON |
| [in] | gain | gain value |
| [out] | tab_line_res | i/o table with location of line sampling points |
Definition at line 4082 of file xsh_subtract_sky_single.c.
References xsh_instrument::arm, BSPLINE_METHOD2, check, xsh_instrument::decode_bp, xsh_wavemap_list::instrument, kappa, xsh_subtract_sky_single_param::kappa, wavemap_item::lambda, xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_wavemap_list::list, xsh_subtract_sky_single_param::median_hsize, xsh_subtract_sky_single_param::method, n, xsh_wavemap_list::obj_slit_max, xsh_wavemap_list::obj_slit_min, xsh_wavemap::object, xsh_wavemap::object_size, xsh_wavemap::order, order, s, xsh_wavemap::sky, xsh_wavemap::sky_size, xsh_wavemap_list::sky_slit_max, xsh_wavemap_list::sky_slit_min, XSH_ARM_UVB, xsh_bspline_interpolate_data_at_pos(), xsh_bspline_smooth_non_uniform2(), xsh_bspline_smooth_uniform(), xsh_detect_outliers_thres_new(), xsh_detect_raw_data_outliers_1d_slice(), xsh_free_table(), xsh_model_fill_fit_slice_bfit(), xsh_model_fill_obj(), xsh_msg, xsh_sort_table_1(), xsh_table_unique_wave(), xsh_wavemap_list_rms_sky_image_save(), and xsh_wavemap_list_sky_image_save().
Referenced by xsh_wavemap_list_new().
|
static |
Definition at line 1064 of file xsh_subtract_sky_single.c.
References xsh_order::edguppoly, xsh_order_list::list, and xsh_order_list_eval_int().
Referenced by xsh_get_sky_edges_min_max_and_size(), and xsh_wavecal_list_pupulate().
|
static |
Definition at line 1053 of file xsh_subtract_sky_single.c.
References xsh_order::edglopoly, xsh_order_list::list, and xsh_order_list_eval_int().
Referenced by xsh_get_sky_edges_min_max_and_size(), and xsh_wavecal_list_pupulate().
|
static |
Definition at line 4361 of file xsh_subtract_sky_single.c.
References xsh_localization::edglopoly, xsh_localization::edguppoly, xsh_subtract_sky_single_param::hheight1, xsh_subtract_sky_single_param::hheight2, xsh_subtract_sky_single_param::pos1, xsh_subtract_sky_single_param::pos2, xsh_msg, xsh_msg_dbg_medium, and xsh_msg_warning.
Referenced by xsh_wavemap_list_new().
|
static |
Definition at line 4456 of file xsh_subtract_sky_single.c.
References xsh_subtract_sky_single_param::hheight1, xsh_subtract_sky_single_param::hheight2, nx, order, xsh_subtract_sky_single_param::slit_edges_mask, XSH_ASSURE_NOT_ILLEGAL, XSH_CMP_INT, xsh_get_edge_x_max(), and xsh_get_edge_x_min().
Referenced by xsh_wavemap_list_new().
|
static |
Definition at line 3143 of file xsh_subtract_sky_single.c.
References n, sigma, x, and y.
Referenced by xsh_bspline_smooth_non_uniform2().
|
static |
Definition at line 1866 of file xsh_subtract_sky_single.c.
References xsh_instrument::decode_bp, wavemap_item::flux, xsh_wavemap_list::instrument, wavemap_item::lambda, xsh_wavemap_list::list, order, QFLAG_SATURATED_DATA, wavemap_item::qual, xsh_wavemap::sky, xsh_wavemap::sky_size, and xsh_msg.
Referenced by xsh_fit_spline1().
|
static |
Definition at line 2803 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, wavemap_item::fitted, wavemap_item::lambda, xsh_wavemap_list::list, order, xsh_wavemap::sky, and xsh_wavemap::sky_size.
Referenced by xsh_fit_spline1().
|
static |
Definition at line 2899 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, wavemap_item::fitted, wavemap_item::lambda, xsh_wavemap_list::list, order, xsh_wavemap::sky, and xsh_wavemap::sky_size.
|
static |
Definition at line 2941 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, wavemap_item::fitted, wavemap_item::lambda, xsh_wavemap_list::list, order, xsh_wavemap::sky, xsh_wavemap::sky_size, and wavemap_item::slit.
|
static |
Definition at line 2985 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, wavemap_item::fitted, wavemap_item::lambda, xsh_wavemap_list::list, order, xsh_wavemap::sky, xsh_wavemap::sky_size, and wavemap_item::slit.
Referenced by xsh_fit_spline2().
|
static |
Definition at line 2851 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, wavemap_item::fitted, wavemap_item::lambda, xsh_wavemap_list::list, order, xsh_wavemap::sky, xsh_wavemap::sky_size, and wavemap_item::slit.
Referenced by xsh_fit_spline2().
|
static |
determines sky outliers on a 1D spectrum via kappa-sigma clipping
| [in] | wlist | i/o structure with sky data and its B-spline model info |
| [in] | order | extraction order (relative no) |
Definition at line 574 of file xsh_subtract_sky_single.c.
References wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap_list::list, order, wavemap_item::qual, wavemap_item::sigma, xsh_wavemap::sky, xsh_wavemap::sky_size, and wavemap_item::slit.
Referenced by xsh_detect_raw_data_outliers_1d(), xsh_detect_raw_data_outliers_1d_slice(), and xsh_fit_spline1().
|
static |
Definition at line 5308 of file xsh_subtract_sky_single.c.
References wavemap_item::fit_err, wavemap_item::fitted, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap_list::list, xsh_wavemap::object, xsh_wavemap::object_size, xsh_wavemap::order, order, xsh_wavemap_list::size, wavemap_item::slit, xsh_debug_level_get(), and XSH_DEBUG_LEVEL_MEDIUM.
Referenced by xsh_wavelist_subtract_sky().
| cpl_frame * xsh_save_sky_model | ( | cpl_frame * | obj_frame, |
| cpl_frame * | sub_sky_frame, | ||
| const char * | sky_tag, | ||
| xsh_instrument * | instrument | ||
| ) |
Definition at line 5800 of file xsh_subtract_sky_single.c.
References instrument, and xsh_pre_frame_subtract().
Referenced by xsh_check_subtract_sky_single().
|
static |
Definition at line 4715 of file xsh_subtract_sky_single.c.
References FINE, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, XSH_ASSURE_NOT_ILLEGAL_MSG, xsh_free_table(), xsh_instrument_get_arm(), xsh_msg, xsh_nbkpts_nir, xsh_nbkpts_uvb, xsh_nbkpts_vis, XSH_ORDERS_NIR, XSH_ORDERS_UVB, and XSH_ORDERS_VIS.
Referenced by xsh_wavemap_list_new().
|
static |
Definition at line 1715 of file xsh_subtract_sky_single.c.
References xsh_instrument::decode_bp, wavemap_item::fitted, wavemap_item::flux, xsh_wavemap_list::instrument, xsh_wavemap_list::list, wavemap_item::qual, xsh_wavemap::sky, xsh_wavemap::sky_size, and xsh_msg.
Referenced by xsh_wavemap_list_new().
|
static |
Definition at line 1842 of file xsh_subtract_sky_single.c.
References xsh_create_sampl_table(), xsh_free_table(), and xsh_msg.
Referenced by xsh_skycorr_wave_sampling_create().
|
static |
Definition at line 1815 of file xsh_subtract_sky_single.c.
References xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_wavemap_list::list, n, xsh_wavemap::order, xsh_create_sampl_uniform_continuum(), and xsh_msg.
Referenced by xsh_skycorr_wave_sampling_create().
|
static |
Definition at line 2007 of file xsh_subtract_sky_single.c.
References check, xsh_wavemap_list::obj_slit_max, xsh_wavemap_list::obj_slit_min, xsh_wavemap_list::sky_slit_max, xsh_wavemap_list::sky_slit_min, XSH_ASSURE_NOT_NULL, xsh_dump_table_on_region_file(), xsh_free_table(), xsh_msg, xsh_print_rec_status(), xsh_skycorr_sampl_lines_from_static_tab(), xsh_skycorr_sample_continuum(), xsh_sort_table_3(), and xsh_table_unique_column().
Referenced by xsh_wavemap_list_new().
|
static |
Definition at line 5379 of file xsh_subtract_sky_single.c.
References wavemap_item::fit_err, wavemap_item::fitted, wavemap_item::ix, wavemap_item::iy, nx, wavemap_item::qual, x, and y.
Referenced by xsh_wavelist_subtract_sky().
|
static |
Definition at line 5339 of file xsh_subtract_sky_single.c.
References wavemap_item::fit_err, wavemap_item::fitted, wavemap_item::ix, wavemap_item::iy, nx, wavemap_item::qual, x, and y.
Referenced by xsh_wavelist_subtract_sky().
|
static |
Definition at line 5404 of file xsh_subtract_sky_single.c.
References nx, x, xsh_rec_list_get_data1(), xsh_rec_list_get_errs1(), xsh_rec_list_get_lambda(), xsh_rec_list_get_nlambda(), and y.
Referenced by xsh_wavelist_subtract_sky().
| 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 * | loc_table_frame, | ||
| cpl_frame * | ref_sky_list, | ||
| cpl_frame * | ref_sky_orders_chunks, | ||
| cpl_frame * | usr_def_sampl_points, | ||
| 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, | ||
| const int | clean_tmp | ||
| ) |
Subtract the sky background for single frame. If sky_spectrum is NOT NULL it is saved as a product, of type REC.
| [in] | sci_frame | Input Science frame after divide by flat |
| [in] | order_table_frame | Input Order Table Frame |
| [in] | slitmap_frame | Input Wavesolution frame |
| [in] | wavemap_frame | Wave map: each pixel content is the wave length |
| [in] | loc_table_frame | Localisation table (NULL if not applicable) |
| [in] | usr_defined_break_points_frame | user defined break points frame |
| [in] | instrument | Pointer to instrument description structure |
| [in] | nbkpts | Nb of break points used for Bezier Spline |
| [in] | sky_par | parameters structure to control the sky subtraction |
| [out] | sky_spectrum | The 1D supersampled observed sky spectrum [REC] |
| [out] | sky_spectrum_eso | The 1D supersampled observed sky spectrum [ESO format] |
| [in] | rec_prefix | Input recipe prefix |
Definition at line 5674 of file xsh_subtract_sky_single.c.
References check, xsh_pre::data_header, xsh_subtract_sky_single_param::gain, instrument, xsh_subtract_sky_single_param::kappa, xsh_subtract_sky_single_param::median_hsize, MEDIAN_METHOD, xsh_subtract_sky_single_param::method, xsh_subtract_sky_single_param::niter, xsh_subtract_sky_single_param::ron, SKY_METHOD_PRINT, xsh_subtract_sky_single_param::slit_edges_mask, xsh_add_temporary_file(), XSH_ARM_NIR, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL_MSG, xsh_compute_ron_nir(), xsh_free_frame(), xsh_instrument_arm_tostring(), xsh_instrument_get_arm(), xsh_localization_free(), xsh_localization_load(), xsh_msg, xsh_msg_dbg_low, xsh_msg_dbg_medium, xsh_msg_warning, xsh_pfits_get_dit(), xsh_pfits_get_gain(), xsh_pfits_get_ron(), xsh_pre_free(), xsh_pre_load(), xsh_rec_list1D_save_as_tab(), xsh_rec_list_free(), xsh_rec_list_save(), xsh_wavelist_subtract_sky(), xsh_wavemap_list_build_sky(), xsh_wavemap_list_free(), and xsh_wavemap_list_new().
Referenced by xsh_check_subtract_sky_single().
|
static |
Definition at line 664 of file xsh_subtract_sky_single.c.
References kappa, n, niter, QFLAG_SATURATED_DATA, and xsh_msg.
Referenced by xsh_detect_raw_data_outliers_1d(), and xsh_detect_raw_data_outliers_1d_slice().
|
static |
determines sky outliers on a 1D spectrum via kappa-sigma clipping
| [in] | tab | i/o table |
| [in] | name_i | input column name to be smoothed |
| [in] | name_o | output column name with smoothed values |
| [in] | hsize | median filter half window size |
Definition at line 638 of file xsh_subtract_sky_single.c.
Referenced by xsh_detect_raw_data_outliers_1d(), and xsh_detect_raw_data_outliers_1d_slice().
|
static |
Definition at line 1788 of file xsh_subtract_sky_single.c.
References check, XSH_ASSURE_NOT_NULL, and xsh_sort_table_1().
Referenced by xsh_skycorr_wave_sampling_create().
|
static |
Definition at line 103 of file xsh_subtract_sky_single.c.
References xsh_msg.
Referenced by xsh_fit_spline1(), and xsh_fit_spline2().
|
static |
Definition at line 4308 of file xsh_subtract_sky_single.c.
References wavemap_item::lambda.
Referenced by xsh_wavecal_list_pupulate().
|
static |
Definition at line 4540 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, assure, wavemap_item::fit_err, wavemap_item::fitted, wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_wavemap_list::list, nx, xsh_wavemap_list::obj_slit_max, xsh_wavemap_list::obj_slit_min, xsh_wavemap::object, xsh_wavemap::object_size, order, wavemap_item::qual, wavemap_item::sigma, xsh_wavemap::sky, xsh_wavemap::sky_size, xsh_wavemap_list::sky_slit_max, xsh_wavemap_list::sky_slit_min, wavemap_item::slit, xsh_get_edge_x_max(), xsh_get_edge_x_min(), xsh_pre_get_data(), xsh_pre_get_errs(), xsh_pre_get_nx(), xsh_pre_get_qual(), and xsh_wave_compare().
Referenced by xsh_wavemap_list_new().
|
static |
subtract sky
Definition at line 5506 of file xsh_subtract_sky_single.c.
References xsh_wavemap::all, xsh_wavemap::all_size, BSPLINE_METHOD, BSPLINE_METHOD1, BSPLINE_METHOD2, BSPLINE_METHOD3, BSPLINE_METHOD4, check, instrument, xsh_wavemap_list::list, xsh_subtract_sky_single_param::method, nx, ny, xsh_wavemap::object, xsh_wavemap::object_size, xsh_wavemap::order, order, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, XSH_ASSURE_NOT_NULL, xsh_frame_config(), xsh_instrument_arm_tostring(), xsh_msg_dbg_medium, xsh_obj_fit_dump(), xsh_pre_duplicate(), xsh_pre_free(), xsh_pre_get_data(), xsh_pre_get_errs(), xsh_pre_get_nx(), xsh_pre_get_ny(), xsh_pre_get_qual(), xsh_pre_save(), xsh_subtract_sky_at_pix(), xsh_subtract_sky_at_pix2(), xsh_subtract_sky_on_obj_at_pix(), xsh_wavemap_list_full_sky_save(), xsh_wavemap_list_object_image_save(), and xsh_wavemap_list_sky_image_save().
Referenced by xsh_subtract_sky_single().
|
static |
Build the sky spectrum list.
Definition at line 5179 of file xsh_subtract_sky_single.c.
References check, wavemap_item::fit_err, wavemap_item::fitted, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap_list::list, xsh_wavemap::order, order, wavemap_item::qual, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, wavemap_item::slit, XSH_ASSURE_NOT_NULL, xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, xsh_msg, xsh_rec_list_create_with_size(), xsh_rec_list_free(), xsh_rec_list_get_data1(), xsh_rec_list_get_errs1(), xsh_rec_list_get_lambda(), xsh_rec_list_get_qual1(), and xsh_rec_list_set_data_size().
Referenced by xsh_subtract_sky_single().
| cpl_error_code xsh_wavemap_list_full_sky_save | ( | xsh_wavemap_list * | wave_list, |
| xsh_instrument * | instr | ||
| ) |
Definition at line 5252 of file xsh_subtract_sky_single.c.
References xsh_instrument::binx, xsh_instrument::biny, check, xsh_instrument::config, wavemap_item::fitted, xsh_wavemap_list::instrument, wavemap_item::ix, wavemap_item::iy, xsh_wavemap_list::list, XSH_INSTRCONFIG::nx, nx, XSH_INSTRCONFIG::ny, ny, xsh_wavemap::object, xsh_wavemap::object_size, wavemap_item::qual, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, XSH_ASSURE_NOT_NULL, xsh_debug_level_get(), xsh_free_image(), xsh_msg, xsh_rec_list_create_with_size(), and xsh_rec_list_free().
Referenced by xsh_wavelist_subtract_sky().
|
static |
Definition at line 4776 of file xsh_subtract_sky_single.c.
References xsh_order::absorder, xsh_instrument::arm, xsh_instrument::biny, BSPLINE_METHOD, BSPLINE_METHOD1, BSPLINE_METHOD2, BSPLINE_METHOD3, BSPLINE_METHOD4, BSPLINE_METHOD5, xsh_subtract_sky_single_param::bspline_sampling, check, xsh_instrument::decode_bp, endy, xsh_order::endy, wavemap_item::fit_err, wavemap_item::fitted, xsh_subtract_sky_single_param::gain, instrument, xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_order_list::list, xsh_wavemap_list::list, xsh_subtract_sky_single_param::median_hsize, MEDIAN_METHOD, xsh_subtract_sky_single_param::method, xsh_instrument::nir_orders_nb, xsh_subtract_sky_single_param::niter, xsh_pre::nx, nx, order, xsh_subtract_sky_single_param::ron, xsh_order_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, starty, xsh_order::starty, xsh_instrument::uvb_orders_nb, xsh_instrument::vis_orders_nb, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, XSH_ASSURE_NOT_NULL, xsh_dump_table_on_region_file(), xsh_fit_spline1(), xsh_fit_spline2(), xsh_free_image(), xsh_free_table(), xsh_free_vector(), xsh_get_obj_and_sky_extraction_slits(), xsh_get_sky_edges_min_max_and_size(), xsh_instrument_get_arm(), xsh_msg, xsh_msg_dbg_medium, xsh_msg_error, xsh_order_list_free(), xsh_order_list_get_endy(), xsh_order_list_get_starty(), xsh_order_list_load(), xsh_pre_get_nx(), xsh_skycor_def_nbkpts_ord(), xsh_skycorr_rms(), xsh_skycorr_wave_sampling_create(), xsh_sort_table_1(), xsh_wavecal_list_pupulate(), xsh_wavemap_list_create(), xsh_wavemap_list_object_image_save(), xsh_wavemap_list_rms_sky_image_save(), xsh_wavemap_list_set_max_size(), and xsh_wavemap_list_sky_image_save().
Referenced by xsh_subtract_sky_single().
|
static |
Definition at line 1636 of file xsh_subtract_sky_single.c.
References xsh_instrument::binx, xsh_instrument::biny, xsh_instrument::config, wavemap_item::fitted, wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, xsh_wavemap_list::list, XSH_INSTRCONFIG::nx, XSH_INSTRCONFIG::ny, order, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, XSH_ASSURE_NOT_NULL, xsh_free_image(), xsh_msg, and XSH_PRE_DATA_TYPE.
Referenced by xsh_fit_spline2(), and xsh_wavemap_list_new().
| double xsh_nbkpts_nir[XSH_ORDERS_NIR] |
Definition at line 4354 of file xsh_subtract_sky_single.c.
Referenced by xsh_skycor_def_nbkpts_ord().
| double xsh_nbkpts_uvb[XSH_ORDERS_UVB] |
Create the wavemap list.
Definition at line 4325 of file xsh_subtract_sky_single.c.
Referenced by xsh_skycor_def_nbkpts_ord().
| double xsh_nbkpts_vis[XSH_ORDERS_VIS] |
Definition at line 4332 of file xsh_subtract_sky_single.c.
Referenced by xsh_skycor_def_nbkpts_ord().