Dispersion solution
[Data Format Handling functions]

Functions

xsh_dispersol_listxsh_dispersol_list_new (int size, int degx, int degy, xsh_instrument *instrument)
 Create a new dispersion solution list.
xsh_dispersol_listxsh_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, const char *tag)
 Save a dispersion list on the disk.

Function Documentation

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.

Parameters:
[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 198 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.

Parameters:
[in] list The dispersion list
[in] poly The slit or wave poly
[in] pos The position x, y in a vector
Returns:
The evaluation of the polynomial at the given position

Definition at line 742 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(), main(), xsh_dispersol_list_to_slitmap(), and xsh_dispersol_list_to_wavemap().

void xsh_dispersol_list_free ( xsh_dispersol_list **  list  ) 

Free the dispersion list.

Parameters:
[in] list The list to free

Definition at line 225 of file xsh_data_dispersol.c.

References xsh_free_polynomial(), and xsh_free_propertylist().

Referenced by compute_specres(), main(), 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.

Parameters:
[in] frame The frame contatining the dispersion list
[in] instrument instrument (arm) setting
Returns:
A new allocated dispersion list

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(), main(), 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.

Parameters:
[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
Returns:
The new ALLOCATED dispersion list

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,
const char *  tag 
)
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.

Parameters:
[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
Returns:
The slit map frame

Definition at line 463 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_binx(), xsh_instrument_get_biny(), 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(), xsh_pfits_set_wcs(), 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 
)

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