66 moo_mask* res = cpl_calloc(1,
sizeof(moo_mask));
83 cpl_mask* result = NULL;
85 cpl_ensure(self!=NULL, CPL_ERROR_NULL_INPUT, NULL);
86 cpl_ensure(num>=1 && num<=2, CPL_ERROR_ILLEGAL_INPUT, NULL);
88 result = self->data[type+(num-1)*3];
106 cpl_ensure_code(self!=NULL, CPL_ERROR_NULL_INPUT);
107 cpl_ensure_code(num>=1 && num<=2, CPL_ERROR_ILLEGAL_INPUT);
109 self->data[type+(num-1)*3] = mask;
111 return CPL_ERROR_NONE;
129 for(i = 0; i< 6; i++){
130 if ( self->data[i]!= NULL){
131 cpl_mask_delete(self->data[i]);
154 for(
int i = 0; i< 2; i++){
155 for(
int j = 0; j< 3; j++){
158 MASK_EXTENSION, extname, NULL);
const char * moo_detector_get_extname(moo_detector_type type, int ntas)
Get the extension name of a detector.
enum _moo_detector_type_ moo_detector_type
The type code type.
cpl_error_code moo_fits_write_extension_mask(cpl_mask *mask, const char *filename, const char *name, const char *detectorname, cpl_propertylist *header)
Write a mask as extension in FITS file.
cpl_error_code moo_fits_create(const char *filename)
Create a new fits file with empty propertylist.
cpl_mask * moo_mask_get(moo_mask *self, moo_detector_type type, int num)
Get the cpl_mask associated to given type,num.
void moo_mask_delete(moo_mask *self)
Delete a moo_mask.
void moo_mask_save(moo_mask *self, const char *filename)
Save a moo_mask to a FITS file.
cpl_error_code moo_mask_set(moo_mask *self, moo_detector_type type, int num, cpl_mask *mask)
Set the cpl_mask associated to given type,num.
moo_mask * moo_mask_new(void)
Create a new moo_mask