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_arclist * | xsh_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 |
void xsh_arcline_free | ( | xsh_arcline ** | arc | ) |
free memory associated to a arcline
arc | the arcline to free |
Definition at line 341 of file xsh_data_arclist.c.
Referenced by xsh_arclist_clean(), and xsh_arclist_free().
void xsh_arclist_clean | ( | xsh_arclist * | list | ) |
Definition at line 465 of file xsh_data_arclist.c.
References xsh_arclist::list, xsh_arclist::nbrejected, xsh_arclist::rejected, xsh_arclist::size, xsh_arcline_free(), xsh_arclist_is_rejected(), and XSH_ASSURE_NOT_NULL.
Referenced by xsh_arclist_clean_from_list(), and xsh_arclist_clean_from_list_not_flagged().
void xsh_arclist_clean_from_list | ( | xsh_arclist * | list, | |
double * | lambda, | |||
int | size | |||
) |
Clean an arclist according to a list of valid lambda.
[in] | list | The arclist (order by increasing wavelength) |
[in] | lambda | The lambda array (order by increasing wavelength) |
[in] | size | The size of lambda array |
Definition at line 393 of file xsh_data_arclist.c.
References check, xsh_arclist::nbrejected, xsh_arclist::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().
void xsh_arclist_clean_from_list_not_flagged | ( | xsh_arclist * | list, | |
double * | lambda, | |||
int * | flag, | |||
int | size | |||
) |
Definition at line 428 of file xsh_data_arclist.c.
References check, xsh_arclist::nbrejected, xsh_arclist::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_dan().
void xsh_arclist_free | ( | xsh_arclist ** | list | ) |
free memory associated to a arclist
list | the 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().
cpl_propertylist* xsh_arclist_get_header | ( | xsh_arclist * | list | ) |
get header of the table
list | the arclist |
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().
int xsh_arclist_get_nbrejected | ( | xsh_arclist * | list | ) |
get nb lines rejected in arcline list
list | pointer to arcline_list |
Definition at line 119 of file xsh_data_arclist.c.
References xsh_arclist::nbrejected, and XSH_ASSURE_NOT_NULL.
int xsh_arclist_get_size | ( | xsh_arclist * | list | ) |
get size of arcline list
list | pointer to arcline_list |
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().
float xsh_arclist_get_wavelength | ( | xsh_arclist * | list, | |
int | idx | |||
) |
get wavelength of a line in the arcline list
list | pointer to arcline_list | |
idx | index in the list |
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(), main(), theo_tab_filter(), theo_tab_model(), xsh_afcthetab_create(), xsh_arclist_clean_from_list(), and xsh_arclist_clean_from_list_not_flagged().
int xsh_arclist_is_rejected | ( | xsh_arclist * | list, | |
int | idx | |||
) |
give if a line is rejected
list | pointer to arcline_list | |
idx | Index of the arc in the list |
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().
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().
void xsh_arclist_lambda_sort | ( | xsh_arclist * | list | ) |
sort arcline list by increasing lambda
list | pointer 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* xsh_arclist_load | ( | cpl_frame * | frame | ) |
load an arcline list frame in arclist structure
frame | the table frame ARCLINE_LIST |
Definition at line 272 of file xsh_data_arclist.c.
References check, xsh_arcline::comment, xsh_arcline::flux, xsh_arclist::header, xsh_arclist::list, xsh_arcline::name, xsh_arclist::nbrejected, xsh_arclist::rejected, xsh_arclist::size, xsh_arcline::wavelength, xsh_arclist_free(), XSH_ARCLIST_TABLE_COLNAME_COMMENT, XSH_ARCLIST_TABLE_COLNAME_FLUX, XSH_ARCLIST_TABLE_COLNAME_NAME, XSH_ARCLIST_TABLE_COLNAME_WAVELENGTH, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_error_msg, xsh_get_table_value(), xsh_stringdup(), XSH_TABLE_FREE, and XSH_TABLE_LOAD.
Referenced by clean_arclist_data(), main(), xsh_afcthetab_create(), xsh_create_order_table(), xsh_detect_arclines(), and xsh_detect_arclines_dan().
void xsh_arclist_reject | ( | xsh_arclist * | list, | |
int | idx | |||
) |
reject a line from the list
list | pointer to arcline_list | |
idx | index 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().
void xsh_arclist_restore | ( | xsh_arclist * | list, | |
int | idx | |||
) |
restore a line from the list
list | pointer to arcline_list | |
idx | index 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.
cpl_frame* xsh_arclist_save | ( | xsh_arclist * | list, | |
const char * | filename, | |||
const char * | tag | |||
) |
save a arclist to a frame
list | the arclist structure to save | |
filename | the name of the save file on disk | |
tag | the frame tag |
Definition at line 500 of file xsh_data_arclist.c.
References check, xsh_arcline::comment, xsh_arcline::flux, xsh_arclist::header, xsh_arclist::list, xsh_arcline::name, xsh_arclist::size, xsh_arcline::wavelength, XSH_ARCLIST_TABLE_COLNAME_COMMENT, XSH_ARCLIST_TABLE_COLNAME_FLUX, XSH_ARCLIST_TABLE_COLNAME_NAME, XSH_ARCLIST_TABLE_COLNAME_WAVELENGTH, XSH_ARCLIST_TABLE_NB_COL, XSH_ARCLIST_TABLE_UNIT_COMMENT, XSH_ARCLIST_TABLE_UNIT_FLUX, XSH_ARCLIST_TABLE_UNIT_NAME, XSH_ARCLIST_TABLE_UNIT_WAVELENGTH, XSH_ASSURE_NOT_NULL, xsh_frame_product(), and XSH_TABLE_FREE.
Referenced by xsh_detect_arclines(), and xsh_detect_arclines_dan().
void xsh_dump_arclist | ( | xsh_arclist * | list | ) |
Dump main info about an arcline_list.
list | pointer 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.