GIRAFFE Pipeline Reference Manual

Tables

Functions

GiTable * giraffe_table_new (void)
 Creates a new, empty Giraffe table. More...
 
GiTable * giraffe_table_create (cpl_table *table, cpl_propertylist *properties)
 Creates a Giraffe table from a table and a property list. More...
 
void giraffe_table_delete (GiTable *self)
 Destroys a Giraffe table. More...
 
GiTable * giraffe_table_duplicate (const GiTable *src)
 Duplicate a Giraffe table. More...
 
void giraffe_table_clear (GiTable *self)
 Clears a Giraffe table. More...
 
cxint giraffe_table_copy_matrix (GiTable *table, const cxchar *name, cpl_matrix *matrix)
 Copies matrix elements into a table. More...
 
cxint giraffe_table_is_empty (GiTable *self)
 Check whether a Giraffe table is empty. More...
 
cpl_table * giraffe_table_get (const GiTable *self)
 Get the table data from a Giraffe table. More...
 
cxint giraffe_table_set (GiTable *self, cpl_table *table)
 Sets the table data. More...
 
cpl_propertylist * giraffe_table_get_properties (const GiTable *self)
 Gets the table properties. More...
 
cxint giraffe_table_set_properties (GiTable *self, cpl_propertylist *properties)
 Attaches a property list to an table. More...
 
cxint giraffe_table_load (GiTable *self, const cxchar *filename, cxint position, const cxchar *id)
 Reads a data set from a file into a Giraffe table. More...
 
cxint giraffe_table_save (GiTable *self, const cxchar *filename)
 Write a Giraffe table to a file. More...
 
cxint giraffe_table_attach (GiTable *self, const cxchar *filename, cxint position, const cxchar *id)
 Attach a Giraffe table to a file. More...
 
cxint giraffe_table_add_info (GiTable *table, const GiRecipeInfo *info, const cpl_frameset *set)
 Add additional frame information to a table. More...
 

Detailed Description

TBD

Function Documentation

cxint giraffe_table_add_info ( GiTable *  table,
const GiRecipeInfo *  info,
const cpl_frameset *  set 
)

Add additional frame information to a table.

TBD

Definition at line 844 of file gitable.c.

References giraffe_add_frameset_info(), giraffe_add_recipe_info(), and giraffe_table_get_properties().

cxint giraffe_table_attach ( GiTable *  self,
const cxchar *  filename,
cxint  position,
const cxchar *  id 
)

Attach a Giraffe table to a file.

Parameters
selfGiraffe table to attach.
filenameFile to which self is attached.
positionPosition of the data set within the file.
idData set identifier.
Returns
The function returns 0 on success and 1 otherwise.

The Giraffe table self is attached to the file filename as data set number position. If the data set identifier id is not NULL this name is added to the table properties, overwriting an already set identifier. The data set position must be greater or equal to 1.

Definition at line 757 of file gitable.c.

References giraffe_table_get(), and giraffe_table_get_properties().

void giraffe_table_clear ( GiTable *  self)

Clears a Giraffe table.

Parameters
selfThe Giraffe table to be emptied.
Returns
Nothing.

The function removes all possibly existing data from the table self. After calling this function self is empty.

Definition at line 228 of file gitable.c.

cxint giraffe_table_copy_matrix ( GiTable *  table,
const cxchar *  name,
cpl_matrix *  matrix 
)

Copies matrix elements into a table.

Parameters
tableThe table to which the matrix elements are copied.
nameThe name of the first target column.
matrixThe matrix whose elements will be copied.
Returns
The function returns 0 on success, or 1 otherwise.

The function copies the matrix elements of the source matrix matrix into consecutive columns of the table table starting at the column indicated by name. The matrix elements are transferred to the table in the following way. The columns of matrix will be the columns of the table and their rows will be the elements of the table column. The first row of the table will contain the elements of the first row of the matrix and so on.

In order to succeed, the target table's number of rows must match the number of matrix rows, and the number of table columns must not be less than the number of matrix columns (depending on the provided start column).

If name is NULL the first target column is the first column in the table.

Definition at line 267 of file gitable.c.

References giraffe_table_get().

Referenced by giraffe_compute_fiber_profiles(), and giraffe_localize_spectra().

GiTable* giraffe_table_create ( cpl_table *  table,
cpl_propertylist *  properties 
)

Creates a Giraffe table from a table and a property list.

Parameters
tableA table from which the new GiTable is created.
propertiesA property list to attach to the created table.
Returns
The newly created and initialized Giraffe table, or NULL in case of errors.

The function creates a new Giraffe table from an existing CPL table table. The source table is copied. Optionally a property list may be specified, which is attached (copied) to the newly created table if properties is not NULL.

Definition at line 123 of file gitable.c.

References giraffe_table_delete(), and giraffe_table_new().

Referenced by giraffe_compute_fiber_profiles(), and giraffe_localize_spectra().

void giraffe_table_delete ( GiTable *  self)

Destroys a Giraffe table.

Parameters
selfThe table to destroy.
Returns
Nothing.

The function deallocates the memory used by self.

Definition at line 162 of file gitable.c.

