75 if (cpl_error_get_code() != CPL_ERROR_NONE) {
94 cpl_table *table = NULL;
95 cpl_propertylist* header = NULL;
96 const char* tablename = NULL;
103 check(tablename = cpl_frame_get_filename(frame));
107 check( header = cpl_propertylist_load(tablename,0));
111 check( cpl_propertylist_append(result->
header, header));
114 CPL_TYPE_DOUBLE, 0, &(result->
cen_up)));
116 CPL_TYPE_DOUBLE, 0, &(result->
cen_down)));
119 if (cpl_error_get_code () != CPL_ERROR_NONE) {
120 xsh_error_msg(
"can't load frame %s",cpl_frame_get_filename(frame));
160 cpl_propertylist *res = NULL;
185 cpl_table *table = NULL;
186 cpl_frame *result = NULL;
187 const char *tag = NULL ;
195 check( table = cpl_table_new( 1));
209 check( cpl_table_save( table, list->
header, NULL, filename,
216 CPL_FRAME_TYPE_TABLE, CPL_FRAME_GROUP_PRODUCT,
217 CPL_FRAME_LEVEL_TEMPORARY));
static xsh_instrument * instrument
xsh_slice_offset * xsh_slice_offset_create(void)
Create an empty slice_offset.
xsh_slice_offset * xsh_slice_offset_load(cpl_frame *frame)
Load a slice_offset from a frame.
cpl_frame * xsh_slice_offset_save(xsh_slice_offset *list, const char *filename, xsh_instrument *instrument)
Save an slice_offset list to a frame.
void xsh_slice_offset_free(xsh_slice_offset **list)
Free memory associated to a slice_offset.
cpl_propertylist * xsh_slice_offset_get_header(xsh_slice_offset *list)
Get header of the table.
#define xsh_error_msg(...)
#define XSH_ASSURE_NOT_NULL(pointer)
void xsh_free_propertylist(cpl_propertylist **p)
Deallocate a property list and set the pointer to NULL.
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.
cpl_propertylist * header
#define XSH_SLICE_OFFSET_TABLE_COLNAME_CEN_DOWN
#define XSH_SLICE_OFFSET_TABLE_UNIT_CEN_UP
#define XSH_SLICE_OFFSET_TABLE_UNIT_CEN_DOWN
#define XSH_SLICE_OFFSET_TABLE_COLNAME_CEN_UP
cpl_frame * xsh_frame_product(const char *fname, const char *tag, cpl_frame_type type, cpl_frame_group group, cpl_frame_level level)
Creates a frame with given characteristics.
#define XSH_GET_TAG_FROM_ARM(TAG, instr)
#define XSH_TABLE_NEW_COL(TABLE, NAME, UNIT, TYPE)
#define XSH_NEW_PROPERTYLIST(POINTER)
#define XSH_CALLOC(POINTER, TYPE, SIZE)
#define XSH_TABLE_LOAD(TABLE, NAME)
#define XSH_TABLE_FREE(TABLE)