X-shooter Pipeline Reference Manual 3.8.15
Functions

Functions

static int xsh_arclist_lambda_compare (const void *one, const void *two)
 
void xsh_arclist_lambda_sort (xsh_arclist *list)
 sort arcline list by increasing lambda
 
int xsh_arclist_get_size (xsh_arclist *list)
 get size of arcline list
 
int xsh_arclist_get_nbrejected (xsh_arclist *list)
 get nb lines rejected in arcline list
 
float xsh_arclist_get_wavelength (xsh_arclist *list, int idx)
 get wavelength of a line in the arcline list
 
void xsh_arclist_reject (xsh_arclist *list, int idx)
 reject a line from the list
 
void xsh_arclist_restore (xsh_arclist *list, int idx)
 restore a line from the list
 
int xsh_arclist_is_rejected (xsh_arclist *list, int idx)
 give if a line is rejected
 
cpl_propertylist * xsh_arclist_get_header (xsh_arclist *list)
 get header of the table
 
void xsh_dump_arclist (xsh_arclist *list)
 Dump main info about an arcline_list.
 
xsh_arclistxsh_arclist_load (cpl_frame *frame)
 load an arcline list frame in arclist structure
 
void xsh_arcline_free (xsh_arcline **arc)
 free memory associated to a arcline
 
void xsh_arclist_free (xsh_arclist **list)
 free memory associated to a arclist
 
void xsh_arclist_clean_from_list (xsh_arclist *list, double *lambda, int size)
 Clean an arclist according to a list of valid lambda.
 
void xsh_arclist_clean_from_list_not_flagged (xsh_arclist *list, double *lambda, int *flag, int size)
 
void xsh_arclist_clean (xsh_arclist *list)
 
cpl_frame * xsh_arclist_save (xsh_arclist *list, const char *filename, const char *tag)
 save a arclist to a frame
 

Detailed Description

Function Documentation

◆ xsh_arcline_free()

void xsh_arcline_free ( xsh_arcline **  arc)

free memory associated to a arcline

Parameters
arcthe arcline to free

Definition at line 341 of file xsh_data_arclist.c.

Referenced by xsh_arclist_clean(), and xsh_arclist_free().

◆ xsh_arclist_clean()

void xsh_arclist_clean ( xsh_arclist list)

◆ xsh_arclist_clean_from_list()

void xsh_arclist_clean_from_list ( xsh_arclist list,
double *  lambda,
int  size 
)

Clean an arclist according to a list of valid lambda.

Parameters
[in]listThe arclist (order by increasing wavelength)
[in]lambdaThe lambda array (order by increasing wavelength)
[in]sizeThe size of lambda array

Definition at line 393 of file xsh_data_arclist.c.

References check, xsh_arclist::nbrejected, xsh_arclist::size, size, WAVELENGTH_PRECISION, xsh_arclist_clean(), xsh_arclist_get_wavelength(), xsh_arclist_reject(), XSH_ASSURE_NOT_NULL, and XSH_REGDEBUG.

Referenced by xsh_detect_arclines().

◆ xsh_arclist_clean_from_list_not_flagged()

void xsh_arclist_clean_from_list_not_flagged ( xsh_arclist list,
double *  lambda,
int *  flag,
int  size 
)

◆ xsh_arclist_free()

void xsh_arclist_free ( xsh_arclist **  list)

free memory associated to a arclist

Parameters
listthe arclist to free

Definition at line 361 of file xsh_data_arclist.c.

References xsh_arcline_free(), XSH_FREE, and xsh_free_propertylist().

Referenced by clean_arclist_data(), xsh_afcthetab_create(), xsh_arclist_load(), xsh_create_order_table(), xsh_detect_arclines(), and xsh_detect_arclines_dan().

◆ xsh_arclist_get_header()

cpl_propertylist * xsh_arclist_get_header ( xsh_arclist list)

get header of the table

Parameters
listthe arclist
Returns
the header associated to the table

Definition at line 224 of file xsh_data_arclist.c.

References xsh_arclist::header, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_detect_arclines(), and xsh_detect_arclines_dan().

◆ xsh_arclist_get_nbrejected()

