MOONS Pipeline Reference Manual 0.13.2
Functions
MOLEC TABLE format

Functions

moo_molectable * moo_molectable_new (void)
 Create a new moo_molectable.
 
moo_molectable * moo_molectable_load (const cpl_frame *frame, const char *modename)
 Load a moo_molectable.
 
cpl_table * moo_molectable_get_data (moo_molectable *self, moo_detector_type type)
 Get table from molec_table.
 
cpl_error_code moo_molectable_set_data (moo_molectable *self, moo_detector_type type, cpl_table *data)
 Set table in molectable.
 
void moo_molectable_save (moo_molectable *self, const char *filename)
 Save a moo_molectable to a FITS file.
 
void moo_molectable_delete (moo_molectable *self)
 Delete a moo_molectable.
 
cpl_error_code moo_molectable_dump (const moo_molectable *self, FILE *stream)
 Dump structural information of MOLECTABLE.
 

Detailed Description

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

Functionality include:

Synopsis:
#include "moo_molectable.h"

Function Documentation

◆ moo_molectable_delete()

void moo_molectable_delete ( moo_molectable *  self)

Delete a moo_molectable.

Parameters
selfmoo_molectable to delete
Returns
void

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

Definition at line 214 of file moo_molectable.c.

Referenced by moo_molecfit_calctrans(), moo_molecfit_model(), and moo_molectable_load().

◆ moo_molectable_dump()

cpl_error_code moo_molectable_dump ( const moo_molectable *  self,
FILE *  stream 
)

Dump structural information of MOLECTABLE.

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 252 of file moo_molectable.c.

◆ moo_molectable_get_data()

cpl_table * moo_molectable_get_data ( moo_molectable *  self,
moo_detector_type  type 
)

Get table from molec_table.

Parameters
selfthe molec_table
typethe detector type
Returns
the table for the chosen type or NULL

Definition at line 145 of file moo_molectable.c.

Referenced by moo_molecfit_calctrans(), and moo_molecfit_model().

◆ moo_molectable_load()

moo_molectable * moo_molectable_load ( const cpl_frame *  frame,
const char *  modename 
)

Load a moo_molectable.

Parameters
framethe frame to load
modenamethe detector mode LR or HR
Returns
1 newly allocated moo_molectable or NULL in case of an error

The returned object must be deallocated using moo_molectable_delete().

Definition at line 86 of file moo_molectable.c.

References moo_detector_get_name(), moo_molectable_delete(), moo_molectable_new(), and moo_pfits_get_naxis().

Referenced by moo_molecfit_calctrans(), and moo_molecfit_model().

◆ moo_molectable_new()

moo_molectable * moo_molectable_new ( void  )

Create a new moo_molectable.

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

The returned object must be deallocated using moo_molectable_delete().

Definition at line 67 of file moo_molectable.c.

Referenced by moo_molecfit_calctrans(), moo_molecfit_model(), and moo_molectable_load().

◆ moo_molectable_save()

void moo_molectable_save ( moo_molectable *  self,
const char *  filename 
)

Save a moo_molectable to a FITS file.

Parameters
selfmoo_molectable 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_molectable to a FITS file, using cfitsio. Only not NULL extensions are written.

Definition at line 188 of file moo_molectable.c.

References moo_detector_get_name(), and moo_fits_write_extension_table().

Referenced by moo_products_add_molectable().

◆ moo_molectable_set_data()

cpl_error_code moo_molectable_set_data ( moo_molectable *  self,
moo_detector_type  type,
cpl_table *  data 
)

Set table in molectable.

Parameters
selfthe molectable
typethe detector type
datathe table to set
Returns
the error code

Definition at line 166 of file moo_molectable.c.

Referenced by moo_molecfit_model().