#include <cpl.h>
#include <xsh_error.h>
Go to the source code of this file.
Defines | |
#define | XSH_TABLE_LOAD(TABLE, NAME) |
#define | XSH_TABLE_FREE(TABLE) |
#define | XSH_TABLE_GET_ARRAY(TYPE) |
Functions | |
cpl_error_code | xsh_get_table_value (const cpl_table *table, const char *colname, cpl_type coltype, int i, void *result) |
Read a table value from a fits table. | |
void | xsh_table_get_array_int (cpl_table *table, const char *colname, int *pointer, int nb) |
void | xsh_table_get_array_float (cpl_table *table, const char *colname, float *pointer, int nb) |
void | xsh_table_get_array_double (cpl_table *table, const char *colname, double *pointer, int nb) |
cpl_error_code | xsh_sort_table_1 (cpl_table *t, const char *column1, cpl_boolean reverse1) |
Sort a table by one column. | |
cpl_error_code | xsh_sort_table_2 (cpl_table *t, const char *column1, const char *column2, cpl_boolean reverse1, cpl_boolean reverse2) |
Sort a table by two columns. | |
double | xsh_data_interpolate (double wav, int nrow, double *pw, double *pe) |
Interpolate data points. | |
double | xsh_table_interpolate (cpl_table *tbl, double wav, const char *colx, const char *coly) |
Interpolate table columns. | |
cpl_error_code | xsh_frame_table_monitor_flux_qc (cpl_frame *frm, const char *colw, const char *colf, const char *prefix, xsh_instrument *instrument) |
Computes statistics on spectrum for QC. | |
cpl_error_code | xsh_wavecal_qclog_intmon (cpl_frame *table_check, const cpl_frame *line_intmon, const double exptime, xsh_instrument *inst) |
computes intmon QC log | |
cpl_error_code | xsh_table_merge_clean_and_resid_tabs (cpl_frame *frm_resid, cpl_frame *frm_clean) |
cpl_table * | xsh_table_shift_rv (cpl_table *orig, const char *col_wave, const double offset) |
#define XSH_TABLE_FREE | ( | TABLE | ) |
if (TABLE != NULL){\
cpl_table_delete ( TABLE);\
TABLE = NULL;\
}
Definition at line 44 of file xsh_utils_table.h.
Referenced by create_sky_mask(), fill_rectified(), main(), xsh_add_product_table(), xsh_arclist_load(), xsh_arclist_save(), xsh_atmos_ext_list_load(), xsh_compute_absorp(), xsh_compute_shift_ifu_slitlet(), xsh_linetilt_list_save(), xsh_localization_load(), xsh_localization_save(), xsh_localize_ifu_slitlet(), xsh_model_config_load_best(), xsh_model_reduce(), xsh_order_list_load(), xsh_rec_list_save(), xsh_rec_list_save2(), xsh_rec_list_save_table(), xsh_resid_order_2tab(), xsh_resid_order_load(), xsh_resid_order_save(), xsh_resid_tab_load(), xsh_resid_tab_save(), xsh_shift_offsettab(), xsh_shift_tab_load(), xsh_shift_tab_save(), xsh_slice_offset_load(), xsh_slice_offset_save(), xsh_spectralformat_list_load(), xsh_star_flux_list_load(), xsh_star_flux_list_save(), xsh_star_flux_list_save_order(), xsh_the_map_load(), xsh_the_map_save(), xsh_wavesol_load(), and xsh_wavesol_save().
#define XSH_TABLE_GET_ARRAY | ( | TYPE | ) |
void xsh_table_get_array_##TYPE( cpl_table* table, const char* colname, \ TYPE* pointer, int nb)\ {\ const cpl_array* array = NULL;\ int array_size = 0, k=0;\ const TYPE* data = NULL;\ \ XSH_ASSURE_NOT_NULL( pointer);\ check( array = cpl_table_get_array( table, colname, 0));\ check( array_size = cpl_array_get_size( array));\ XSH_ASSURE_NOT_ILLEGAL( nb == array_size);\ check( data = cpl_array_get_data_##TYPE##_const( array));\ for( k=0; k< array_size; k++){\ pointer[k] = data[k];\ }\ cleanup:\ return;\ }
Definition at line 51 of file xsh_utils_table.h.
#define XSH_TABLE_LOAD | ( | TABLE, | |||
NAME | ) |
check_msg( TABLE = cpl_table_load( NAME, 1, 0),\ "Can't load %s FITS table", NAME)
Definition at line 40 of file xsh_utils_table.h.
Referenced by create_sky_mask(), fill_rectified(), main(), xsh_arclist_load(), xsh_atmos_ext_list_load(), xsh_compute_absorp(), xsh_compute_shift_ifu_slitlet(), xsh_dispersol_list_load(), xsh_localization_load(), xsh_localize_ifu_slitlet(), xsh_localize_obj_auto(), xsh_model_reduce(), xsh_order_list_load(), xsh_order_split_qth_d2(), xsh_resid_order_load(), xsh_resid_tab_load(), xsh_shift_offsettab(), xsh_shift_tab_load(), xsh_slice_offset_load(), xsh_spectralformat_list_load(), xsh_star_flux_list_load(), xsh_the_map_load(), and xsh_wavesol_load().
void xsh_table_get_array_double | ( | cpl_table * | table, | |
const char * | colname, | |||
double * | pointer, | |||
int | nb | |||
) |
Referenced by xsh_rec_list_load().
void xsh_table_get_array_float | ( | cpl_table * | table, | |
const char * | colname, | |||
float * | pointer, | |||
int | nb | |||
) |
Referenced by xsh_rec_list_load().
void xsh_table_get_array_int | ( | cpl_table * | table, | |
const char * | colname, | |||
int * | pointer, | |||
int | nb | |||
) |