Wavemap
[Data Format Handling functions]

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_listxsh_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.

Function Documentation

static void lambda_fit ( double *  lambda,
double *  xpos,
double *  ypos,
int  size,
xsh_wavemap_list wmap,
xsh_dispersol_param dispsol_param,
int  order 
) [static]
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

Parameters:
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)
Returns:
null

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

Parameters:
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)
Returns:
null

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  ) 
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).

Parameters:
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]
void xsh_wavemap_list_free ( xsh_wavemap_list **  list  ) 
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 !).

Parameters:
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
Returns:
The created frame

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 !).

Parameters:
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
Returns:
The created frame

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.

Parameters:
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
Returns:
wavelength map frame, dispersion and slitmap solution frames

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

Parameters:
list the wavemap list
idx index to check size
absorder absolute order
max_size maximum size
Returns:
the wavemap list structure

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


Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1