Functions | |
xsh_dispersol_list * | xsh_dispersol_list_new (int size, int degx, int degy, xsh_instrument *instrument) |
Create a new dispersion solution list. | |
xsh_dispersol_list * | xsh_dispersol_list_load (cpl_frame *frame, xsh_instrument *instrument) |
Load a dispersion list from a frame. | |
void | xsh_dispersol_list_add (xsh_dispersol_list *list, int idx, int absorder, cpl_polynomial *lambda_poly, cpl_polynomial *slit_poly) |
Add a dispersion solution in the list. | |
void | xsh_dispersol_list_free (xsh_dispersol_list **list) |
Free the dispersion list. | |
cpl_frame * | xsh_dispersol_list_to_wavemap (xsh_dispersol_list *list, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *tag) |
Save a WAVE MAP image. | |
cpl_frame * | xsh_dispersol_list_to_slitmap (xsh_dispersol_list *list, cpl_frame *order_frame, xsh_pre *pre, xsh_instrument *instr, const char *tag) |
Save a SLIT MAP image. | |
double | xsh_dispersol_list_eval (xsh_dispersol_list *list, cpl_polynomial *poly, cpl_vector *pos) |
Evaluate the polynomial according the binning. | |
cpl_frame * | xsh_dispersol_list_save (xsh_dispersol_list *list, xsh_instrument *instrument) |
Save a dispersion list on the disk. |
void xsh_dispersol_list_add | ( | xsh_dispersol_list * | list, | |
int | idx, | |||
int | absorder, | |||
cpl_polynomial * | lambda_poly, | |||
cpl_polynomial * | slit_poly | |||
) |
Add a dispersion solution in the list.
[in] | list | The dispersion list |
[in] | idx | The index in the list |
[in] | absorder | The absolute order |
[in] | lambda_poly | The lambda 2D polynomial solution |
[in] | slit_poly | The slit 2D polynomial solution |
Definition at line 197 of file xsh_data_dispersol.c.
References xsh_dispersol::absorder, xsh_dispersol::lambda_poly, xsh_dispersol_list::list, size, xsh_dispersol::slit_poly, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_dispersol_list_load(), and xsh_wavemap_list_save_poly().
double xsh_dispersol_list_eval | ( | xsh_dispersol_list * | list, | |
cpl_polynomial * | poly, | |||
cpl_vector * | pos | |||
) |
Evaluate the polynomial according the binning.
[in] | list | The dispersion list |
[in] | poly | The slit or wave poly |
[in] | pos | The position x, y in a vector |
Definition at line 707 of file xsh_data_dispersol.c.
References xsh_dispersol_list::binx, xsh_dispersol_list::biny, check, convert_bin_to_data(), and XSH_ASSURE_NOT_NULL.
Referenced by compute_specres(), xsh_dispersol_list_to_slitmap(), and xsh_dispersol_list_to_wavemap().
void xsh_dispersol_list_free | ( | xsh_dispersol_list ** | list | ) |
Free the dispersion list.
[in] | list | The list to free |
Definition at line 224 of file xsh_data_dispersol.c.
References xsh_free_polynomial(), and xsh_free_propertylist().
Referenced by compute_specres(), xsh_create_map(), xsh_dispersol_list_load(), xsh_dispersol_list_new(), xsh_rectify_orders(), and xsh_wavemap_list_save_poly().
xsh_dispersol_list* xsh_dispersol_list_load | ( | cpl_frame * | frame, | |
xsh_instrument * | instrument | |||
) |
Load a dispersion list from a frame.
[in] | frame | The frame contatining the dispersion list |
[in] | instrument | instrument (arm) setting |
Definition at line 114 of file xsh_data_dispersol.c.
References check, XSH_ASSURE_NOT_ILLEGAL, xsh_dispersol_list_add(), xsh_dispersol_list_free(), xsh_dispersol_list_new(), XSH_DISPERSOL_TABLE_COLNAME_DEGX, XSH_DISPERSOL_TABLE_COLNAME_DEGY, XSH_DISPERSOL_TABLE_COLNAME_ORDER, xsh_free_table(), xsh_get_table_value(), and XSH_TABLE_LOAD.
Referenced by compute_specres(), xsh_create_map(), and xsh_rectify_orders().
xsh_dispersol_list* xsh_dispersol_list_new | ( | int | size, | |
int | degx, | |||
int | degy, | |||
xsh_instrument * | instrument | |||
) |
Create a new dispersion solution list.
[in] | size | The size of the diseprsion list |
[in] | degx | poly degree on X direction |
[in] | degy | poly degree on Y direction |
[in] | instrument | instrument (arm) setting |
Definition at line 77 of file xsh_data_dispersol.c.
References xsh_dispersol_list::binx, xsh_dispersol_list::biny, check, xsh_dispersol_list::degx, xsh_dispersol_list::degy, xsh_dispersol_list::header, xsh_dispersol_list::list, xsh_dispersol_list::size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_dispersol_list_free(), xsh_instrument_get_binx(), xsh_instrument_get_biny(), and XSH_NEW_PROPERTYLIST.
Referenced by xsh_dispersol_list_load(), and xsh_wavemap_list_save_poly().
cpl_frame* xsh_dispersol_list_save | ( | xsh_dispersol_list * | list, | |
xsh_instrument * | instrument | |||
) |
Save a dispersion list on the disk.
list | dispesion solution | |
instrument | instrument (arm) setting |
Definition at line 745 of file xsh_data_dispersol.c.
References xsh_dispersol::absorder, check, xsh_dispersol_list::degx, xsh_dispersol_list::degy, xsh_dispersol_list::header, xsh_dispersol::lambda_poly, xsh_dispersol_list::list, xsh_dispersol_list::size, xsh_dispersol::slit_poly, XSH_ASSURE_NOT_NULL, XSH_DISP_TAB, XSH_DISPERSOL_AXIS_LAMBDA, XSH_DISPERSOL_AXIS_SLIT, XSH_DISPERSOL_TABLE_COLNAME_AXIS, XSH_DISPERSOL_TABLE_COLNAME_DEGX, XSH_DISPERSOL_TABLE_COLNAME_DEGY, XSH_DISPERSOL_TABLE_COLNAME_ORDER, XSH_DISPERSOL_TABLE_NBCOL, xsh_frame_product(), xsh_free_table(), XSH_GET_TAG_FROM_ARM, and xsh_pfits_set_pcatg().
Referenced by xsh_wavemap_list_save_poly().
cpl_frame* xsh_dispersol_list_to_slitmap | ( | xsh_dispersol_list * | list, | |
cpl_frame * | order_frame, | |||
xsh_pre * | pre, | |||
xsh_instrument * | instr, | |||
const char * | tag | |||
) |
Save a SLIT MAP image.
[in] | list | The dispersion list |
[in] | order_frame | The order list frame |
[in] | pre | The pre image |
[in] | instr | instrument (arm) setting |
[in] | tag | product tag |
Definition at line 462 of file xsh_data_dispersol.c.
References xsh_order::absorder, xsh_order_list::bin_x, xsh_dispersol_list::binx, xsh_pre::binx, xsh_order::cenpoly, check, xsh_order::edglopoly, xsh_order::edguppoly, endy, xsh_dispersol_list::list, xsh_order_list::list, xsh_pre::nx, nx, xsh_pre::ny, ny, xsh_dispersol_list::size, xsh_order::sliclopoly, xsh_order::slicuppoly, xsh_dispersol::slit_poly, starty, x, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_dispersol_list_eval(), xsh_frame_product(), xsh_free_frame(), xsh_free_image(), xsh_free_propertylist(), xsh_free_vector(), xsh_instrument_get_mode(), XSH_MODE_IFU, xsh_order_list_eval(), xsh_order_list_free(), xsh_order_list_get_endy(), xsh_order_list_get_starty(), xsh_order_list_load(), xsh_pfits_set_pcatg(), xsh_pfits_set_slitmap_median_cen(), xsh_pfits_set_slitmap_median_edglo(), xsh_pfits_set_slitmap_median_edgup(), xsh_pfits_set_slitmap_median_sliclo(), xsh_pfits_set_slitmap_median_slicup(), xsh_pfits_set_slitmap_order_cen(), xsh_pfits_set_slitmap_order_edglo(), xsh_pfits_set_slitmap_order_edgup(), xsh_pfits_set_slitmap_order_sliclo(), xsh_pfits_set_slitmap_order_slicup(), and y.
Referenced by xsh_create_map(), and xsh_wavemap_list_save_poly().
cpl_frame* xsh_dispersol_list_to_wavemap | ( | xsh_dispersol_list * | list, | |
cpl_frame * | order_frame, | |||
xsh_pre * | pre, | |||
xsh_instrument * | instr, | |||
const char * | tag | |||
) |
Save a WAVE MAP image.
[in] | list | The dispersion list |
[in] | order_frame | The order list frame |
[in] | pre | The pre image |
[in] | instr | instrument (arm) setting |
[in] | tag | product category |
Definition at line 261 of file xsh_data_dispersol.c.
References xsh_order::absorder, check, xsh_order::edglopoly, xsh_order::edguppoly, endy, xsh_dispersol::lambda_poly, xsh_dispersol_list::list, xsh_order_list::list, xsh_pre::nx, nx, xsh_pre::ny, ny, xsh_dispersol_list::size, starty, x, XSH_ASSURE_NOT_NULL, xsh_dispersol_list_eval(), xsh_frame_product(), xsh_free_frame(), xsh_free_image(), xsh_free_propertylist(), xsh_free_vector(), xsh_msg_warning, xsh_order_list_eval(), xsh_order_list_free(), xsh_order_list_get_endy(), xsh_order_list_get_starty(), xsh_order_list_load(), xsh_pfits_set_pcatg(), xsh_pfits_set_wavemap_order_lambda_max(), xsh_pfits_set_wavemap_order_lambda_min(), and y.
Referenced by xsh_create_map(), and xsh_wavemap_list_save_poly().