MUSE Pipeline Reference Manual
2.1.1
|
Data Structures | |
struct | muse_table |
Structure to store a table together with a property list. More... | |
Functions | |
muse_table * | muse_table_new (void) |
Allocate memory for a new muse_table object. More... | |
void | muse_table_delete (muse_table *aTable) |
Deallocate memory associated to a muse_table object. More... | |
muse_table * | muse_table_load (const char *aFilename, unsigned char aIFU) |
Load a table file and its primary FITS header. More... | |
cpl_error_code | muse_table_save (muse_table *aTable, const char *aFilename) |
Save the data and the FITS headers of a MUSE table to a file. More... | |
This module contains a simple wrapper around the cpl_table object, so that we can easily pass a table together with its properties (i.e. its primary FITS header) around to between functions.
void muse_table_delete | ( | muse_table * | aTable | ) |
Deallocate memory associated to a muse_table object.
aTable | input MUSE table |
Just calls cpl_table_delete()
and cpl_propertylist_delete()
for the four components of a muse_table
, and frees memory for the aTable pointer. As a safeguard, it checks if a valid pointer was passed, so that crashes cannot occur.
Definition at line 80 of file muse_table.c.
Referenced by muse_flux_object_delete(), muse_postproc_cube_resample_and_collapse(), muse_postproc_process_exposure(), muse_postproc_properties_delete(), muse_processing_load_ctable(), muse_processing_load_table(), muse_table_load(), muse_table_load_filter(), and muse_wcs_locate_sources().
muse_table* muse_table_load | ( | const char * | aFilename, |
unsigned char | aIFU | ||
) |
Load a table file and its primary FITS header.
aFilename | name of the file to load |
aIFU | MUSE IFU to load the data for (0 for generic tables). |
muse_table *
or NULL on error muse_table_delete()
. header
component.set CPL_ERROR_NULL_INPUT, return NULL | aFilename is NULL |
return NULL, propagate CPL error code | cpl_table_load() fails |
Definition at line 106 of file muse_table.c.
References header, muse_pfits_get_extname(), muse_table_delete(), muse_table_new(), muse_utils_get_extension_for_ifu(), and table.
Referenced by muse_processing_load_table().
muse_table* muse_table_new | ( | void | ) |
Allocate memory for a new muse_table
object.
muse_table *
or NULL
on error muse_table_delete()
. cpl_table_new()
or cpl_propertylist_new()
, respectively, or equivalent functions.Simply allocate memory to store the pointers of the muse_table
structure.
Definition at line 63 of file muse_table.c.
Referenced by muse_flux_get_response_table(), muse_flux_get_telluric_table(), muse_table_load(), and muse_table_load_filter().
cpl_error_code muse_table_save | ( | muse_table * | aTable, |
const char * | aFilename | ||
) |
Save the data and the FITS headers of a MUSE table to a file.
aTable | input MUSE table |
aFilename | name of the output file |
muse_table
structure.return CPL_ERROR_NULL_INPUT | aImage or aFilename are NULL |
return CPL error code | failure to save any of the components |
Definition at line 173 of file muse_table.c.
Referenced by muse_processing_save_table().