GIRAFFE Pipeline Reference Manual

Frame Utilities


Functions

cpl_frame * giraffe_frame_create (const cxchar *tag, cpl_frame_level level, const cpl_propertylist *properties, cxcptr object, cxcptr data, GiFrameCreator creator)
 Create a product frame using a provided frame creator.
cpl_frame * giraffe_frame_create_image (GiImage *image, const cxchar *tag, cpl_frame_level level, cxbool save, cxbool update)
 Create an image product frame.
cpl_frame * giraffe_frame_create_table (GiTable *table, const cxchar *tag, cpl_frame_level level, cxbool save, cxbool update)
 Create a table product frame.
cxint giraffe_frame_attach_table (cpl_frame *frame, GiTable *table, const cxchar *tag, cxbool update)
 Attach a table to a product frame.
cpl_frame * giraffe_get_frame (const cpl_frameset *set, const cxchar *tag, cpl_frame_group group)
 Get a product frame from a frame set.
cpl_frame * giraffe_get_slitgeometry (const cpl_frameset *set)
 Get the slit geometry frame from a frame set.

Detailed Description

This module defines the various symbols used as frame tags and provides utility functions to offer an easy way to create product frames.

Function Documentation

cxint giraffe_frame_attach_table cpl_frame *  frame,
GiTable *  table,
const cxchar *  tag,
cxbool  update
 

Attach a table to a product frame.

Parameters:
frame The frame to which the table is attached.
table The table to attach.
tag The product tag assigned to the table.
update Update table properties.
Returns:
The function returns 0 on success, or a non-zero number in case an error occurred. In the latter case an appropriate error is also set.
The function attaches (appends) the table table to the frame frame. This requires that the frame frame contains the name of an already existing file on disk to which the table can be attached. The tag tag is used as the name of the attached data set. The flag update controls the update of certain table properties. The update is done only if update is set to TRUE.

Definition at line 580 of file giframe.c.

References giraffe_table_get(), and giraffe_table_get_properties().

Referenced by giraffe_fiberlist_attach().

cpl_frame* giraffe_frame_create const cxchar *  tag,
cpl_frame_level  level,
const cpl_propertylist *  properties,
cxcptr  object,
cxcptr  data,
GiFrameCreator  creator
 

Create a product frame using a provided frame creator.

Parameters:
tag The product tag assigned to the frame.
level The product level of the product frame.
properties A property list used as the product frame's properties.
object The object to be saved as product frame.
data Extra data passed to the frame creator.
creator The frame creator.
Returns:
The function returns the newly created frame on success, or NULL if an error occurrs. In the latter case an appropriate error is also set.
The function creates a product frame from a generic data object object assigning the tag tag and the product level level to it. The actual creation of the local file the created product frame points to is delegated to a user defined function, which converts object to a local FITS file. This function creator must have the prototype:
     cxint foo(cxcptr object, cpl_propertylist *properties,
               const cxchar *filename, cxcptr data);

The argument filename passed to creator is generated from tag by changing all capital letters to lower case letters and appending the extension '.fits'

Definition at line 245 of file giframe.c.

cpl_frame* giraffe_frame_create_image GiImage *  image,
const cxchar *  tag,
cpl_frame_level  level,
cxbool  save,
cxbool  update
 

Create an image product frame.

Parameters:
image The image from which the frame is created.
tag The product tag assigned to the image.
level The product level of the image.
save Output file creation flag.
update Update image properties.
Returns:
The function returns the newly created frame on success, or NULL if an error occurrs. In the latter case an appropriate error is also set.
The function creates a frame object from the input image image. The frame's tag is set to tag and the frame's product level is set to level. If the flag save is TRUE the image is written to disk, otherwise only the frame is created and filled. The flag update controls the update of certain image properties. The update is done only if update is set to TRUE. If update and save are both TRUE the update of the image properties occurrs before the image is written to disk.

Definition at line 339 of file giframe.c.

References giraffe_image_get(), giraffe_image_get_properties(), and giraffe_image_save().

cpl_frame* giraffe_frame_create_table GiTable *  table,
const cxchar *  tag,
cpl_frame_level  level,
cxbool  save,
cxbool  update
 

Create a table product frame.

Parameters:
table The table from which the frame is created.
tag The product tag assigned to the table.
level The product level of the table.
save Output file creation flag.
update Update table properties.
Returns:
The function returns the newly created frame on success, or NULL if an error occurrs. In the latter case an appropriate error is also set.
The function creates a frame object from the input table table. The frame's tag is set to tag and the frame's product level is set to level. If the flag save is TRUE the table is written to disk, otherwise only the frame is created and filled. The flag update controls the update of certain table properties. The update is done only if update is set to TRUE. If update and save are both TRUE the update of the table properties occurrs before the table is written to disk.

Definition at line 478 of file giframe.c.

References giraffe_table_get_properties(), and giraffe_table_save().

Referenced by giraffe_slitgeometry_save().

cpl_frame* giraffe_get_frame const cpl_frameset *  set,
const cxchar *  tag,
cpl_frame_group  group
 

Get a product frame from a frame set.

Parameters:
set The frame set to query.
tag The product tag to look for.
Returns:
A handle for the product frame, or NULL if no such product was found.
The function searches the frame set set for the first product frame with the tag tag.

Definition at line 673 of file giframe.c.

cpl_frame* giraffe_get_slitgeometry const cpl_frameset *  set  ) 
 

Get the slit geometry frame from a frame set.

Parameters:
set The frame set to be queried.
Returns:
The function returns a handle for the slit geometry frame, or NULL if no slit geometry frame was found or an error occurred.
The function searches the frame set set for a slit geometry frame. It first looks for a setup specific slitgeometry and then for a slit geometry master. The slitgeometry frames are identified by the tags GIFRAME_SLITSETUP and GIFRAME_SLITMASTER respectively. If none of the two is found the tag GIFRAME_SLITGEOMETRY is tried as a last resort.

Definition at line 723 of file giframe.c.


This file is part of the GIRAFFE Pipeline Reference Manual 2.5.1.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Tue Mar 18 10:47:45 2008 by doxygen 1.4.6 written by Dimitri van Heesch, © 1997-2004