|
X-shooter Pipeline Reference Manual 3.8.15
|
Functions | |
| void | xsh_wavemap_list_dump (xsh_wavemap_list *list, const char *fname) |
| Dump main info about a rec table (for each order of the list) | |
| xsh_wavemap_list * | xsh_wavemap_list_create (xsh_instrument *instr) |
| create an empty order list | |
| void | xsh_wavemap_list_set_max_size (xsh_wavemap_list *list, int idx, int absorder, int max_size) |
| set max size of wavemap | |
| void | xsh_wavemap_list_free (xsh_wavemap_list **list) |
| free memory associated to a wavemap_list | |
| static void | lambda_fit (double *lambda, double *xpos, double *ypos, int size, xsh_wavemap_list *wmap, xsh_dispersol_param *dispsol_param, int order) |
| void | xsh_wavemap_list_compute_poly (double *vlambda, double *vslit, double *xpos, double *ypos, int nitems, double *orders, xsh_dispersol_param *dispsol_param, xsh_wavemap_list *wmap) |
| compute a wave-map-list | |
| void | xsh_wavemap_list_compute (double *vlambda, double *xpos, double *ypos, int nitems, double *orders, xsh_dispersol_param *dispsol_param, xsh_wavemap_list *wmap) |
| compute a wave-map-list | |
| static double | xsh_wavemap_list_eval_lambda (xsh_wavemap_list *wmap, double x, double y, int ord) |
| eval the polynomial wave solution in x,y,ord | |
| cpl_frame * | xsh_wavemap_list_save (xsh_wavemap_list *wmap, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *prefix) |
| cpl_error_code | xsh_wavemap_list_sky_image_save (xsh_wavemap_list *smap, xsh_instrument *instr, const int abs_ord, const int sid, const int iter) |
| cpl_error_code | xsh_wavemap_list_object_image_save (xsh_wavemap_list *omap, xsh_instrument *instr, const int iter) |
| cpl_error_code | xsh_wavemap_list_save4debug (xsh_wavemap_list *wmap, xsh_instrument *instr, const char *prefix) |
| cpl_frame * | xsh_wavemap_list_save2 (xsh_wavemap_list *wmap, xsh_order_list *order_list, xsh_pre *pre, xsh_instrument *instr, const char *prefix) |
| cpl_frame * | xsh_wavemap_list_save_poly (xsh_wavemap_list *wmap, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *prefix, cpl_frame **dispersol_frame, cpl_frame **slitmap_frame) |
| Save the wave_map slit_map and disp_tab. | |
|
static |
Definition at line 214 of file xsh_data_wavemap.c.
References check, xsh_dispersol_param::deg_x, xsh_dispersol_param::deg_y, xsh_wavemap_list::degx, xsh_wavemap_list::degy, xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_wavemap_list::list, xsh_wavemap::order, order, size, xsh_wavemap::tcheb_pol_lambda, xsh_wavemap::xmax, xsh_wavemap::xmin, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_ILLEGAL_MSG, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_FREE, xsh_free_vector(), xsh_msg_dbg_low, xsh_msg_dbg_medium, xsh_tools_min_max(), xsh_tools_tchebitchev_poly_eval(), xsh_tools_tchebitchev_transform_tab(), y, xsh_wavemap::ymax, and xsh_wavemap::ymin.
Referenced by xsh_wavemap_list_compute().
| void xsh_wavemap_list_compute | ( | double * | vlambda, |
| double * | xpos, | ||
| double * | ypos, | ||
| int | nitems, | ||
| double * | orders, | ||
| xsh_dispersol_param * | dispsol_param, | ||
| xsh_wavemap_list * | wmap | ||
| ) |
compute a wave-map-list
| vlambda | array with wavelength values |
| xpos | array with x positions |
| ypos | array with y positions |
| nitems | number of list sampling points |
| orders | number of orders |
| dispsol_param | structure with parameters for dispersion solution |
| wmap | wavemap @doc For each order makes a fit of lambda as a function of X,Y (tchebitchev) |
Definition at line 491 of file xsh_data_wavemap.c.
References check, xsh_dispersol_param::deg_x, xsh_dispersol_param::deg_y, lambda_fit(), xsh_wavemap_list::list, xsh_wavemap::order, xsh_wavemap_list::size, xsh_wavemap::sky_size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_FREE, XSH_MALLOC, xsh_msg, xsh_msg_dbg_high, and XSH_REGDEBUG.
Referenced by xsh_create_poly_wavemap().
| void xsh_wavemap_list_compute_poly | ( | double * | vlambda, |
| double * | vslit, | ||
| double * | xpos, | ||
| double * | ypos, | ||
| int | nitems, | ||
| double * | orders, | ||
| xsh_dispersol_param * | dispsol_param, | ||
| xsh_wavemap_list * | wmap | ||
| ) |
compute a wave-map-list
| vlambda | array with wavelength values |
| vslit | array with slit values |
| xpos | array with x positions |
| ypos | array with y positions |
| nitems | number of list sampling points |
| orders | number of orders |
| dispsol_param | structure with parameters for dispersion solution |
| wmap | wavemap @doc For each order makes a fit of lambda as a function of X,Y (tchebitchev) slit pos as a function of X,Y (tchebitchev) |
Definition at line 360 of file xsh_data_wavemap.c.
References xsh_dispersol_param::deg_x, xsh_dispersol_param::deg_y, xsh_wavemap_list::degx, xsh_wavemap_list::degy, xsh_wavemap_list::list, xsh_wavemap::order, xsh_wavemap::pol_lambda, xsh_wavemap::pol_slit, xsh_wavemap_list::size, xsh_wavemap::sky_size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_FREE, XSH_MALLOC, xsh_msg, xsh_msg_dbg_high, xsh_polynomial_fit_2d_create(), and XSH_REGDEBUG.
Referenced by xsh_create_dispersol_physmod(), and xsh_create_poly_wavemap().
| xsh_wavemap_list * xsh_wavemap_list_create | ( | xsh_instrument * | instr | ) |
create an empty order list
| instr | instrument in use |
Definition at line 102 of file xsh_data_wavemap.c.
References check, xsh_wavemap_list::header, xsh_wavemap_list::instrument, xsh_wavemap_list::list, XSH_INSTRCONFIG::orders, xsh_wavemap_list::size, size, xsh_wavemap::tcheb_pol_lambda, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_instrument_get_config(), XSH_NEW_PROPERTYLIST, and xsh_wavemap_list_free().
Referenced by xsh_create_dispersol_physmod(), xsh_create_poly_wavemap(), and xsh_wavemap_list_new().
| void xsh_wavemap_list_dump | ( | xsh_wavemap_list * | list, |
| const char * | fname | ||
| ) |
Dump main info about a rec table (for each order of the list)
| list | pointer to table list |
| fname | File name |
Definition at line 70 of file xsh_data_wavemap.c.
References xsh_wavemap_list::list, xsh_wavemap::order, xsh_wavemap_list::size, xsh_wavemap::sky_size, and XSH_ASSURE_NOT_NULL.
|
static |
eval the polynomial wave solution in x,y,ord
| wmap | polynomial wave solution |
| x | position x |
| y | position y |
| ord | order value |
Definition at line 576 of file xsh_data_wavemap.c.
References check, xsh_wavemap_list::degx, xsh_wavemap_list::degy, xsh_wavemap::lambda_max, xsh_wavemap::lambda_min, xsh_wavemap_list::list, xsh_wavemap::tcheb_pol_lambda, x, xsh_wavemap::xmax, xsh_wavemap::xmin, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_free_vector(), xsh_msg_dbg_high, xsh_tools_tchebitchev_poly_eval(), xsh_tools_tchebitchev_reverse_transform(), xsh_tools_tchebitchev_transform(), y, xsh_wavemap::ymax, and xsh_wavemap::ymin.
Referenced by xsh_wavemap_list_save(), and xsh_wavemap_list_save2().
| void xsh_wavemap_list_free | ( | xsh_wavemap_list ** | list | ) |
free memory associated to a wavemap_list
| list | the wavemap_list to free |
Definition at line 179 of file xsh_data_wavemap.c.
References xsh_wavemap::all, xsh_wavemap_list::list, xsh_wavemap::object, xsh_wavemap::order, xsh_wavemap::pol_lambda, xsh_wavemap::pol_slit, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::tcheb_pol_lambda, xsh_free_polynomial(), xsh_free_propertylist(), and xsh_msg_dbg_high.
Referenced by xsh_create_dispersol_physmod(), xsh_create_poly_wavemap(), xsh_subtract_sky_single(), and xsh_wavemap_list_create().
| cpl_error_code xsh_wavemap_list_object_image_save | ( | xsh_wavemap_list * | omap, |
| xsh_instrument * | instr, | ||
| const int | iter | ||
| ) |
Create a WaveMap Image and save it as an multi extension image
| wmap | Wavemap list |
| instr | instrument arm setting |
| iter | id |
Definition at line 872 of file xsh_data_wavemap.c.
References xsh_instrument::binx, xsh_instrument::biny, xsh_instrument::config, wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap_list::list, XSH_INSTRCONFIG::nx, XSH_INSTRCONFIG::ny, xsh_wavemap::object, xsh_wavemap::object_size, order, wavemap_item::qual, wavemap_item::sigma, xsh_wavemap_list::size, wavemap_item::slit, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_image(), XSH_PRE_DATA_BPP, XSH_PRE_DATA_TYPE, xsh_pre_free(), xsh_pre_get_data(), xsh_pre_get_errs(), xsh_pre_get_qual(), xsh_pre_new(), and xsh_pre_save().
Referenced by xsh_wavelist_subtract_sky(), and xsh_wavemap_list_new().
| cpl_frame * xsh_wavemap_list_save | ( | xsh_wavemap_list * | wmap, |
| cpl_frame * | order_frame, | ||
| xsh_pre * | pre, | ||
| xsh_instrument * | instr, | ||
| const char * | prefix | ||
| ) |
Create a WaveMap Image and save it as a frame. The wave map image is "raw" image (not a PRE !).
| wmap | Wavemap list |
| order_frame | Order table frame |
| pre | pre frame (to get frame size and header) |
| instr | instrument arm setting |
| prefix | prefix used to define Final frame file name |
Definition at line 648 of file xsh_data_wavemap.c.
References xsh_order::absorder, check, xsh_pre::data_header, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order_list::list, xsh_wavemap_list::list, xsh_pre::nx, nx, xsh_pre::ny, ny, order, xsh_wavemap_list::size, xsh_wavemap::sky_size, xsh_wavemap::tcheb_pol_lambda, x, XSH_ASSURE_NOT_NULL, xsh_error_reset, xsh_frame_product(), XSH_FREE, xsh_free_image(), xsh_free_propertylist(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_low, xsh_order_list_free(), xsh_order_list_get_endy(), xsh_order_list_get_starty(), xsh_order_list_load(), xsh_stringcat_any(), xsh_wavemap_list_eval_lambda(), and y.
| cpl_frame * xsh_wavemap_list_save2 | ( | xsh_wavemap_list * | wmap, |
| xsh_order_list * | order_list, | ||
| xsh_pre * | pre, | ||
| xsh_instrument * | instr, | ||
| const char * | prefix | ||
| ) |
Create a WaveMap Image and save it as a frame. The wave map image is "raw" image (not a PRE !).
| wmap | Wavemap list |
| order_list | Order table list |
| pre | pre frame (to get frame size and header) |
| instr | instrument arm setting |
| prefix | prefix to define Final frame file name |
Definition at line 1100 of file xsh_data_wavemap.c.
References check, xsh_pre::data_header, xsh_wavemap_list::degx, xsh_wavemap_list::degy, xsh_order::edglopoly, xsh_order::edguppoly, xsh_order_list::list, xsh_pre::nx, nx, xsh_pre::ny, ny, order, xsh_wavemap_list::size, x, XSH_ASSURE_NOT_NULL, xsh_frame_product(), XSH_FREE, xsh_free_image(), xsh_free_propertylist(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_low, xsh_order_list_free(), xsh_order_list_get_endy(), xsh_order_list_get_starty(), xsh_print_rec_status(), xsh_stringcat_any(), xsh_wavemap_list_eval_lambda(), and y.
| cpl_error_code xsh_wavemap_list_save4debug | ( | xsh_wavemap_list * | wmap, |
| xsh_instrument * | instr, | ||
| const char * | prefix | ||
| ) |
Create a WaveMap Image and save it as an multi extension image
| wmap | Wavemap list |
| instr | instrument arm setting |
| prefix | prefix to define Final frame file name |
Definition at line 965 of file xsh_data_wavemap.c.
References xsh_instrument::binx, xsh_instrument::biny, xsh_instrument::config, wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap_list::list, XSH_INSTRCONFIG::nx, XSH_INSTRCONFIG::ny, xsh_wavemap::object, xsh_wavemap::object_size, order, wavemap_item::qual, wavemap_item::sigma, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, wavemap_item::slit, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_image(), xsh_msg, XSH_PRE_DATA_BPP, XSH_PRE_DATA_TYPE, xsh_pre_free(), xsh_pre_get_data(), xsh_pre_get_errs(), xsh_pre_get_qual(), xsh_pre_new(), xsh_pre_save(), and xsh_stringcat_any().
| cpl_frame * xsh_wavemap_list_save_poly | ( | xsh_wavemap_list * | wmap, |
| cpl_frame * | order_frame, | ||
| xsh_pre * | pre, | ||
| xsh_instrument * | instr, | ||
| const char * | prefix, | ||
| cpl_frame ** | dispersol_frame, | ||
| cpl_frame ** | slitmap_frame | ||
| ) |
Save the wave_map slit_map and disp_tab.
| wmap | Wavemap list |
| order_frame | orderpos frame |
| pre | multi-pinhole frame in PRE format |
| instr | instrument setting structure |
| prefix | product prefix |
| dispersol_frame | dispersion solution frame |
| slitmap_frame | slit map solution frame |
Definition at line 1235 of file xsh_data_wavemap.c.
References check, xsh_wavemap_list::degx, xsh_wavemap_list::degy, xsh_wavemap_list::list, xsh_wavemap::order, order, xsh_wavemap::pol_lambda, xsh_wavemap::pol_slit, xsh_wavemap_list::size, XSH_ASSURE_NOT_NULL, XSH_DISP_TAB, XSH_DISP_TAB_AFC, xsh_dispersol_list_add(), xsh_dispersol_list_free(), xsh_dispersol_list_new(), xsh_dispersol_list_save(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_free_frame(), XSH_GET_TAG_FROM_ARM, and XSH_SLIT_MAP_POLY.
Referenced by xsh_create_dispersol_physmod(), and xsh_create_poly_wavemap().
| void xsh_wavemap_list_set_max_size | ( | xsh_wavemap_list * | list, |
| int | idx, | ||
| int | absorder, | ||
| int | max_size | ||
| ) |
set max size of wavemap
| list | the wavemap list |
| idx | index to check size |
| absorder | absolute order |
| max_size | maximum size |
Definition at line 149 of file xsh_data_wavemap.c.
References xsh_wavemap::all, xsh_wavemap::all_size, xsh_wavemap_list::list, xsh_wavemap::object, xsh_wavemap::object_size, xsh_wavemap::order, size, xsh_wavemap::sky, xsh_wavemap::sky_size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, and XSH_CALLOC.
Referenced by xsh_wavemap_list_new().
| cpl_error_code xsh_wavemap_list_sky_image_save | ( | xsh_wavemap_list * | smap, |
| xsh_instrument * | instr, | ||
| const int | abs_ord, | ||
| const int | sid, | ||
| const int | iter | ||
| ) |
Definition at line 763 of file xsh_data_wavemap.c.
References xsh_instrument::binx, xsh_instrument::biny, xsh_instrument::config, wavemap_item::fit_err, wavemap_item::fitted, wavemap_item::flux, wavemap_item::ix, wavemap_item::iy, wavemap_item::lambda, xsh_wavemap_list::list, XSH_INSTRCONFIG::nx, XSH_INSTRCONFIG::ny, order, wavemap_item::qual, wavemap_item::sigma, xsh_wavemap_list::size, xsh_wavemap::sky, xsh_wavemap::sky_size, wavemap_item::slit, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_image(), xsh_msg, XSH_PRE_DATA_BPP, XSH_PRE_DATA_TYPE, xsh_pre_free(), xsh_pre_get_data(), xsh_pre_get_errs(), xsh_pre_get_qual(), xsh_pre_new(), and xsh_pre_save().
Referenced by xsh_fit_spline2(), xsh_wavelist_subtract_sky(), and xsh_wavemap_list_new().