MOONS Pipeline Reference Manual 0.13.2
Macros | Functions
TELLURIC format

Macros

#define MOO_TELLURIC_EXT_RI   "RI"
 TELLURIC format.
 

Functions

moo_telluric * moo_telluric_new (void)
 Create a new moo_telluric.
 
cpl_error_code moo_telluric_set_image (moo_telluric *self, moo_detector_type type, cpl_image *im)
 assign image in moo_telluric
 
cpl_image * moo_telluric_get_image (moo_telluric *self, moo_detector_type type)
 Get a telluric image from TELLURIC.
 
moo_telluric * moo_telluric_create (moo_scilist *scilist, int badpix_level)
 Prepare TELLURIC for SCI frame.
 
moo_telluric * moo_telluric_create_from_rbn (moo_rbn *rbn)
 Prepare TELLURIC for SCI frame.
 
void moo_telluric_delete (moo_telluric *self)
 Delete a moo_telluric.
 
void moo_telluric_save (moo_telluric *self, const char *filename)
 Save a moo_telluric to a FITS file.
 
moo_telluric * moo_telluric_load (const cpl_frame *frame)
 Load a TELLURIC frame and create a moo_telluric.
 
int moo_telluric_get_index (moo_telluric *self, int idrbn, int fspectro, const char *fband)
 Get the index of the telluric for a given indexrbn.
 
const char * moo_telluric_get_band (moo_detector_type type)
 Get the band of the telluric

 

Detailed Description

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

Functionality include:

Synopsis:
#include "moo_telluric.h"

Function Documentation

◆ moo_telluric_create()

moo_telluric * moo_telluric_create ( moo_scilist *  scilist,
int  badpix_level 
)

Prepare TELLURIC for SCI frame.

Parameters
scilistthe SCI list from where we computed the rsponse
badpix_levelthe bad pixel level
Returns
create table for telluric

Error code:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 141 of file moo_telluric.c.

References moo_sci_get_target_table(), moo_sci_load_single(), moo_sci_single_get_header(), moo_sci_single_get_image(), moo_scilist_get(), moo_scilist_get_size(), moo_target_table_find_target(), MOO_TELLURIC_EXT_RI, moo_telluric_new(), and moo_telluric_set_image().

◆ moo_telluric_create_from_rbn()

moo_telluric * moo_telluric_create_from_rbn ( moo_rbn *  rbn)

Prepare TELLURIC for SCI frame.

Parameters
rbnthe RBN from where we computed the rsponse
Returns
create table for telluric

Error code:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 259 of file moo_telluric.c.

References moo_rbn_get_fibre_table(), moo_rbn_load_single(), moo_rbn_single_get_header(), moo_rbn_single_get_image(), moo_telluric_new(), and moo_telluric_set_image().

◆ moo_telluric_delete()

void moo_telluric_delete ( moo_telluric *  self)

Delete a moo_telluric.

Parameters
selfmoo_telluric to delete
Returns
void

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

Definition at line 334 of file moo_telluric.c.

Referenced by moo_telluric_load().

◆ moo_telluric_get_band()

const char * moo_telluric_get_band ( moo_detector_type  type)

Get the band of the telluric

Parameters
typethe detector type
Returns
the band or NULL

Definition at line 511 of file moo_telluric.c.

References MOO_TELLURIC_EXT_RI.

Referenced by moo_correct_tell(), and moo_correct_tell_science().

◆ moo_telluric_get_image()

cpl_image * moo_telluric_get_image ( moo_telluric *  self,
moo_detector_type  type 
)

Get a telluric image from TELLURIC.

Parameters
selfmoo_telluric structure
typetype of detector
Returns
cpl table

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 116 of file moo_telluric.c.

Referenced by moo_correct_tell(), and moo_correct_tell_science().

◆ moo_telluric_get_index()

int moo_telluric_get_index ( moo_telluric *  self,
int  idrbn,
int  fspectro,
const char *  fband 
)

Get the index of the telluric for a given indexrbn.

Parameters
selfthe telluric
idrbnthe indexrbn of the spectra
fspectrothe SPECTRO (1, 2)
fbandthe band (Ri, YJ, H)
Returns
the wanted index or -1

Definition at line 463 of file moo_telluric.c.

Referenced by moo_correct_tell(), and moo_correct_tell_science().

◆ moo_telluric_load()

moo_telluric * moo_telluric_load ( const cpl_frame *  frame)

Load a TELLURIC frame and create a moo_telluric.

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

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

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 405 of file moo_telluric.c.

References moo_fits_load_extension_image(), moo_pfits_get_naxis(), moo_telluric_delete(), MOO_TELLURIC_EXT_RI, and moo_telluric_new().

◆ moo_telluric_new()

moo_telluric * moo_telluric_new ( void  )

Create a new moo_telluric.

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

The returned object must be deallocated using moo_telluric_delete().

Definition at line 67 of file moo_telluric.c.

Referenced by moo_molecfit_calctrans(), moo_telluric_create(), moo_telluric_create_from_rbn(), and moo_telluric_load().

◆ moo_telluric_save()

void moo_telluric_save ( moo_telluric *  self,
const char *  filename 
)

Save a moo_telluric to a FITS file.

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

Definition at line 367 of file moo_telluric.c.

References moo_fits_write_extension_image(), and MOO_TELLURIC_EXT_RI.

Referenced by moo_products_add_telluric().

◆ moo_telluric_set_image()

cpl_error_code moo_telluric_set_image ( moo_telluric *  self,
moo_detector_type  type,
cpl_image *  im 
)

assign image in moo_telluric

Parameters
selfmoo_telluric
typethe detector type
imthe image
Returns
the relevant error code or CPl_ERROR_NONE

Possible cpl_error_code set in this function:

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 87 of file moo_telluric.c.

Referenced by moo_molecfit_calctrans(), moo_telluric_create(), and moo_telluric_create_from_rbn().