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. | |
cxint | giraffe_frame_save (const cpl_frame *frame, const cpl_propertylist *properties, cxcptr object, cxcptr data, GiFrameCreator creator) |
Save a data object to a frame. | |
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 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.
TRUE
.
Definition at line 642 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.
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'
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.
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 401 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.
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 540 of file giframe.c.
References giraffe_table_get_properties(), and giraffe_table_save().
Referenced by giraffe_slitgeometry_save().
cxint giraffe_frame_save | ( | const cpl_frame * | frame, | |
const cpl_propertylist * | properties, | |||
cxcptr | object, | |||
cxcptr | data, | |||
GiFrameCreator | creator | |||
) |
Save a data object to a frame.
- Parameters:
-
frame The frame the object is written to. properties The property list to be saved with the object. object The data object to save. data Extra data passed to the frame creator delegate. creator The creator function of the actual file.
- Returns:
- The function passes the return code of creator back to its caller. In case an error occurs in the function itself, the value
127
is returned.
cpl_frame* giraffe_get_frame | ( | const cpl_frameset * | set, | |
const cxchar * | tag, | |||
cpl_frame_group | group | |||
) |
Get a frame from a frame set.
- Parameters:
-
set The frame set to query. tag The frame tag to look for. group The frame group to look for.
- Returns:
- A handle for the product frame, or
NULL
if no such product was found.
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.
GIFRAME_SLITSETUP
and GIFRAME_SLITMASTER
respectively. If none of the two is found the tag GIFRAME_SLITGEOMETRY is tried as a last resort.