/home/amodigli/releases/xsh/1.2.10/pso/xsh.26608/xshp/xsh/xsh_utils_table.h File Reference

#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.

Define Documentation

#define XSH_TABLE_FREE ( TABLE   ) 
#define XSH_TABLE_GET_ARRAY ( TYPE   ) 
Value:
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   ) 

Function Documentation

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 
)

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