Rec
[Data Format Handling 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)
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_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)

Function Documentation

void xsh_rec_get_nod_kw ( cpl_frame *  rec_frame,
double *  throw,
double *  jitter,
double *  reloffset,
double *  cumoffset 
)
xsh_rec_list* xsh_rec_list_create ( xsh_instrument instr  ) 
xsh_rec_list* xsh_rec_list_create_with_size ( int  size,
xsh_instrument instr 
)

Create an empty order list.

Parameters:
[in] size size of list structure
[in] instr The instrument in use
Returns:
The order list structure

Definition at line 147 of file xsh_data_rec.c.

References xsh_rec_list::header, xsh_rec_list::instrument, xsh_rec_list::list, xsh_rec_list::nslit, xsh_rec_list::size, xsh_rec_list::slit_max, xsh_rec_list::slit_min, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_NEW_PROPERTYLIST, and xsh_rec_list_free().

Referenced by concat_rec(), xsh_combine_nod(), xsh_extract_with_tag(), xsh_rec_list_create(), and xsh_wavemap_list_build_sky().

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:
list pointer to table list
fname File 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* xsh_rec_list_duplicate ( xsh_rec_list old,
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.

Parameters:
rec_frame In/out rectified frame
tag Output Tag
instrument Pointer to xsh_instrument structure
Returns:
A new frame with all flux images inverted ( multiplied by -1)

Definition at line 666 of file xsh_data_rec.c.

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

void xsh_rec_list_free ( xsh_rec_list **  list  ) 
float* xsh_rec_list_get_data1 ( xsh_rec_list list,
int  idx 
)
float* xsh_rec_list_get_errs1 ( xsh_rec_list list,
int  idx 
)

Return the errs1 buffer from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
idx Index in the list
Returns:
Pointer to errs1 buffer

Definition at line 1017 of file xsh_data_rec.c.

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

Referenced by analyse_extraction(), concat_rec(), fill_rectified(), shift_with_localization(), xsh_extract_with_tag(), xsh_merge_ord_with_tag(), xsh_rec_list_add(), xsh_rec_list_duplicate(), xsh_rec_list_rectify(), xsh_wavelist_subtract_sky(), and xsh_wavemap_list_build_sky().

cpl_propertylist* xsh_rec_list_get_header ( xsh_rec_list list  ) 

get header of the table

Parameters:
list the rec_list
Returns:
the header associated to the table

Definition at line 762 of file xsh_data_rec.c.

References xsh_rec_list::header, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_combine_nod().

double* xsh_rec_list_get_lambda ( xsh_rec_list list,
int  idx 
)

Return the lambda buffer from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
idx Index in the list
Returns:
Pointer to lambda buffer

Definition at line 979 of file xsh_data_rec.c.

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

Referenced by analyse_extraction(), concat_rec(), fill_rectified(), shift_with_localization(), xsh_combine_nod(), xsh_extract_with_tag(), xsh_merge_ord_with_tag(), xsh_rec_list_duplicate(), xsh_wavelist_subtract_sky(), and xsh_wavemap_list_build_sky().

double xsh_rec_list_get_lambda_max ( xsh_rec_list list  ) 
double xsh_rec_list_get_lambda_min ( xsh_rec_list list  ) 
int xsh_rec_list_get_nlambda ( xsh_rec_list list,
int  idx 
)
int xsh_rec_list_get_nslit ( xsh_rec_list list,
int  idx 
)

Return the number of slit from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
idx Index in the list
Returns:
Nb of slit

Definition at line 780 of file xsh_data_rec.c.

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

Referenced by analyse_rectify(), concat_rec(), create_zero_rectify(), fill_rectified(), shift_with_localization(), xsh_combine_nod(), xsh_extract_with_tag(), xsh_merge_ord_with_tag(), xsh_rec_list_add(), xsh_rec_list_duplicate(), xsh_rec_list_frame_invert(), and xsh_shift().

int xsh_rec_list_get_order ( xsh_rec_list list,
int  idx 
)

Return the order absolute number from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
idx Index in the list
Returns:
Nb of slit

Definition at line 799 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(), shift_with_localization(), xsh_combine_nod(), xsh_extract_with_tag(), and xsh_rec_list_duplicate().

int* xsh_rec_list_get_qual1 ( xsh_rec_list list,
int  idx 
)

Return the qual1 buffer from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
idx Index in the list
Returns:
Pointer to qual1 buffer

Definition at line 1036 of file xsh_data_rec.c.

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

Referenced by concat_rec(), fill_rectified(), shift_with_localization(), xsh_extract_with_tag(), xsh_merge_ord_with_tag(), xsh_rec_list_add(), xsh_rec_list_duplicate(), and xsh_rec_list_rectify().

float* xsh_rec_list_get_slit ( xsh_rec_list list,
int  idx 
)

Return the slit buffer from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
idx Index in the list
Returns:
Pointer to slit buffer

Definition at line 837 of file xsh_data_rec.c.

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

Referenced by analyse_rectify(), concat_rec(), fill_rectified(), shift_with_localization(), xsh_combine_nod(), xsh_compute_slit_index(), xsh_extract_with_tag(), xsh_rec_list_duplicate(), and xsh_shift().

double xsh_rec_list_get_slit_max ( xsh_rec_list list  ) 

Return the slit max from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
Returns:
Pointer to slit buffer

Definition at line 876 of file xsh_data_rec.c.

References xsh_rec_list::slit_max, and XSH_ASSURE_NOT_NULL.

double xsh_rec_list_get_slit_min ( xsh_rec_list list  ) 

Return the slit min from a xsh_rec_list structure.

Parameters:
list Rectify structure pointer
Returns:
Pointer to slit buffer

Definition at line 856 of file xsh_data_rec.c.

References xsh_rec_list::slit_min, and XSH_ASSURE_NOT_NULL.

xsh_rec_list* xsh_rec_list_load ( cpl_frame *  frame,
xsh_instrument instrument 
)
xsh_rec_list* xsh_rec_list_load_eso ( cpl_frame *  frame,
xsh_instrument instrument 
)
cpl_frame* xsh_rec_list_save ( xsh_rec_list list,
const char *  filename,
const char *  tag,
int  is_temp 
)
cpl_frame* xsh_rec_list_save2 ( xsh_rec_list list,
const char *  filename,
const char *  tag 
)
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:
list The rec_list structure wich contains polynomials coefficients of the orders
filename The name of the save file on disk
tag The pro catg of the save file on disk
is_temp CPl_TRUE if temporary file, CPL_FALSE otherwise
Returns:
a newly allocated frame

Definition at line 1283 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, 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().

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] list The rectify list
[in] idx The index of the order in the list
[in] absorder The absorder of the order
[in] nlambda The number of lambda values
[in] ns The 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 concat_rec(), xsh_combine_nod(), xsh_extract_with_tag(), xsh_opt_extract_orders(), xsh_rec_list_duplicate(), xsh_rec_list_load(), xsh_rec_list_load_eso(), xsh_rectify_orders(), and xsh_wavemap_list_build_sky().

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:
list Rectify structure pointer
val slit value to set
Returns:
Pointer to slit buffer

Definition at line 960 of file xsh_data_rec.c.

References xsh_rec_list::slit_max, and XSH_ASSURE_NOT_NULL.

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:
list Rectify structure pointer
val slit value to set
Returns:
Pointer to slit buffer

Definition at line 940 of file xsh_data_rec.c.

References xsh_rec_list::slit_min, and XSH_ASSURE_NOT_NULL.

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

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