|
MOONS Pipeline Reference Manual 0.13.1
|
Functions | |
| moo_scilist * | moo_scilist_new (void) |
| Create a new moo_scilist. | |
| moo_sci * | moo_scilist_unset (moo_scilist *self, cpl_size pos) |
| Remove a SCI from a SCI list. | |
| void | moo_scilist_empty (moo_scilist *self) |
| Empty an moo_scilist and deallocate all its SCI. | |
| void | moo_scilist_unwrap (moo_scilist *self) |
| Free memory used by a moo_scilist object, except the SCI. | |
| void | moo_scilist_delete (moo_scilist *self) |
| Free all memory used by a moo_scilist object including the SCI. | |
| cpl_size | moo_scilist_get_size (const moo_scilist *self) |
| Get the number of SCI in the scilist. | |
| cpl_error_code | moo_scilist_set (moo_scilist *self, moo_sci *sci, cpl_size pos) |
| Insert a SCI into an moo_scilist. | |
| cpl_error_code | moo_scilist_push (moo_scilist *self, moo_sci *sci) |
| Insert a SCI a the end of moo_scilist. | |
| moo_scilist * | moo_scilist_create (cpl_frameset *frameset) |
| Create a new moo_scilist from the given SCI frameset. | |
| moo_scilist * | moo_scilist_create_clean (cpl_frameset *frameset) |
| Create a new moo_scilist from the given SCI frameset ignoring SCI with 0 targets. | |
| moo_sci * | moo_scilist_get (moo_scilist *self, int i) |
| Get the SCI at the position i in the list. | |
| moo_sci_single * | moo_scilist_get_single (moo_scilist *self, int i, moo_detector_type type) |
| Get the SCI SINGLE at the position i in the list for the given detector. | |
| cpl_error_code | moo_scilist_load_single (const moo_scilist *self, moo_detector_type type, int level) |
| Load the type part for all SCI in the scilist. | |
| hdrl_imagelist * | moo_scilist_get_image (const moo_scilist *self, moo_detector_type type) |
| Get the all the images of the type part in the scilist. | |
| cpl_imagelist * | moo_scilist_get_qual (const moo_scilist *self, moo_detector_type type) |
| Get the all the QUAL of the type part in the scilist. | |
| cpl_imagelist * | moo_scilist_get_sky (const moo_scilist *self, moo_detector_type type) |
| Get the all the SKY of the type part in the scilist. | |
| moo_scilist * moo_scilist_create | ( | cpl_frameset * | frameset | ) |
Create a new moo_scilist from the given SCI frameset.
The returned object must be deallocated using moo_scilist_delete(). Possible cpl_error_code set in this function:
Definition at line 321 of file moo_scilist.c.
References moo_sci_create(), moo_scilist_new(), and moo_scilist_push().
| moo_scilist * moo_scilist_create_clean | ( | cpl_frameset * | frameset | ) |
Create a new moo_scilist from the given SCI frameset ignoring SCI with 0 targets.
The returned object must be deallocated using moo_scilist_delete(). Possible cpl_error_code set in this function:
Definition at line 345 of file moo_scilist.c.
References moo_sci_create(), moo_sci_delete(), moo_sci_get_target_table(), moo_scilist_new(), and moo_scilist_push().
| void moo_scilist_delete | ( | moo_scilist * | self | ) |
Free all memory used by a moo_scilist object including the SCI.
| self | The SCI list or NULL |
NULL, nothing is done and no error is set. Definition at line 176 of file moo_scilist.c.
References moo_scilist_empty(), and moo_scilist_unwrap().
| void moo_scilist_empty | ( | moo_scilist * | self | ) |
Empty an moo_scilist and deallocate all its SCI.
| self | The SCI list or NULL |
NULL nothing is done and no error is set.After the call the moo_sci list can be populated again. It must eventually be deallocated with a call to moo_scilist_delete().
Definition at line 120 of file moo_scilist.c.
References moo_sci_delete(), and moo_scilist_unset().
Referenced by moo_scilist_delete().
| moo_sci * moo_scilist_get | ( | moo_scilist * | self, |
| int | i | ||
| ) |
Get the SCI at the position i in the list.
| self | the list of SCI |
| i | position in the list |
Possible cpl_error_code set in this function:
Definition at line 384 of file moo_scilist.c.
References moo_scilist_get_size().
Referenced by moo_coadd(), moo_compute_resp(), moo_resp_create(), and moo_telluric_create().
| hdrl_imagelist * moo_scilist_get_image | ( | const moo_scilist * | self, |
| moo_detector_type | type | ||
| ) |
Get the all the images of the type part in the scilist.
| self | the list of SCI |
| type | the type of extension to load |
Possible cpl_error_code set in this function:
Definition at line 468 of file moo_scilist.c.
References moo_sci_get_single(), and moo_sci_single_get_image().
| cpl_imagelist * moo_scilist_get_qual | ( | const moo_scilist * | self, |
| moo_detector_type | type | ||
| ) |
Get the all the QUAL of the type part in the scilist.
| self | the list of SCI |
| type | the type of extension to load |
Possible cpl_error_code set in this function:
Definition at line 514 of file moo_scilist.c.
References moo_sci_get_single(), and moo_sci_single_get_qual().
| moo_sci_single * moo_scilist_get_single | ( | moo_scilist * | self, |
| int | i, | ||
| moo_detector_type | type | ||
| ) |
Get the SCI SINGLE at the position i in the list for the given detector.
| self | the list of SCI |
| i | position in the list |
| type | detector type |
Possible cpl_error_code set in this function:
Definition at line 409 of file moo_scilist.c.
References moo_sci_get_single(), and moo_scilist_get_size().
Referenced by moo_coadd().
| cpl_size moo_scilist_get_size | ( | const moo_scilist * | self | ) |
Get the number of SCI in the scilist.
| self | the list of SCI |
Possible cpl_error_code set in this function:
Definition at line 198 of file moo_scilist.c.
Referenced by moo_coadd(), moo_compute_resp(), moo_resp_create(), moo_scilist_get(), moo_scilist_get_single(), and moo_telluric_create().
| cpl_imagelist * moo_scilist_get_sky | ( | const moo_scilist * | self, |
| moo_detector_type | type | ||
| ) |
Get the all the SKY of the type part in the scilist.
| self | the list of SCI |
| type | the type of extension to load |
Possible cpl_error_code set in this function:
Definition at line 560 of file moo_scilist.c.
References moo_sci_get_single(), and moo_sci_single_get_sky().
| cpl_error_code moo_scilist_load_single | ( | const moo_scilist * | self, |
| moo_detector_type | type, | ||
| int | level | ||
| ) |
Load the type part for all SCI in the scilist.
| self | the list of SCI |
| type | the type of extension to load |
| level | Mask error level |
Possible cpl_error_code set in this function:
Definition at line 439 of file moo_scilist.c.
References moo_sci_load_single().
Referenced by moo_coadd().
| moo_scilist * moo_scilist_new | ( | void | ) |
Create a new moo_scilist.
The returned object must be deallocated using moo_scilist_delete().
Definition at line 56 of file moo_scilist.c.
Referenced by moo_scilist_create(), and moo_scilist_create_clean().
| cpl_error_code moo_scilist_push | ( | moo_scilist * | self, |
| moo_sci * | sci | ||
| ) |
Insert a SCI a the end of moo_scilist.
| self | The moo_scilist |
| sci | The SCI to insert |
No action occurs if a SCI is inserted more than once into the same position. It is allowed to insert the same SCI into two different positions in a list.
The SCI is inserted at the end in the SCI list. If the SCI already there is only present in that one location in the list, then the SCI is deallocated.
The added SCI is owned by the moo_scilist object, which deallocates it moo_scilist_delete is called. Other option is to use moo_scilist_unset to recover ownership of the SCI, in which case the moo_scilist object is not longer responsible for deallocating it.
Possible cpl_error_code set in this function:
Definition at line 304 of file moo_scilist.c.
References moo_scilist_set().
Referenced by moo_scilist_create(), and moo_scilist_create_clean().
| cpl_error_code moo_scilist_set | ( | moo_scilist * | self, |
| moo_sci * | sci, | ||
| cpl_size | pos | ||
| ) |
Insert a SCI into an moo_scilist.
| self | The moo_scilist |
| sci | The SCI to insert |
| pos | The list position (from 0 to number of SCI) |
It is allowed to specify the position equal to the number of SCI in the list. This will increment the size of the scilist.
No action occurs if a SCI is inserted more than once into the same position. It is allowed to insert the same SCI into two different positions in a list.
The SCI is inserted at the position pos in the SCI list. If the SCI already there is only present in that one location in the list, then the SCI is deallocated.
The added SCI is owned by the moo_scilist object, which deallocates it moo_scilist_delete is called. Other option is to use moo_scilist_unset to recover ownership of the SCI, in which case the moo_scilist object is not longer responsible for deallocating it.
Possible cpl_error_code set in this function:
Definition at line 240 of file moo_scilist.c.
References moo_sci_delete().
Referenced by moo_scilist_push().
| moo_sci * moo_scilist_unset | ( | moo_scilist * | self, |
| cpl_size | pos | ||
| ) |
Remove a SCI from a SCI list.
| self | The moo_scilist |
| pos | The list position (from 0 to number of SCI-1) |
The specified SCI is not deallocated, it is simply removed from the list. The pointer to the SCI is returned to let the user decide to deallocate it or not. Eventually, the SCI will have to be deallocated with moo_sci_delete().
Possible cpl_error_code set in this function:
Definition at line 82 of file moo_scilist.c.
Referenced by moo_scilist_empty().
| void moo_scilist_unwrap | ( | moo_scilist * | self | ) |
Free memory used by a moo_scilist object, except the SCI.
| self | The SCI list or NULL |
NULL nothing is done and no error is set. Definition at line 156 of file moo_scilist.c.
Referenced by moo_scilist_delete().