X-shooter Pipeline Reference Manual 3.8.15
Functions

Functions

void xsh_rec_list_dump (xsh_rec_list *list, const char *fname)
 
xsh_rec_listxsh_rec_list_create (xsh_instrument *instr)
 Create an empty order list.
 
xsh_rec_listxsh_rec_list_create_with_size (int size, xsh_instrument *instr)
 Create an empty order list.
 
void xsh_rec_list_set_data_size (xsh_rec_list *list, int idx, int absorder, int nlambda, int ns)
 Allocate memory for the order idx of the rectify list.
 
xsh_rec_listxsh_rec_list_duplicate (xsh_rec_list *old, xsh_instrument *instrument)
 
xsh_rec_listxsh_rec_list_load (cpl_frame *frame, xsh_instrument *instrument)
 load an rec list from a frame
 
xsh_rec_listxsh_rec_list_load_eso (cpl_frame *frame, xsh_instrument *instrument)
 
xsh_rec_listxsh_rec_list_load_eso_1d (cpl_frame *frame, xsh_instrument *instrument)
 
cpl_frame * xsh_rec_list_frame_invert (cpl_frame *rec_frame, const char *tag, xsh_instrument *instrument)
 Invert the rectified flux images of the input frame into a new frame.
 
void xsh_rec_list_free (xsh_rec_list **list)
 free memory associated to a rec_list
 
cpl_propertylist * xsh_rec_list_get_header (xsh_rec_list *list)
 get header of the table
 
int xsh_rec_list_get_nslit (xsh_rec_list *list, int idx)
 
int xsh_rec_list_get_order (xsh_rec_list *list, int idx)
 
int xsh_rec_list_get_nlambda (xsh_rec_list *list, int idx)
 
float * xsh_rec_list_get_slit (xsh_rec_list *list, int idx)
 
double xsh_rec_list_get_slit_min (xsh_rec_list *list)
 
double xsh_rec_list_get_slit_max (xsh_rec_list *list)
 
double xsh_rec_list_get_lambda_min (xsh_rec_list *list)
 
double xsh_rec_list_get_lambda_max (xsh_rec_list *list)
 
cpl_error_code xsh_rec_list_set_slit_min (xsh_rec_list *list, const double val)
 
cpl_error_code xsh_rec_list_set_slit_max (xsh_rec_list *list, const double val)
 
double * xsh_rec_list_get_lambda (xsh_rec_list *list, int idx)
 
float * xsh_rec_list_get_data1 (xsh_rec_list *list, int idx)
 
float * xsh_rec_list_get_errs1 (xsh_rec_list *list, int idx)
 
int * xsh_rec_list_get_qual1 (xsh_rec_list *list, int idx)
 
cpl_frame * xsh_rec_list_save (xsh_rec_list *list, const char *filename, const char *tag, int is_temp)
 Save a rec list in a frame.
 
void xsh_rec_list_update_header (xsh_rec_list *rec_list, xsh_pre *pre, xsh_rectify_param *rec_par, const char *pro_catg)
 Update header of rectified list writing mandatory KW.
 
cpl_frame * xsh_rec_list_save_table (xsh_rec_list *list, const char *filename, const char *tag, int is_temp)
 Save a rec list in a frame.
 
cpl_frame * xsh_rec_list1D_save_as_tab (xsh_rec_list *list, const char *filename, const char *tag)
 save an rec list to a frame
 
cpl_frame * xsh_rec_list_save2 (xsh_rec_list *list, const char *filename, const char *tag)
 save an rec list to a frame
 
void xsh_rec_get_nod_kw (cpl_frame *rec_frame, double *throw, double *jitter, double *reloffset, double *cumoffset)
 
cpl_error_code xsh_rec_get_nod_extract_slit_min_max (xsh_rec_list *rlist, const double slit_step, double *smin, double *smax)
 

Detailed Description

Function Documentation

◆ xsh_rec_get_nod_extract_slit_min_max()

