MOONS Pipeline Reference Manual 0.13.1
Functions
F2F format

Functions

moo_f2f * moo_f2f_new (void)
 Create a new moo_f2f.
 
moo_f2f * moo_f2f_create (int nbrows, cpl_table *fibre_table)
 Create a new moo_f2f and an empty structure in memory.
 
moo_f2f * moo_f2f_load (const cpl_frame *f2f_frame)
 Load a F2F table from a fits file.
 
cpl_error_code moo_f2f_order_by_indexrbn (moo_f2f *self)
 Order F2F by INDEXRBN (ASC)
 
cpl_error_code moo_f2f_order_by_index (moo_f2f *self)
 Order F2F by SPECTRO,INDEX (ASC)
 
cpl_error_code moo_f2f_set_trans (moo_f2f *self, moo_detector_type type, cpl_array *idxtab, cpl_vector *values)
 Set transmission values in table.
 
const char * moo_f2f_get_trans_colname (moo_f2f *self, moo_detector_type type)
 Get transmission column name from table.
 
cpl_vector * moo_f2f_get_trans (moo_f2f *self, moo_detector_type type, cpl_array *idxtab)
 Get transmission values from table.
 
float * moo_f2f_get_trans_column (moo_f2f *self, moo_detector_type type)
 Get transmission column from table.
 
void moo_f2f_delete (moo_f2f *self)
 Delete a moo_f2f.
 

Detailed Description

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

Functionality include:

Synopsis:
#include "moo_f2f.h"

Function Documentation

◆ moo_f2f_create()

moo_f2f * moo_f2f_create ( int  nbrows,
cpl_table *  fibre_table 
)

Create a new moo_f2f and an empty structure in memory.

Parameters
nbrowsNumber of rows in F2F
fibre_tablethe Fibre table
Returns
1 newly allocated moo_f2f or NULL in case of an error

The returned object must be deallocated using moo_f2f_delete().

Definition at line 86 of file moo_f2f.c.

References moo_f2f_new(), and moo_fibres_table_get_spectro_table().

Referenced by moo_compute_fibtrans().

◆ moo_f2f_delete()

void moo_f2f_delete ( moo_f2f *  self)

Delete a moo_f2f.

Parameters
selfmoo_f2f to delete
Returns
void

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

Definition at line 413 of file moo_f2f.c.

Referenced by moo_compute_fibtrans(), and moo_f2f_load().

◆ moo_f2f_get_trans()

cpl_vector * moo_f2f_get_trans ( moo_f2f *  self,
moo_detector_type  type,
cpl_array *  idxtab 
)

Get transmission values from table.

Parameters
selfthe F2F
typedetector type
idxtabarray of indexes to get
Returns
values vector of transmission values

Definition at line 289 of file moo_f2f.c.

References moo_f2f_get_trans_colname().

Referenced by moo_apply_flat().

◆ moo_f2f_get_trans_colname()

const char * moo_f2f_get_trans_colname ( moo_f2f *  self,
moo_detector_type  type 
)

Get transmission column name from table.

Parameters
selfthe F2F
typedetector type
Returns
the name of the transmission column name

Definition at line 260 of file moo_f2f.c.

References MOO_TYPE_H, MOO_TYPE_RI, and MOO_TYPE_YJ.

Referenced by moo_f2f_get_trans(), and moo_select_sky().

◆ moo_f2f_get_trans_column()

float * moo_f2f_get_trans_column ( moo_f2f *  self,
moo_detector_type  type 
)

Get transmission column from table.

Parameters
selfthe F2F
typedetector type
Returns
transmission column values

Definition at line 319 of file moo_f2f.c.

References MOO_TYPE_H, MOO_TYPE_RI, and MOO_TYPE_YJ.

◆ moo_f2f_load()

moo_f2f * moo_f2f_load ( const cpl_frame *  f2f_frame)

Load a F2F table from a fits file.

Parameters
f2f_framethe fits file to load
Returns
a new allocated F2F

The returned object must be deallocated using moo_f2f_delete().

Definition at line 139 of file moo_f2f.c.

References moo_f2f_delete(), and moo_f2f_new().

◆ moo_f2f_new()

moo_f2f * moo_f2f_new ( void  )

Create a new moo_f2f.

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

The returned object must be deallocated using moo_f2f_delete().

Definition at line 68 of file moo_f2f.c.

Referenced by moo_f2f_create(), and moo_f2f_load().

◆ moo_f2f_order_by_index()

cpl_error_code moo_f2f_order_by_index ( moo_f2f *  self)

Order F2F by SPECTRO,INDEX (ASC)

Parameters
selfF2F object
Returns
error code

Definition at line 190 of file moo_f2f.c.

Referenced by moo_apply_flat().

◆ moo_f2f_order_by_indexrbn()

cpl_error_code moo_f2f_order_by_indexrbn ( moo_f2f *  self)

Order F2F by INDEXRBN (ASC)

Parameters
selfF2F object
Returns
error code

Definition at line 169 of file moo_f2f.c.

Referenced by moo_sub_sky_stare().

◆ moo_f2f_set_trans()

cpl_error_code moo_f2f_set_trans ( moo_f2f *  self,
moo_detector_type  type,
cpl_array *  idxtab,
cpl_vector *  values 
)

Set transmission values in table.

Parameters
selfF2F object
typedetector type
idxtabarray of indexes to fill
valuesvector of values to fill
Returns
relevant cpl_error or CPl_ERROR_NONE

The returned object must be deallocated using moo_f2f_delete().

Definition at line 216 of file moo_f2f.c.

References MOO_TYPE_H, MOO_TYPE_RI, and MOO_TYPE_YJ.

Referenced by moo_compute_fibtrans().