MOONS Pipeline Reference Manual 0.13.1
Functions
Manage region and region list parameters

Functions

moo_region * moo_region_new (void)
 Create a new moo_region.
 
void moo_region_delete (moo_region *self)
 Delete a moo_region.
 
moo_region * moo_region_load (const char *value)
 load a moo_region
 
void moo_region_dump (moo_region *self)
 dump a moo_region
 
moo_regionlist * moo_regionlist_new (int size)
 Create a new moo_region.
 
void moo_regionlist_delete (moo_regionlist *self)
 Delete a moo_regionlist.
 
moo_regionlist * moo_regionlist_load (const char *value)
 load a moo_regionlist
 
moo_regionlist * moo_regionlist_load_layout (const cpl_frame *layout_frame, moo_detector_type type, int ntas)
 load a moo_regionlist
 
void moo_regionlist_dump (moo_regionlist *self)
 dump a moo_regionlist
 

Detailed Description

Function Documentation

◆ moo_region_delete()

void moo_region_delete ( moo_region *  self)

Delete a moo_region.

Parameters
selfmoo_region to delete
Returns
void

If the moo_region self is NULL, nothing is done and no error is set.

Definition at line 77 of file moo_region.c.

Referenced by moo_regionlist_delete().

◆ moo_region_dump()

void moo_region_dump ( moo_region *  self)

dump a moo_region

Parameters
selfregion to dump

Definition at line 122 of file moo_region.c.

Referenced by moo_regionlist_dump().

◆ moo_region_load()

moo_region * moo_region_load ( const char *  value)

load a moo_region

Parameters
valuethe string value of region to load (format is four integers separated by comma x1,y1,x2,y2)
Returns
the corresponding moo_region object or NULL in cas of error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 97 of file moo_region.c.

References moo_region_new().

Referenced by moo_regionlist_load().

◆ moo_region_new()

moo_region * moo_region_new ( void  )

Create a new moo_region.

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

The returned object must be deallocated using moo_region_delete().


Definition at line 59 of file moo_region.c.

Referenced by moo_region_load(), and moo_regionlist_load_layout().

◆ moo_regionlist_delete()

void moo_regionlist_delete ( moo_regionlist *  self)

Delete a moo_regionlist.

Parameters
selfmoo_regionlist to delete

If the moo_region self is NULL, nothing is done and no error is set.

Definition at line 164 of file moo_region.c.

References moo_region_delete().

◆ moo_regionlist_dump()

void moo_regionlist_dump ( moo_regionlist *  self)

dump a moo_regionlist

Parameters
selfregionlist to dump

Definition at line 269 of file moo_region.c.

References moo_region_dump().

◆ moo_regionlist_load()

moo_regionlist * moo_regionlist_load ( const char *  value)

load a moo_regionlist

Parameters
valuethe string value of regionlist to load (format is region string separated by : r1:r2:r3...)
Returns
the corresponding moo_regionlist object or NULL in cas of error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 187 of file moo_region.c.

References moo_region_load(), and moo_regionlist_new().

◆ moo_regionlist_load_layout()

moo_regionlist * moo_regionlist_load_layout ( const cpl_frame *  layout_frame,
moo_detector_type  type,
int  ntas 
)

load a moo_regionlist

Parameters
layout_framethe LAYOUT frame
typethe detector type
ntasnumber of spectrograph [1,2]
Returns
the corresponding moo_regionlist object or NULL in cas of error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_ILLEGAL_INPUT in cas of invalid ntas

Definition at line 225 of file moo_region.c.

References moo_detector_get_extname(), moo_fits_load_extension_table(), moo_region_new(), and moo_regionlist_new().

◆ moo_regionlist_new()

moo_regionlist * moo_regionlist_new ( int  size)

Create a new moo_region.

Parameters
sizethe size of the region list
Returns
1 newly allocated moo_regionlist or NULL in case of an error

The returned object must be deallocated using moo_regionlist_delete().


Possible cpl_error_code set in this function:

  • CPL_ERROR_ILLEGAL_INPUT if size < 0

Definition at line 143 of file moo_region.c.

Referenced by moo_regionlist_load(), and moo_regionlist_load_layout().