cpl_error_code xsh_rec_get_nod_extract_slit_min_max ( xsh_rec_list rlist,
const double  slit_step,
double *  smin,
double *  smax 
)

◆ xsh_rec_get_nod_kw()

void xsh_rec_get_nod_kw ( cpl_frame *  rec_frame,
double *  throw,
double *  jitter,
double *  reloffset,
double *  cumoffset 
)

◆ xsh_rec_list1D_save_as_tab()

cpl_frame * xsh_rec_list1D_save_as_tab ( xsh_rec_list list,
const char *  filename,
const char *  tag 
)

save an rec list to a frame

Parameters
listthe rec_list structure wich contains polynomials coefficients of the orders
filenamethe name of the save file on disk
tagrec list pro catg
Returns
two newly allocated frames

Definition at line 1453 of file xsh_data_rec.c.

References check, xsh_rec::data1, xsh_rec::errs1, xsh_rec_list::header, xsh_rec::lambda, xsh_rec_list::list, mode, xsh_rec::nlambda, xsh_rec::nslit, xsh_rec::order, order, xsh_rec::qual1, xsh_rec_list::size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_BUNIT_FLUX_REL_C, XSH_BUNIT_NONE_C, xsh_frame_product(), xsh_free_array(), xsh_free_propertylist(), xsh_free_table(), xsh_msg, xsh_msg_dbg_high, xsh_pfits_set_bunit(), xsh_pfits_set_extname(), xsh_plist_set_extra_keys(), and XSH_TABLE_FREE.

Referenced by xsh_subtract_sky_single().

◆ xsh_rec_list_create()

xsh_rec_list * xsh_rec_list_create ( xsh_instrument instr)

◆ xsh_rec_list_create_with_size()

xsh_rec_list * xsh_rec_list_create_with_size ( int  size,
xsh_instrument instr 
)

◆ xsh_rec_list_dump()