Referenced by giraffe_calibrate_slit(), giraffe_calibrate_wavelength(), giraffe_fiberlist_attach(), giraffe_fiberlist_create(), giraffe_fiberlist_load(), giraffe_fibers_setup(), giraffe_slitgeometry_load(), giraffe_table_create(), and giraffe_transmission_attach().

GiTable* giraffe_table_duplicate ( const GiTable *  src)

Duplicate a Giraffe table.

Returns
The newly allocated duplicate table.

The function duplicates an existing table

Definition at line 184 of file gitable.c.

References giraffe_table_get(), and giraffe_table_get_properties().

Referenced by giraffe_calibrate_slit(), and giraffe_fiberlist_attach().

cpl_propertylist* giraffe_table_get_properties ( const GiTable *  self)

Gets the table properties.

Parameters
selfA Giraffe table.
Returns
Pointer to the properties attached to self.

The function returns a pointer to properties self contains. The returned pointer might be a NULL pointer if no properties are attached to self.

Definition at line 497 of file gitable.c.

Referenced by giraffe_calibrate_slit(), giraffe_calibrate_wavelength(), giraffe_compute_fiber_profiles(), giraffe_fiberlist_attach(), giraffe_fiberlist_save(), giraffe_frame_attach_table(), giraffe_frame_create_table(), giraffe_localize_spectra(), giraffe_rebin_spectra(), giraffe_table_add_info(), giraffe_table_attach(), giraffe_table_duplicate(), giraffe_table_save(), giraffe_wcalsolution_create(), and giraffe_wlsolution_create().

cxint giraffe_table_is_empty ( GiTable *  self)

Check whether a Giraffe table is empty.

Parameters
selfThe table to check.
Returns
The function returns 1 if the table is empty and 0 otherwise.

The function checks whether self contains any table data or properties. A table is empty if it contains no data and no properties.

Definition at line 416 of file gitable.c.

cxint giraffe_table_load ( GiTable *  self,
const cxchar *  filename,
cxint  position,
const cxchar *  id 
)

Reads a data set from a file into a Giraffe table.

Parameters
selfThe Giraffe table to fill.
filenameName of the file.
positionPosition of the data set within the file from which the table is created.
idData set identifier
Returns
The function returns 0 on success, or a non-zero number in case of errors and sets the appropriate error code. If id is not NULL and the validation of the data set name fails the error CPL_ERROR_BAD_FILE_FORMAT. If the loading of either the table data, or the table properties fails the error codes are the ones set by cpl_table_load() and cpl_propertylist_load() respectively.

The function reads the data set number position from the file filename, allocates a new Giraffe table and fills it with the data set. Data sets are counted from zero.

If id, the data set identifier, is not NULL the given string is compared to the data set name. If this does not match id the function returns an error. If id is set to NULL the check on the data set name is skipped.

Definition at line 570 of file gitable.c.

Referenced by giraffe_fiberlist_create(), giraffe_fiberlist_load(), and giraffe_slitgeometry_load().

GiTable* giraffe_table_new ( void  )

Creates a new, empty Giraffe table.

Returns
The newly allocated table.

The function allocates memory for a new table and initializes it to be empty.

Definition at line 93 of file gitable.c.

Referenced by giraffe_calibrate_flux(), giraffe_calibrate_wavelength(), giraffe_fiberlist_create(), giraffe_fiberlist_load(), giraffe_fibers_select(), giraffe_fibers_setup(), giraffe_slitgeometry_load(), and giraffe_table_create().

cxint giraffe_table_save ( GiTable *  self,
const cxchar *  filename 
)

Write a Giraffe table to a file.

Parameters
selfGiraffe table to write.
filenameFile to which self is written.
Returns
The function returns 0 on success and 1 otherwise.

The Giraffe table self is written to the file filename. Currently a Giraffe table can only be written as a FITS table with the table data in the primary data unit. The image properties are written/converted to the primary FITS header.

Definition at line 644 of file gitable.c.

References giraffe_table_get(), and giraffe_table_get_properties().

Referenced by giraffe_frame_create_table().

cxint giraffe_table_set ( GiTable *  self,
cpl_table *  table 
)

Sets the table data.

Parameters
selfThe table to store the data.
tableThe source table the data is taken from.
Returns
The function returns 0 on success, or 1 in case of errors.

The function copies the table data of table into self.

Definition at line 464 of file gitable.c.

References giraffe_table_get().

Referenced by giraffe_calibrate_flux(), giraffe_calibrate_slit(), giraffe_fiberlist_associate(), giraffe_fibers_select(), giraffe_fibers_setup(), and giraffe_slitgeometry_load().

cxint giraffe_table_set_properties ( GiTable *  self,
cpl_propertylist *  properties 
)

Attaches a property list to an table.

Parameters
selfTable the properties will be attached to.
propertiesProperty list to attach.
Returns
The function returns 0 on success, or 1 otherwise.

The function stores a copy of the property list properties in the table container self.

If there is already a property list stored in the container self, it is replaced with the reference properties. If the properties cannot be copied, the function returns an error.

Definition at line 524 of file gitable.c.

Referenced by giraffe_calibrate_flux(), giraffe_calibrate_slit(), giraffe_fiberlist_attach(), and giraffe_fiberlist_save().


This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:42 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004