MOONS Pipeline Reference Manual 0.13.1
Functions
MASK_LIST format

Functions

moo_masklist * moo_masklist_new (void)
 Create a new moo_masklist

 
moo_masklist * moo_masklist_create (int size)
 Create a new moo_masklist from the given MASK frameset.
 
cpl_size moo_masklist_get_size (const moo_masklist *self)
 Get the number of MASK in the masklist.
 
moo_mask * moo_masklist_get (moo_masklist *self, int i)
 Get the MASK at the position i in the list.
 
cpl_mask * moo_masklist_get_mask (moo_masklist *self, int i, moo_detector_type type, int num)
 Get the CPL_MASK at the position i,type,num in the list.
 
void moo_masklist_delete (moo_masklist *self)
 Free all memory used by a moo_masklist object including the MASK.
 

Detailed Description

Function Documentation

◆ moo_masklist_create()

moo_masklist * moo_masklist_create ( int  size)

Create a new moo_masklist from the given MASK frameset.

Returns
1 newly allocated moo_masklist or NULL in case of an error

The returned object must be deallocated using moo_masklist_delete().
Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 71 of file moo_masklist.c.

References moo_mask_new(), and moo_masklist_new().

◆ moo_masklist_delete()

void moo_masklist_delete ( moo_masklist *  self)

Free all memory used by a moo_masklist object including the MASK.

Parameters
selfThe MASK list or NULL
Returns
void

Definition at line 165 of file moo_masklist.c.

References moo_mask_delete().

◆ moo_masklist_get()

moo_mask * moo_masklist_get ( moo_masklist *  self,
int  i 
)

Get the MASK at the position i in the list.

Parameters
selfthe list of MASK
iposition in the list
Returns
MASK element or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if i <0 or i >= list size

Definition at line 121 of file moo_masklist.c.

References moo_masklist_get_size().

Referenced by moo_compute_noise_map(), and moo_masklist_get_mask().

◆ moo_masklist_get_mask()

cpl_mask * moo_masklist_get_mask ( moo_masklist *  self,
int  i,
moo_detector_type  type,
int  num 
)

Get the CPL_MASK at the position i,type,num in the list.

Parameters
selfthe list of MASK
iposition in the list
typethe detector type
numthe number of TAS
Returns
MASK element or NULL

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT if i <0 or i >= list size

Definition at line 147 of file moo_masklist.c.

References moo_mask_get(), and moo_masklist_get().

◆ moo_masklist_get_size()

cpl_size moo_masklist_get_size ( const moo_masklist *  self)

Get the number of MASK in the masklist.

Parameters
selfthe list of MASK
Returns
The number of MASK or -1 on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 98 of file moo_masklist.c.

Referenced by moo_masklist_get().

◆ moo_masklist_new()

moo_masklist * moo_masklist_new ( void  )

Create a new moo_masklist

Returns
1 newly allocated moo_masklist or NULL in case of an error

The returned object must be deallocated using moo_detlist_delete().

Definition at line 56 of file moo_masklist.c.

Referenced by moo_masklist_create().