|
|
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.
|
|
This module defines the various symbols used as frame tags and provides utility functions to offer an easy way to create product frames.
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 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.
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 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.
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 540 of file giframe.c.
References giraffe_table_get_properties(), and giraffe_table_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.
The function calls creator for the filename stored in the input frame frame.
Definition at line 332 of file giframe.c.
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.
The function searches the frame set set for the first frame with the tag tag in the group group.
Definition at line 736 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 783 of file giframe.c.
|