|
MUSE Pipeline Reference Manual
2.5.2
|
Data Structures | |
| struct | muse_mask |
| Handling of "mask" files. More... | |
Functions | |
| muse_mask * | muse_mask_new (void) |
Allocate memory for a new muse object. More... | |
| void | muse_mask_delete (muse_mask *aMask) |
| Deallocate memory associated to a muse_mask object. More... | |
| muse_mask * | muse_mask_load (const char *aFilename) |
| Load a mask file and its FITS header. More... | |
| cpl_error_code | muse_mask_save (muse_mask *aMask, const char *aFilename) |
| Save the data and the FITS headers of a MUSE mask to a file. More... | |
This module contains a simple wrapper around the cpl_mask object, so that we can easily pass a mask together with its (FITS) header around to between functions.
| void muse_mask_delete | ( | muse_mask * | aMask | ) |
Deallocate memory associated to a muse_mask object.
| aMask | input MUSE mask |
Just calls cpl_mask_delete() and cpl_propertylist_delete() for the four components of a muse_mask, and frees memory for the aMask pointer. As a safeguard, it checks if a valid pointer was passed, so that crashes cannot occur.
Definition at line 78 of file muse_mask.c.
Referenced by muse_mask_load(), muse_postproc_correct_raman(), muse_postproc_process_exposure(), muse_postproc_properties_delete(), and muse_postproc_whitelight().
| muse_mask* muse_mask_load | ( | const char * | aFilename | ) |
Load a mask file and its FITS header.
| aFilename | name of the file to load |
muse_mask * or NULL on error muse_mask_delete(). | return NULL, propagate CPL error code | cpl_propertylist_load() fails (this handles the case of an invalid or empty filename) |
| return NULL, propagate CPL error code | cpl_mask_load() fails |
Definition at line 103 of file muse_mask.c.
References header, mask, muse_mask_delete(), and muse_mask_new().
Referenced by muse_processing_load_mask().
| muse_mask* muse_mask_new | ( | void | ) |
Allocate memory for a new muse object.
muse_mask * or NULL on error muse_mask_delete(). cpl_mask_new() or cpl_propertylist_new(), respectively, or equivalent functions.Simply allocate memory to store the pointers of the muse_mask structure.
Definition at line 61 of file muse_mask.c.
Referenced by muse_autocalib_create_mask(), muse_mask_load(), and muse_sky_create_skymask().
| cpl_error_code muse_mask_save | ( | muse_mask * | aMask, |
| const char * | aFilename | ||
| ) |
Save the data and the FITS headers of a MUSE mask to a file.
| aMask | input MUSE mask |
| aFilename | name of the output file |
muse_mask structure.| return CPL_ERROR_NULL_INPUT | aImage or aFilename are NULL |
| return CPL error code | failure to save any of the components |
Definition at line 143 of file muse_mask.c.
Referenced by muse_autocalib_create_mask(), and muse_processing_save_mask().
1.8.11