int xsh_arclist_get_nbrejected ( xsh_arclist list)

get nb lines rejected in arcline list

Parameters
listpointer to arcline_list
Returns
the number of rejected lines

Definition at line 119 of file xsh_data_arclist.c.

References xsh_arclist::nbrejected, and XSH_ASSURE_NOT_NULL.

◆ xsh_arclist_get_size()

int xsh_arclist_get_size ( xsh_arclist list)

get size of arcline list

Parameters
listpointer to arcline_list
Returns
the size

Definition at line 100 of file xsh_data_arclist.c.

References xsh_arclist::size, and XSH_ASSURE_NOT_NULL.

Referenced by clean_arclist_data(), theo_tab_filter(), theo_tab_model(), xsh_afcthetab_create(), xsh_create_order_table(), xsh_detect_arclines(), and xsh_detect_arclines_dan().

◆ xsh_arclist_get_wavelength()

float xsh_arclist_get_wavelength ( xsh_arclist list,
int  idx 
)

get wavelength of a line in the arcline list

Parameters
listpointer to arcline_list
idxindex in the list
Returns
the wavelength of the arcline

Definition at line 138 of file xsh_data_arclist.c.

References xsh_arclist::list, size, xsh_arcline::wavelength, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.

Referenced by clean_arclist_data(), theo_tab_filter(), theo_tab_model(), xsh_afcthetab_create(), xsh_arclist_clean_from_list(), and xsh_arclist_clean_from_list_not_flagged().

◆ xsh_arclist_is_rejected()

int xsh_arclist_is_rejected ( xsh_arclist list,
int  idx 
)

give if a line is rejected

Parameters
listpointer to arcline_list
idxIndex of the arc in the list
Returns
1 if the line is rejected else 0

Definition at line 205 of file xsh_data_arclist.c.

References xsh_arclist::rejected, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_arclist_clean().

◆ xsh_arclist_lambda_compare()

static int xsh_arclist_lambda_compare ( const void *  one,
const void *  two 
)
static

Definition at line 59 of file xsh_data_arclist.c.

References xsh_arcline::wavelength.

Referenced by xsh_arclist_lambda_sort().

◆ xsh_arclist_lambda_sort()

void xsh_arclist_lambda_sort ( xsh_arclist list)

sort arcline list by increasing lambda

Parameters
listpointer to arcline_list

Definition at line 87 of file xsh_data_arclist.c.

References xsh_arclist::list, xsh_arclist::size, and xsh_arclist_lambda_compare().

Referenced by xsh_detect_arclines(), and xsh_detect_arclines_dan().

◆ xsh_arclist_load()

xsh_arclist * xsh_arclist_load ( cpl_frame *  frame)

◆ xsh_arclist_reject()

void xsh_arclist_reject ( xsh_arclist list,
int  idx 
)

reject a line from the list

Parameters
listpointer to arcline_list
idxindex of the line to reject

Definition at line 158 of file xsh_data_arclist.c.

References xsh_arclist::nbrejected, xsh_arclist::rejected, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.

Referenced by clean_arclist_data(), theo_tab_filter(), theo_tab_model(), xsh_arclist_clean_from_list(), and xsh_arclist_clean_from_list_not_flagged().

◆ xsh_arclist_restore()

void xsh_arclist_restore ( xsh_arclist list,
int  idx 
)

restore a line from the list

Parameters
listpointer to arcline_list
idxindex of the line to reject

Definition at line 181 of file xsh_data_arclist.c.

References xsh_arclist::nbrejected, xsh_arclist::rejected, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.

◆ xsh_arclist_save()

cpl_frame * xsh_arclist_save ( xsh_arclist list,
const char *  filename,
const char *  tag 
)

◆ xsh_dump_arclist()

void xsh_dump_arclist ( xsh_arclist list)

Dump main info about an arcline_list.

Parameters
listpointer to arcline_list

Definition at line 241 of file xsh_data_arclist.c.

References xsh_arcline::comment, xsh_arcline::flux, xsh_arclist::list, xsh_arcline::name, xsh_arclist::size, xsh_arcline::wavelength, XSH_ASSURE_NOT_NULL, and xsh_msg.