GIRAFFE Pipeline Reference Manual

Tables

Functions

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

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 778 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:
self Giraffe table to attach.
filename File to which self is attached.
position Position of the data set within the file.
id Data 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 706 of file gitable.c.

References giraffe_table_get(), and giraffe_table_get_properties().

void giraffe_table_clear ( GiTable *  self  ) 

Clears a Giraffe table.

Parameters:
self The 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 227 of file gitable.c.

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

Copies matrix elements into a table.

Parameters:
table The table to which the matrix elements are copied.
name The name of the first target column.
matrix The 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 266 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:
table A table from which the new GiTable is created.
properties A 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 122 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:
self The table to destroy.
Returns:
Nothing.

The function deallocates the memory used by self.

Definition at line 161 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(), giraffe_transmission_attach(), and giraffe_wavelength_calibration().

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 183 of file gitable.c.

References giraffe_table_get(), and giraffe_table_get_properties().

Referenced by giraffe_calibrate_slit(), giraffe_fiberlist_attach(), and giraffe_wavelength_calibration().

cpl_propertylist* giraffe_table_get_properties ( const GiTable *  self  ) 

Gets the table properties.

Parameters:
self A 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 490 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_wavelength_calibration(), giraffe_wcalsolution_create(), and giraffe_wlsolution_create().

cxint giraffe_table_is_empty ( GiTable *  self  ) 

Check whether a Giraffe table is empty.

Parameters:
self The 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 409 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:
self The Giraffe table to fill.
filename Name of the file.
position Position of the data set within the file from which the table is created.
id Data 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 563 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 92 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(), giraffe_table_create(), and giraffe_wavelength_calibration().

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

Write a Giraffe table to a file.

Parameters:
self Giraffe table to write.
filename File 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 637 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:
self The table to store the data.
table The 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 457 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:
self Table the properties will be attached to.
properties Property 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 517 of file gitable.c.

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


This file is part of the GIRAFFE Pipeline Reference Manual 2.8.8.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri Mar 4 10:50:29 2011 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004