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_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 void lambda_fit | ( | double * | lambda, | |
| double * | xpos, | |||
| double * | ypos, | |||
| int | size, | |||
| xsh_wavemap_list * | wmap, | |||
| xsh_dispersol_param * | dispsol_param, | |||
| int | order | |||
| ) | [static] |
Definition at line 211 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, 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 fit_spline(), and 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 For each order makes a fit of lambda as a function of X,Y (tchebitchev) |
Definition at line 487 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 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 357 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_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_arm(), 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 double xsh_wavemap_list_eval_lambda | ( | xsh_wavemap_list * | wmap, | |
| double | x, | |||
| double | y, | |||
| int | ord | |||
| ) | [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 572 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, 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(), 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 177 of file xsh_data_wavemap.c.
References 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_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 644 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 769 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_stringcat_any(), xsh_wavemap_list_eval_lambda(), and y.
| 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 897 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_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_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().
1.6.1