Functions | |
| irplib_framelist * | irplib_framelist_new (void) |
| Create an empty framelist. | |
| void | irplib_framelist_delete (irplib_framelist *self) |
| Deallocate an irplib_framelist with its frames and properties. | |
| irplib_framelist * | irplib_framelist_cast (const cpl_frameset *frameset) |
| Create an irplib_framelist from a cpl_framelist. | |
| cpl_frameset * | irplib_frameset_cast (const irplib_framelist *self) |
| Create a CPL frameset from an irplib_framelist. | |
| irplib_framelist * | irplib_framelist_extract (const irplib_framelist *self, const char *tag) |
| Extract the frames with the given tag from a framelist. | |
| irplib_framelist * | irplib_framelist_extract_regexp (const irplib_framelist *self, const char *regexp, cpl_boolean invert) |
| Extract the frames with the given tag from a framelist. | |
| int | irplib_framelist_get_size (const irplib_framelist *self) |
| Get the size of a framelist. | |
| cpl_frame * | irplib_framelist_get (irplib_framelist *self, int pos) |
| Get the specified frame from the framelist. | |
| const cpl_frame * | irplib_framelist_get_const (const irplib_framelist *self, int pos) |
| Get the specified frame from the framelist. | |
| cpl_error_code | irplib_framelist_set_propertylist (irplib_framelist *self, int pos, const cpl_propertylist *list) |
| Duplicate a propertylist to the specified position in the framelist. | |
| cpl_propertylist * | irplib_framelist_get_propertylist (irplib_framelist *self, int pos) |
| Get the propertylist of the specified frame in the framelist. | |
| const cpl_propertylist * | irplib_framelist_get_propertylist_const (const irplib_framelist *self, int pos) |
| Get the propertylist of the specified frame in the framelist. | |
| cpl_error_code | irplib_framelist_load_propertylist (irplib_framelist *self, int pos, int ind, const char *regexp, cpl_boolean invert) |
| Load the propertylist of the specified frame in the framelist. | |
| cpl_error_code | irplib_framelist_load_propertylist_all (irplib_framelist *self, int ind, const char *regexp, cpl_boolean invert) |
| Load the propertylists of all frames in the framelist. | |
| cpl_error_code | irplib_framelist_set_tag_all (irplib_framelist *self, const char *tag) |
| Set the tag of all frames in the list. | |
| cpl_error_code | irplib_framelist_set (irplib_framelist *self, cpl_frame *frame, int pos) |
| Add a frame to a framelist. | |
| cpl_error_code | irplib_framelist_erase (irplib_framelist *self, int pos) |
| Erase a frame from a framelist and delete it and its propertylist. | |
| cpl_frame * | irplib_framelist_unset (irplib_framelist *self, int pos, cpl_propertylist **plist) |
| Erase a frame from a framelist and return it to the caller. | |
| void | irplib_framelist_empty (irplib_framelist *self) |
| Erase all frames from a framelist. | |
| cpl_error_code | irplib_framelist_contains (const irplib_framelist *self, const char *key, cpl_type type, cpl_boolean is_equal, double fp_tol) |
| Verify that a property is present for all frames. | |
| cpl_imagelist * | irplib_imagelist_load_framelist (const irplib_framelist *self, cpl_type pixeltype, int planenum, int extnum) |
| Load an imagelist from a framelist. | |
#include <irplib_framelist.h>
static int rrecipe(cpl_frameset * frameset) { // Error handling omitted for brevity irplib_framelist * allframes = irplib_framelist_cast(frameset); // Get raw frames of either type irplib_framelist * rawframes = irplib_framelist_extract_regexp(allframes, "^(" RAW_TYPE1 "|" RAW_TYPE2 ")$", CPL_FALSE); // Load the list of images cpl_imagelist * ilist = irplib_imagelist_load_framelist(rawframes, CPL_TYPE_FLOAT, 0, 0); const cpl_propertylist * plist; // A regular expression of the FITS cards needed by this recipe const char cards[] = "^(RA|DEC|EXPTIME)$"; double ra, dec; // Load the specified FITS cards for all raw frames irplib_framelist_load_propertylist_all(rawframes, 0, cards, CPL_FALSE)); // Verify the presence and uniformity of the FITS cards if (irplib_framelist_contains(rawframes, "RA", CPL_TYPE_DOUBLE, CPL_TRUE, 1e-5)) { // RA is missing in one or more headers // - or it varies by more than 1e-5 } if (irplib_framelist_contains(rawframes, "DEC", CPL_TYPE_DOUBLE, CPL_TRUE, 1e-5)) { // DEC is missing in one or more headers // - or it varies by more than 1e-5 } // Process the FITS cards plist = irplib_framelist_get_propertylist_const(rawframes, 0); ra = cpl_propertylist_get_double(plist, "RA"); dec = cpl_propertylist_get_double(plist, "DEC"); // Object deallocation irplib_framelist_delete(allframes); irplib_framelist_delete(rawframes); cpl_imagelist_delete(ilist); return 0; }
|
|
Create an empty framelist.
Definition at line 183 of file irplib_framelist.c. Referenced by irplib_framelist_cast(), irplib_framelist_extract(), and irplib_framelist_extract_regexp(). |
|
|
Deallocate an irplib_framelist with its frames and properties.
Definition at line 196 of file irplib_framelist.c. References irplib_framelist_empty(). Referenced by irplib_framelist_extract(), and irplib_framelist_extract_regexp(). |
|
|
Create an irplib_framelist from a cpl_framelist.
Definition at line 214 of file irplib_framelist.c. References irplib_framelist_new(), and irplib_framelist_set(). |
|
|
Create a CPL frameset from an irplib_framelist.
Definition at line 256 of file irplib_framelist.c. |
|
||||||||||||
|
Extract the frames with the given tag from a framelist.
Definition at line 295 of file irplib_framelist.c. References irplib_framelist_delete(), and irplib_framelist_new(). |
|
||||||||||||||||
|
Extract the frames with the given tag from a framelist.
Definition at line 359 of file irplib_framelist.c. References irplib_framelist_delete(), and irplib_framelist_new(). |
|
|
Get the size of a framelist.
Definition at line 431 of file irplib_framelist.c. |
|
||||||||||||
|
Get the specified frame from the framelist.
Definition at line 449 of file irplib_framelist.c. References irplib_framelist_get_const(). |
|
||||||||||||
|
Get the specified frame from the framelist.
Definition at line 465 of file irplib_framelist.c. Referenced by irplib_framelist_get(). |
|
||||||||||||||||
|
Duplicate a propertylist to the specified position in the framelist.
Definition at line 488 of file irplib_framelist.c. |
|
||||||||||||
|
Get the propertylist of the specified frame in the framelist.
Definition at line 521 of file irplib_framelist.c. References irplib_framelist_get_propertylist_const(). |
|
||||||||||||
|
Get the propertylist of the specified frame in the framelist.
Definition at line 543 of file irplib_framelist.c. Referenced by irplib_framelist_get_propertylist(). |
|
||||||||||||||||||||||||
|
Load the propertylist of the specified frame in the framelist.
Definition at line 574 of file irplib_framelist.c. References irplib_error_push. Referenced by irplib_framelist_load_propertylist_all(). |
|
||||||||||||||||||||
|
Load the propertylists of all frames in the framelist.
Definition at line 625 of file irplib_framelist.c. References irplib_framelist_load_propertylist(). |
|
||||||||||||
|
Set the tag of all frames in the list.
Definition at line 669 of file irplib_framelist.c. |
|
||||||||||||||||
|
Add a frame to a framelist.
Definition at line 701 of file irplib_framelist.c. Referenced by irplib_framelist_cast(). |
|
||||||||||||
|
Erase a frame from a framelist and delete it and its propertylist.
Definition at line 740 of file irplib_framelist.c. |
|
||||||||||||||||
|
Erase a frame from a framelist and return it to the caller.
Definition at line 790 of file irplib_framelist.c. |
|
|
Erase all frames from a framelist.
Definition at line 836 of file irplib_framelist.c. Referenced by irplib_framelist_delete(). |
|
||||||||||||||||||||||||
|
Verify that a property is present for all frames.
irplib_framelist_contains(myframes, "MJD-OBS", CPL_TYPE_INVALID, CPL_FALSE, 0.0); To verify that the EXPTIME is identical to within 0.1 millisecond: irplib_framelist_contains(myframes, "EXPTIME", CPL_TYPE_INVALID, CPL_TRUE, 0.0001); To verify that the keyword "ESO INS LAMP ST" is of type boolean and that it has the same value for all frames: irplib_framelist_contains(myframes, "ESO INS LAMP ST", CPL_TYPE_BOOL, CPL_TRUE, 0.0); Definition at line 896 of file irplib_framelist.c. References irplib_error_push. |
|
||||||||||||||||||||
|
Load an imagelist from a framelist.
Definition at line 1007 of file irplib_framelist.c. References irplib_error_push. |
1.4.6