DETMON Pipeline Reference Manual
1.3.0
|
Functions | |
irplib_framelist * | irplib_framelist_new (void) |
Create an empty framelist. More... | |
void | irplib_framelist_delete (irplib_framelist *self) |
Deallocate an irplib_framelist with its frames and properties. More... | |
irplib_framelist * | irplib_framelist_cast (const cpl_frameset *frameset) |
Create an irplib_framelist from a cpl_framelist. More... | |
cpl_frameset * | irplib_frameset_cast (const irplib_framelist *self) |
Create a CPL frameset from an irplib_framelist. More... | |
irplib_framelist * | irplib_framelist_extract (const irplib_framelist *self, const char *tag) |
Extract the frames with the given tag from a framelist. More... | |
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. More... | |
int | irplib_framelist_get_size (const irplib_framelist *self) |
Get the size of a framelist. More... | |
cpl_frame * | irplib_framelist_get (irplib_framelist *self, int pos) |
Get the specified frame from the framelist. More... | |
const cpl_frame * | irplib_framelist_get_const (const irplib_framelist *self, int pos) |
Get the specified frame from the framelist. More... | |
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. More... | |
cpl_propertylist * | irplib_framelist_get_propertylist (irplib_framelist *self, int pos) |
Get the propertylist of the specified frame in the framelist. More... | |
const cpl_propertylist * | irplib_framelist_get_propertylist_const (const irplib_framelist *self, int pos) |
Get the propertylist of the specified frame in the framelist. More... | |
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. More... | |
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. More... | |
cpl_error_code | irplib_framelist_set_tag_all (irplib_framelist *self, const char *tag) |
Set the tag of all frames in the list. More... | |
cpl_error_code | irplib_framelist_set (irplib_framelist *self, cpl_frame *frame, int pos) |
Add a frame to a framelist. More... | |
cpl_error_code | irplib_framelist_erase (irplib_framelist *self, int pos) |
Erase a frame from a framelist and delete it and its propertylist. More... | |
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. More... | |
void | irplib_framelist_empty (irplib_framelist *self) |
Erase all frames from a framelist. More... | |
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. More... | |
cpl_imagelist * | irplib_imagelist_load_framelist (const irplib_framelist *self, cpl_type pixeltype, int planenum, int extnum) |
Load an imagelist from a framelist. More... | |
This module implements a container type for frames and their propertylists. It differs from the cpl_frameset in these ways: 1) A propertylist can be associated to each frame 2) Access by index is a O(1)-operation 3) It can not be corrupted due to caching bugs (e.g. DFS02731).
irplib_framelist* irplib_framelist_cast | ( | const cpl_frameset * | frameset | ) |
Create an irplib_framelist from a cpl_framelist.
frameset | The cpl_frameset |
Definition at line 201 of file irplib_framelist.c.
References irplib_framelist_new(), and irplib_framelist_set().
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.
self | The framelist to verify |
key | Property that must be present for all the frames |
type | The type the property must have, or CPL_TYPE_INVALID |
is_equal | If true, the value must be identical for all keys |
fp_tol | The non-negative tolerance for floating point comparison |
To verify the presence of the MJD-OBS keyword:
To verify that the EXPTIME is identical to within 0.1 millisecond:
To verify that the keyword "ESO INS LAMP ST" is of type boolean and that it has the same value for all frames:
Definition at line 900 of file irplib_framelist.c.
void irplib_framelist_delete | ( | irplib_framelist * | self | ) |
Deallocate an irplib_framelist with its frames and properties.
self | the framelist |
Definition at line 183 of file irplib_framelist.c.
References irplib_framelist_empty().
Referenced by irplib_framelist_extract(), and irplib_framelist_extract_regexp().
void irplib_framelist_empty | ( | irplib_framelist * | self | ) |
Erase all frames from a framelist.
self | The framelist to modify, or NULL |
Definition at line 840 of file irplib_framelist.c.
Referenced by irplib_framelist_delete().
cpl_error_code irplib_framelist_erase | ( | irplib_framelist * | self, |
int | pos | ||
) |
Erase a frame from a framelist and delete it and its propertylist.
self | The non-empty framelist to modify |
pos | position of frame to delete (0 for first). |
Definition at line 744 of file irplib_framelist.c.
irplib_framelist* irplib_framelist_extract | ( | const irplib_framelist * | self, |
const char * | tag | ||
) |
Extract the frames with the given tag from a framelist.
self | A non-empty framelist |
tag | The frame tag to search for. |
Definition at line 281 of file irplib_framelist.c.
References irplib_framelist_delete(), irplib_framelist_new(), and irplib_framelist_set().
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.
self | A non-empty framelist |
regexp | The regular expression of frame tag(s) to search for. |
invert | Boolean to invert the sense of the pattern matching. |
Definition at line 351 of file irplib_framelist.c.
References irplib_framelist_delete(), irplib_framelist_new(), and irplib_framelist_set().
cpl_frame* irplib_framelist_get | ( | irplib_framelist * | self, |
int | pos | ||
) |
Get the specified frame from the framelist.
self | The framelist |
pos | position (0 for first) |
Definition at line 447 of file irplib_framelist.c.
References irplib_framelist_get_const().
const cpl_frame* irplib_framelist_get_const | ( | const irplib_framelist * | self, |
int | pos | ||
) |
Get the specified frame from the framelist.
self | The framelist |
pos | position (0 for first) |
Definition at line 464 of file irplib_framelist.c.
Referenced by irplib_framelist_get().
cpl_propertylist* irplib_framelist_get_propertylist | ( | irplib_framelist * | self, |
int | pos | ||
) |
Get the propertylist of the specified frame in the framelist.
self | The framelist |
pos | position (0 for first) |
Definition at line 520 of file irplib_framelist.c.
References irplib_framelist_get_propertylist_const().
const cpl_propertylist* irplib_framelist_get_propertylist_const | ( | const irplib_framelist * | self, |
int | pos | ||
) |
Get the propertylist of the specified frame in the framelist.
self | The framelist |
pos | position (0 for first) |
Definition at line 543 of file irplib_framelist.c.
Referenced by irplib_framelist_get_propertylist().
int irplib_framelist_get_size | ( | const irplib_framelist * | self | ) |
Get the size of a framelist.
self | The framelist |
Definition at line 429 of file irplib_framelist.c.
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.
self | The framelist to modify |
pos | position (0 for first). |
ind | The index of the date set to read |
regexp | The regular expression of properties to load |
invert | Boolean to invert the sense of the pattern matching. |
Definition at line 574 of file irplib_framelist.c.
Referenced by irplib_framelist_load_propertylist_all().
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.
self | The framelist to modify |
ind | The index of the date set to read |
regexp | The regular expression of properties to load |
invert | Boolean to invert the sense of the pattern matching. |
Definition at line 629 of file irplib_framelist.c.
References irplib_framelist_load_propertylist().
irplib_framelist* irplib_framelist_new | ( | void | ) |
Create an empty framelist.
Definition at line 170 of file irplib_framelist.c.
Referenced by irplib_framelist_cast(), irplib_framelist_extract(), and irplib_framelist_extract_regexp().
cpl_error_code irplib_framelist_set | ( | irplib_framelist * | self, |
cpl_frame * | frame, | ||
int | pos | ||
) |
Add a frame to a framelist.
self | The framelist to modify |
frame | The frame to insert into the framelist |
pos | position (0 for first). |
It is allowed to specify the position equal to the size of the list. This will increment the size of the list.
Definition at line 705 of file irplib_framelist.c.
Referenced by irplib_framelist_cast(), irplib_framelist_extract(), and irplib_framelist_extract_regexp().
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.
self | The framelist to modify |
pos | position (0 for first). |
list | The propertylist to copy |
Definition at line 487 of file irplib_framelist.c.
cpl_error_code irplib_framelist_set_tag_all | ( | irplib_framelist * | self, |
const char * | tag | ||
) |
Set the tag of all frames in the list.
self | The framelist to modify |
tag | The new tag of the frames |
Definition at line 673 of file irplib_framelist.c.
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.
self | The non-empty framelist to modify |
pos | position of frame to delete (0 for first). |
plist | Pointer to a propertylist or NULL |
The specified frame is removed from the framelist and its size is decreased by one. The frame is returned to the caller. The caller may also retrieve the propertylist of the frame by passing a non-NULL pointer. On success this may point to NULL, if a propertylist was not created for the frame. If the caller passes a NULL-pointer for the propertylist, the propertylist is deallocated.
Definition at line 794 of file irplib_framelist.c.
cpl_frameset* irplib_frameset_cast | ( | const irplib_framelist * | self | ) |
Create a CPL frameset from an irplib_framelist.
self | The framelist |
Definition at line 242 of file irplib_framelist.c.
cpl_imagelist* irplib_imagelist_load_framelist | ( | const irplib_framelist * | self, |
cpl_type | pixeltype, | ||
int | planenum, | ||
int | extnum | ||
) |
Load an imagelist from a framelist.
self | The framelist |
pixeltype | The required type of the pixels in the images |
planenum | The (non-negative ) plane number |
extnum | The non-negative extension (0 for primary data unit) |
Definition at line 1043 of file irplib_framelist.c.