X-shooter Pipeline Reference Manual 3.8.15
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_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.
 

Detailed Description

Function Documentation

◆ lambda_fit()

static void lambda_fit ( double *  lambda,
double *  xpos,
double *  ypos,
int  size,
xsh_wavemap_list wmap,
xsh_dispersol_param dispsol_param,
int  order 
)
static

◆ 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

Parameters
vlambdaarray with wavelength values
xposarray with x positions
yposarray with y positions
nitemsnumber of list sampling points
ordersnumber of orders
dispsol_paramstructure with parameters for dispersion solution
wmapwavemap @doc For each order makes a fit of lambda as a function of X,Y (tchebitchev)
Returns
null

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

◆ xsh_wavemap_list_compute_poly()

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
vlambdaarray with wavelength values
vslitarray with slit values
xposarray with x positions
yposarray with y positions
nitemsnumber of list sampling points
ordersnumber of orders
dispsol_paramstructure with parameters for dispersion solution
wmapwavemap @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)
Returns
null

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

xsh_wavemap_list * xsh_wavemap_list_create ( xsh_instrument instr)

◆ xsh_wavemap_list_dump()

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
listpointer to table list
fnameFile 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.

◆ xsh_wavemap_list_eval_lambda()

static double xsh_wavemap_list_eval_lambda ( xsh_wavemap_list wmap,
double  x,
double  y,
int  ord 
)
static

◆ xsh_wavemap_list_free()

void xsh_wavemap_list_free ( xsh_wavemap_list **  list)

◆ xsh_wavemap_list_object_image_save()

cpl_error_code xsh_wavemap_list_object_image_save ( xsh_wavemap_list omap,
xsh_instrument instr,
const int  iter 
)

◆ xsh_wavemap_list_save()

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
wmapWavemap list
order_frameOrder table frame
prepre frame (to get frame size and header)
instrinstrument arm setting
prefixprefix used to define Final frame file name
Returns
The created frame

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.

◆ xsh_wavemap_list_save2()

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
wmapWavemap list
order_listOrder table list
prepre frame (to get frame size and header)
instrinstrument arm setting
prefixprefix to define Final frame file name
Returns
The created frame

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.

◆ xsh_wavemap_list_save4debug()

cpl_error_code xsh_wavemap_list_save4debug ( xsh_wavemap_list wmap,
xsh_instrument instr,
const char *  prefix 
)

◆ xsh_wavemap_list_save_poly()

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
wmapWavemap list
order_frameorderpos frame
premulti-pinhole frame in PRE format
instrinstrument setting structure
prefixproduct prefix
dispersol_framedispersion solution frame
slitmap_frameslit map solution frame
Returns
wavelength map frame, dispersion and slitmap solution frames

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

◆ xsh_wavemap_list_set_max_size()

void xsh_wavemap_list_set_max_size ( xsh_wavemap_list list,
int  idx,
int  absorder,
int  max_size 
)

set max size of wavemap

Parameters
listthe wavemap list
idxindex to check size
absorderabsolute order
max_sizemaximum size
Returns
the wavemap list structure

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

◆ xsh_wavemap_list_sky_image_save()

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 
)