void xsh_rec_list_dump ( xsh_rec_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 62 of file xsh_data_rec.c.

References xsh_rec_list::list, xsh_rec::nlambda, xsh_rec::nslit, xsh_rec::order, xsh_rec_list::size, and XSH_ASSURE_NOT_NULL.

◆ xsh_rec_list_duplicate()

xsh_rec_list * xsh_rec_list_duplicate ( xsh_rec_list old,
xsh_instrument instrument 
)

◆ xsh_rec_list_frame_invert()

cpl_frame * xsh_rec_list_frame_invert ( cpl_frame *  rec_frame,
const char *  tag,
xsh_instrument instrument 
)

Invert the rectified flux images of the input frame into a new frame.

Parameters
rec_frameIn/out rectified frame
tagOutput Tag
instrumentPointer to xsh_instrument structure
Returns
A new frame with all flux images inverted ( multiplied by -1)

Definition at line 713 of file xsh_data_rec.c.

References check, instrument, order, xsh_rec_list::size, XSH_ASSURE_NOT_NULL, xsh_rec_list_free(), xsh_rec_list_get_data1(), xsh_rec_list_get_nlambda(), xsh_rec_list_get_nslit(), xsh_rec_list_load(), and xsh_rec_list_save().

Referenced by main(), xsh_nod_rectify_and_shift_with_key(), and xsh_scired_slit_nod_accurate().

◆ xsh_rec_list_free()

void xsh_rec_list_free ( xsh_rec_list **  list)

◆ xsh_rec_list_get_data1()

float * xsh_rec_list_get_data1 ( xsh_rec_list list,
int  idx 
)

◆ xsh_rec_list_get_errs1()

float * xsh_rec_list_get_errs1 ( xsh_rec_list list,
int  idx 
)

◆ xsh_rec_list_get_header()

cpl_propertylist * xsh_rec_list_get_header ( xsh_rec_list list)

get header of the table

Parameters
listthe rec_list
Returns
the header associated to the table

Definition at line 809 of file xsh_data_rec.c.

References xsh_rec_list::header, and XSH_ASSURE_NOT_NULL.

Referenced by test_combine_lists(), and xsh_combine_nod().

◆ xsh_rec_list_get_lambda()

double * xsh_rec_list_get_lambda ( xsh_rec_list list,
int  idx 
)

Return the lambda buffer from a xsh_rec_list structure.

Parameters
listRectify structure pointer
idxIndex in the list
Returns
Pointer to lambda buffer

Definition at line 1026 of file xsh_data_rec.c.

References xsh_rec::lambda, xsh_rec_list::list, and XSH_ASSURE_NOT_NULL.

Referenced by analyse_extraction(), fill_rectified(), xsh_combine_nod(), xsh_extract_clean_with_tag(), xsh_extract_with_tag(), xsh_merge_ord_with_tag(), xsh_rec_list_duplicate(), xsh_subtract_sky_on_obj_at_pix(), and xsh_wavemap_list_build_sky().

◆ xsh_rec_list_get_lambda_max()

double xsh_rec_list_get_lambda_max ( xsh_rec_list list)

◆ xsh_rec_list_get_lambda_min()

double xsh_rec_list_get_lambda_min ( xsh_rec_list list)

◆ xsh_rec_list_get_nlambda()

int xsh_rec_list_get_nlambda ( xsh_rec_list list,
int  idx 
)

◆ xsh_rec_list_get_nslit()

int xsh_rec_list_get_nslit ( xsh_rec_list list,
int  idx 
)

◆ xsh_rec_list_get_order()

int xsh_rec_list_get_order ( xsh_rec_list list,
int  idx 
)

Return the order absolute number from a xsh_rec_list structure.

Parameters
listRectify structure pointer
idxIndex in the list
Returns
Nb of slit

Definition at line 846 of file xsh_data_rec.c.

References xsh_rec_list::list, xsh_rec::order, and XSH_ASSURE_NOT_NULL.

Referenced by analyse_extraction(), fill_rectified(), xsh_combine_nod(), xsh_extract_clean_with_tag(), xsh_extract_with_tag(), and xsh_rec_list_duplicate().

◆ xsh_rec_list_get_qual1()

int * xsh_rec_list_get_qual1 ( xsh_rec_list list,
int  idx 
)

◆ xsh_rec_list_get_slit()

float * xsh_rec_list_get_slit ( xsh_rec_list list,
int  idx 
)

Return the slit buffer from a xsh_rec_list structure.

Parameters
listRectify structure pointer
idxIndex in the list
Returns
Pointer to slit buffer

Definition at line 884 of file xsh_data_rec.c.

References xsh_rec_list::list, xsh_rec::slit, and XSH_ASSURE_NOT_NULL.

Referenced by analyse_rectify(), fill_rectified(), test_combine_lists(), xsh_combine_nod(), xsh_compute_slit_index(), xsh_extract_clean_with_tag(), xsh_extract_with_tag(), xsh_rec_list_duplicate(), and xsh_shift().

◆ xsh_rec_list_get_slit_max()

double xsh_rec_list_get_slit_max ( xsh_rec_list list)

Return the slit max from a xsh_rec_list structure.

Parameters
listRectify structure pointer
Returns
Pointer to slit buffer

Definition at line 923 of file xsh_data_rec.c.

References xsh_rec_list::slit_max, and XSH_ASSURE_NOT_NULL.

◆ xsh_rec_list_get_slit_min()

double xsh_rec_list_get_slit_min ( xsh_rec_list list)

Return the slit min from a xsh_rec_list structure.

Parameters
listRectify structure pointer
Returns
Pointer to slit buffer

Definition at line 903 of file xsh_data_rec.c.

References xsh_rec_list::slit_min, and XSH_ASSURE_NOT_NULL.

◆ xsh_rec_list_load()

xsh_rec_list * xsh_rec_list_load ( cpl_frame *  frame,
xsh_instrument instrument 
)

◆ xsh_rec_list_load_eso()

xsh_rec_list * xsh_rec_list_load_eso ( cpl_frame *  frame,
xsh_instrument instrument 
)

◆ xsh_rec_list_load_eso_1d()

xsh_rec_list * xsh_rec_list_load_eso_1d ( cpl_frame *  frame,
xsh_instrument instrument 
)

◆ xsh_rec_list_save()

cpl_frame * xsh_rec_list_save ( xsh_rec_list list,
const char *  filename,
const char *  tag,
int  is_temp 
)

◆ xsh_rec_list_save2()

cpl_frame * xsh_rec_list_save2 ( xsh_rec_list list,
const char *  filename,
const char *  tag 
)

◆ xsh_rec_list_save_table()

cpl_frame * xsh_rec_list_save_table ( xsh_rec_list list,
const char *  filename,
const char *  tag,
int  is_temp 
)

Save a rec list in a frame.

Parameters
listThe rec_list structure wich contains polynomials coefficients of the orders
filenameThe name of the save file on disk
tagThe pro catg of the save file on disk
is_tempCPl_TRUE if temporary file, CPL_FALSE otherwise
Returns
a newly allocated frame

Definition at line 1332 of file xsh_data_rec.c.

References check, xsh_rec_list::header, xsh_rec::lambda, xsh_rec_list::list, mode, xsh_rec::nlambda, xsh_rec::nslit, xsh_rec::order, order, xsh_rec_list::size, xsh_rec::slit, xsh_add_temporary_file(), XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_frame_product(), xsh_free_array(), XSH_REC_TABLE_COLNAME_LAMBDA, XSH_REC_TABLE_COLNAME_NLAMBDA, XSH_REC_TABLE_COLNAME_NSLIT, XSH_REC_TABLE_COLNAME_ORDER, XSH_REC_TABLE_COLNAME_SLIT, and XSH_TABLE_FREE.

Referenced by xsh_rectify_orders().

◆ xsh_rec_list_set_data_size()

void xsh_rec_list_set_data_size ( xsh_rec_list list,
int  idx,
int  absorder,
int  nlambda,
int  ns 
)

Allocate memory for the order idx of the rectify list.

Parameters
[in]listThe rectify list
[in]idxThe index of the order in the list
[in]absorderThe absorder of the order
[in]nlambdaThe number of lambda values
[in]nsThe number of slit values

Definition at line 191 of file xsh_data_rec.c.

References xsh_rec::data1, xsh_rec::errs1, xsh_rec::lambda, xsh_rec_list::list, xsh_rec::nlambda, xsh_rec::nslit, xsh_rec::order, xsh_rec::qual1, xsh_rec_list::size, size, xsh_rec::slit, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_CMP_INT, and xsh_msg_dbg_high.

Referenced by xsh_combine_nod(), xsh_extract_clean_with_tag(), xsh_extract_with_tag(), xsh_opt_extract_orders(), xsh_rec_list_duplicate(), xsh_rec_list_load(), xsh_rec_list_load_eso(), xsh_rec_list_load_eso_1d(), xsh_rectify_orders(), and xsh_wavemap_list_build_sky().

◆ xsh_rec_list_set_slit_max()

cpl_error_code xsh_rec_list_set_slit_max ( xsh_rec_list list,
const double  val 
)

Set the slit max val in the xsh_rec_list structure.

Parameters
listRectify structure pointer
valslit value to set
Returns
Pointer to slit buffer

Definition at line 1007 of file xsh_data_rec.c.

References xsh_rec_list::slit_max, and XSH_ASSURE_NOT_NULL.

◆ xsh_rec_list_set_slit_min()

cpl_error_code xsh_rec_list_set_slit_min ( xsh_rec_list list,
const double  val 
)

Set the slit min val in the xsh_rec_list structure.

Parameters
listRectify structure pointer
valslit value to set
Returns
Pointer to slit buffer

Definition at line 987 of file xsh_data_rec.c.

References xsh_rec_list::slit_min, and XSH_ASSURE_NOT_NULL.

◆ xsh_rec_list_update_header()

void xsh_rec_list_update_header ( xsh_rec_list rec_list,
xsh_pre pre,
xsh_rectify_param rec_par,
const char *  pro_catg 
)