MOONS Pipeline Reference Manual 0.13.1
Functions
MAP format

Functions

moo_map * moo_map_new (void)
 Create a new moo_map.
 
cpl_table * moo_map_get_line_table (moo_map *self)
 Get the LINE TABLE extension of a map.
 
cpl_error_code moo_map_set_data (moo_map *self, moo_detector_type type, int ntas, cpl_image *data, cpl_propertylist *header)
 set map data for relevant extension
 
void moo_map_delete (moo_map *self)
 Delete a moo_map.
 
void moo_map_save (moo_map *self, const char *filename)
 Save a moo_map to a FITS file.
 
cpl_error_code moo_map_check (moo_map *self, moo_spectral_format *sformat)
 Save a moo_map to a FITS file.
 
cpl_error_code moo_map_dump (const moo_map *self, FILE *stream)
 Dump structural information of MAP.
 

Detailed Description

This module provides functions to create, use, and destroy a moo_map

Functionality include:

Synopsis:
#include "moo_map.h"

Function Documentation

◆ moo_map_check()

cpl_error_code moo_map_check ( moo_map *  self,
moo_spectral_format *  sformat 
)

Save a moo_map to a FITS file.

Parameters
selfmoo_map to write to disk or NULL
filenameName of the file to write
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

This function saves a moo_map to a FITS file, using cfitsio. Only not NULL extensions are written.

Definition at line 320 of file moo_map.c.

References moo_detector_get_name(), moo_qc_set_wavecal_monotonous_solution(), moo_spectral_format_get(), and moo_spectral_format_info_delete().

Referenced by moo_wavesol().

◆ moo_map_delete()

void moo_map_delete ( moo_map *  self)

Delete a moo_map.

Parameters
selfmoo_map to delete
Returns
void

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

Definition at line 236 of file moo_map.c.

◆ moo_map_dump()

cpl_error_code moo_map_dump ( const moo_map *  self,
FILE *  stream 
)

Dump structural information of MAP.

Parameters
selfstructure to dump
streamOutput stream, accepts stdout or stderr
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL
  • CPL_ERROR_FILE_IO if a write operation fails

Definition at line 428 of file moo_map.c.

◆ moo_map_get_line_table()

cpl_table * moo_map_get_line_table ( moo_map *  self)

Get the LINE TABLE extension of a map.

Parameters
selfthe WAVEMAP
Returns
the line table

Definition at line 84 of file moo_map.c.

◆ moo_map_new()

moo_map * moo_map_new ( void  )

Create a new moo_map.

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

The returned object must be deallocated using moo_map_delete().

Definition at line 68 of file moo_map.c.

◆ moo_map_save()

void moo_map_save ( moo_map *  self,
const char *  filename 
)

Save a moo_map to a FITS file.

Parameters
selfmoo_map to write to disk or NULL
filenameName of the file to write
Returns
CPL_ERROR_NONE or the relevant cpl_error_code on error

This function saves a moo_map to a FITS file, using cfitsio. Only not NULL extensions are written.

Definition at line 275 of file moo_map.c.

References moo_detector_get_extname(), and moo_fits_write_extension_image().

Referenced by moo_products_add_map().

◆ moo_map_set_data()

cpl_error_code moo_map_set_data ( moo_map *  self,
moo_detector_type  type,
int  ntas,
cpl_image *  data,
cpl_propertylist *  header 
)

set map data for relevant extension

Parameters
self
typethe detector type
ntasnumber of TAS
datathe map data
headerthe map header
Returns
error code

Definition at line 164 of file moo_map.c.

References moo_qc_set_wave_max(), and moo_qc_set_wave_min().