Functions | |
static int | xsh_the_map_lambda_compare (const void *one, const void *two) |
static int | xsh_the_map_lambda_order_slit_compare (const void *one, const void *two) |
void | xsh_the_map_lambda_sort (xsh_the_map *list) |
sort the_map arcline list by increasing lambda | |
void | xsh_the_map_lambda_order_slit_sort (xsh_the_map *list) |
int | xsh_the_map_get_size (xsh_the_map *list) |
get size of the map list | |
double | xsh_the_map_get_detx (xsh_the_map *list, int idx) |
get detx of the map list | |
double | xsh_the_map_get_dety (xsh_the_map *list, int idx) |
get dety of the map list | |
float | xsh_the_map_get_wavelength (xsh_the_map *list, int idx) |
get wavelength of the map list | |
int | xsh_the_map_get_order (xsh_the_map *list, int idx) |
get order of the map list | |
int | xsh_the_map_get_slit_index (xsh_the_map *list, int idx) |
get slit position of the map list | |
float | xsh_the_map_get_slit_position (xsh_the_map *list, int idx) |
get slit position of the map list | |
void | xsh_dump_the_map (xsh_the_map *the) |
Dump main info about the_map. | |
void | xsh_the_map_set_arcline (xsh_the_map *list, int idx, float wavelength, int order, int slit_index, float slit_position, double detx, double dety) |
xsh_the_map * | xsh_the_map_create (int size) |
Create an empty theoretical map. | |
xsh_the_map * | xsh_the_map_load (cpl_frame *frame) |
load a theoretical map frame in the_map structure. Suppress spurious entries in the THE MAP (marked with wavelength = 0). | |
void | xsh_the_arcline_free (xsh_the_arcline **arc) |
free memory associated to a the_arcline | |
void | xsh_the_map_free (xsh_the_map **list) |
free memory associated to a the_map | |
cpl_frame * | xsh_the_map_save (xsh_the_map *list, const char *filename) |
save a the_map to a frame |
void xsh_dump_the_map | ( | xsh_the_map * | the | ) |
Dump main info about the_map.
the | Pointer to the theoretical map structure |
Definition at line 297 of file xsh_data_the_map.c.
References assure, xsh_the_arcline::detector_x, xsh_the_arcline::detector_y, xsh_the_map::list, xsh_the_arcline::order, xsh_the_map::size, xsh_the_arcline::slit_position, xsh_the_arcline::wavelength, and xsh_msg.
void xsh_the_arcline_free | ( | xsh_the_arcline ** | arc | ) |
free memory associated to a the_arcline
arc | the the_arcline to free |
Definition at line 473 of file xsh_data_the_map.c.
Referenced by xsh_the_map_free().
xsh_the_map* xsh_the_map_create | ( | int | size | ) |
Create an empty theoretical map.
size | The size of the theoretical map |
Definition at line 346 of file xsh_data_the_map.c.
References xsh_the_map::list, xsh_the_map::size, XSH_ASSURE_NOT_ILLEGAL, XSH_CALLOC, and xsh_the_map_free().
Referenced by xsh_afcthetab_create().
void xsh_the_map_free | ( | xsh_the_map ** | list | ) |
free memory associated to a the_map
list | the the_map to free |
Definition at line 486 of file xsh_data_the_map.c.
References xsh_free_propertylist(), and xsh_the_arcline_free().
Referenced by main(), xsh_afcthetab_create(), xsh_detect_arclines(), xsh_detect_arclines_dan(), and xsh_the_map_create().
double xsh_the_map_get_detx | ( | xsh_the_map * | list, | |
int | idx | |||
) |
get detx of the map list
list | pointer to arcline_list | |
idx | index in the arcline list |
Definition at line 165 of file xsh_data_the_map.c.
References xsh_the_arcline::detector_x, xsh_the_map::list, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by main(), and theo_tab_filter().
double xsh_the_map_get_dety | ( | xsh_the_map * | list, | |
int | idx | |||
) |
get dety of the map list
list | pointer to arcline_list | |
idx | index in the arcline list |
Definition at line 186 of file xsh_data_the_map.c.
References xsh_the_arcline::detector_y, xsh_the_map::list, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by main(), and theo_tab_filter().
int xsh_the_map_get_order | ( | xsh_the_map * | list, | |
int | idx | |||
) |
get order of the map list
list | pointer to arcline_list | |
idx | index in the arcline list |
Definition at line 231 of file xsh_data_the_map.c.
References xsh_the_map::list, xsh_the_arcline::order, size, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by main(), and theo_tab_filter().
int xsh_the_map_get_size | ( | xsh_the_map * | list | ) |
get size of the map list
list | pointer to arcline_list |
Definition at line 146 of file xsh_data_the_map.c.
References xsh_the_map::size, and XSH_ASSURE_NOT_NULL.
Referenced by main(), and theo_tab_filter().
int xsh_the_map_get_slit_index | ( | xsh_the_map * | list, | |
int | idx | |||
) |
get slit position of the map list
list | pointer to arcline_list | |
idx | index in the arcline list |
Definition at line 254 of file xsh_data_the_map.c.
References xsh_the_map::list, size, xsh_the_arcline::slit_index, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by theo_tab_filter().
float xsh_the_map_get_slit_position | ( | xsh_the_map * | list, | |
int | idx | |||
) |
get slit position of the map list
list | pointer to arcline_list | |
idx | index in the arcline list |
Definition at line 276 of file xsh_data_the_map.c.
References xsh_the_map::list, size, xsh_the_arcline::slit_position, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by main(), and theo_tab_filter().
float xsh_the_map_get_wavelength | ( | xsh_the_map * | list, | |
int | idx | |||
) |
get wavelength of the map list
list | pointer to arcline_list | |
idx | index in the arcline list |
Definition at line 209 of file xsh_data_the_map.c.
References xsh_the_map::list, size, xsh_the_arcline::wavelength, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by main(), and theo_tab_filter().
static int xsh_the_map_lambda_compare | ( | const void * | one, | |
const void * | two | |||
) | [static] |
Definition at line 57 of file xsh_data_the_map.c.
References xsh_the_arcline::wavelength.
Referenced by xsh_the_map_lambda_sort().
static int xsh_the_map_lambda_order_slit_compare | ( | const void * | one, | |
const void * | two | |||
) | [static] |
Definition at line 76 of file xsh_data_the_map.c.
References xsh_the_arcline::wavelength, and WAVELENGTH_PRECISION.
Referenced by xsh_the_map_lambda_order_slit_sort().
void xsh_the_map_lambda_order_slit_sort | ( | xsh_the_map * | list | ) |
Definition at line 133 of file xsh_data_the_map.c.
References xsh_the_map::list, xsh_the_map::size, and xsh_the_map_lambda_order_slit_compare().
Referenced by xsh_detect_arclines(), and xsh_detect_arclines_dan().
void xsh_the_map_lambda_sort | ( | xsh_the_map * | list | ) |
sort the_map arcline list by increasing lambda
list | pointer to arcline_list |
Definition at line 127 of file xsh_data_the_map.c.
References xsh_the_map::list, xsh_the_map::size, and xsh_the_map_lambda_compare().
xsh_the_map* xsh_the_map_load | ( | cpl_frame * | frame | ) |
load a theoretical map frame in the_map structure. Suppress spurious entries in the THE MAP (marked with wavelength = 0).
frame | The Theoretical Map frame |
Definition at line 385 of file xsh_data_the_map.c.
References assure, check, check_msg, xsh_the_arcline::detector_x, xsh_the_arcline::detector_y, xsh_the_map::header, xsh_the_map::list, xsh_the_arcline::order, xsh_the_map::size, xsh_the_arcline::slit_index, xsh_the_arcline::slit_position, xsh_the_arcline::wavelength, WAVELENGTH_PRECISION, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_free_propertylist(), xsh_get_table_value(), xsh_msg_dbg_medium, XSH_TABLE_FREE, XSH_TABLE_LOAD, XSH_THE_MAP_TABLE_COLNAME_DETECTORX, XSH_THE_MAP_TABLE_COLNAME_DETECTORY, XSH_THE_MAP_TABLE_COLNAME_ORDER, XSH_THE_MAP_TABLE_COLNAME_SLITINDEX, XSH_THE_MAP_TABLE_COLNAME_SLITPOSITION, and XSH_THE_MAP_TABLE_COLNAME_WAVELENGTH.
Referenced by main(), xsh_detect_arclines(), and xsh_detect_arclines_dan().
cpl_frame* xsh_the_map_save | ( | xsh_the_map * | list, | |
const char * | filename | |||
) |
save a the_map to a frame
list | the the_map structure to save | |
filename | the name of the save file on disk |
Definition at line 513 of file xsh_data_the_map.c.
References check, xsh_the_arcline::detector_x, xsh_the_arcline::detector_y, xsh_the_map::list, xsh_the_arcline::order, xsh_the_map::size, xsh_the_arcline::slit_index, xsh_the_arcline::slit_position, xsh_the_arcline::wavelength, XSH_ASSURE_NOT_NULL, xsh_frame_product(), XSH_TABLE_FREE, XSH_THE_MAP_TABLE_COLNAME_DETECTORX, XSH_THE_MAP_TABLE_COLNAME_DETECTORY, XSH_THE_MAP_TABLE_COLNAME_ORDER, XSH_THE_MAP_TABLE_COLNAME_SLITINDEX, XSH_THE_MAP_TABLE_COLNAME_SLITPOSITION, XSH_THE_MAP_TABLE_COLNAME_WAVELENGTH, XSH_THE_MAP_TABLE_NB_COL, XSH_THE_MAP_TABLE_UNIT_DETECTORX, XSH_THE_MAP_TABLE_UNIT_DETECTORY, XSH_THE_MAP_TABLE_UNIT_ORDER, XSH_THE_MAP_TABLE_UNIT_SLITPOSITION, and XSH_THE_MAP_TABLE_UNIT_WAVELENGTH.
Referenced by xsh_afcthetab_create().
void xsh_the_map_set_arcline | ( | xsh_the_map * | list, | |
int | idx, | |||
float | wavelength, | |||
int | order, | |||
int | slit_index, | |||
float | slit_position, | |||
double | detx, | |||
double | dety | |||
) |
Definition at line 316 of file xsh_data_the_map.c.
References xsh_the_arcline::detector_x, xsh_the_arcline::detector_y, xsh_the_map::list, xsh_the_arcline::order, xsh_the_map::size, xsh_the_arcline::slit_index, xsh_the_arcline::slit_position, xsh_the_arcline::wavelength, XSH_ASSURE_NOT_ILLEGAL, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_afcthetab_create().