MOONS Pipeline Reference Manual 0.13.1
Functions
SPECTRAL_FORMAT format

Functions

moo_spectral_format * moo_spectral_format_new (void)
 Create a new moo_spectral_format.
 
moo_spectral_format_info * moo_spectral_format_info_new (void)
 Create a new moo_spectral_format_info.
 
moo_spectral_format * moo_spectral_format_load (const cpl_frame *frame, moo_mode_type m)
 Load a SPECTRAL FORMAT frame and create a moo_spectral_format.
 
moo_spectral_format_info * moo_spectral_format_get (moo_spectral_format *self, moo_detector_type type, int ntas)
 Get the spectral format information for a given ARM.
 
cpl_error_code moo_spectral_format_get_wave_range (moo_spectral_format *self, moo_detector_type type, double *min, double *max)
 Get the spectral format wave range for a given detector.
 
void moo_spectral_format_delete (moo_spectral_format *self)
 Delete a moo_spectral_format.
 
void moo_spectral_format_info_delete (moo_spectral_format_info *self)
 Delete a moo_spectral_format_info.
 

Detailed Description

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

Functionality include:

Synopsis:
#include "moo_spectral_format.h"

Function Documentation

◆ moo_spectral_format_delete()

void moo_spectral_format_delete ( moo_spectral_format *  self)

Delete a moo_spectral_format.

Parameters
selfmoo_spectral_format to delete
Returns
void

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

Definition at line 224 of file moo_spectral_format.c.

Referenced by moo_spectral_format_load().

◆ moo_spectral_format_get()

moo_spectral_format_info * moo_spectral_format_get ( moo_spectral_format *  self,
moo_detector_type  type,
int  ntas 
)

Get the spectral format information for a given ARM.

Parameters
selfthe SPECTRAL_FORMAT
typethe wanted detector type
ntasthe number of wanted detector
Returns
1 newly allocated moo_spectral_format_info or NULL in case of an error

Definition at line 160 of file moo_spectral_format.c.

References moo_detector_get_name().

Referenced by moo_ext_compute_snr(), moo_map_check(), moo_rebin(), and moo_spectral_format_get_wave_range().

◆ moo_spectral_format_get_wave_range()

cpl_error_code moo_spectral_format_get_wave_range ( moo_spectral_format *  self,
moo_detector_type  type,
double *  min,
double *  max 
)

Get the spectral format wave range for a given detector.

Parameters
selfthe SPECTRAL_FORMAT
typethe wanted detector type
min[out] the minimum of wavelength range
max[out] the maximum of wavelength range
Returns
error code

Definition at line 196 of file moo_spectral_format.c.

References moo_spectral_format_get(), and moo_spectral_format_info_delete().

Referenced by moo_rebin().

◆ moo_spectral_format_info_delete()

void moo_spectral_format_info_delete ( moo_spectral_format_info *  self)

Delete a moo_spectral_format_info.

Parameters
selfmoo_spectral_format_info to delete
Returns
void

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

Definition at line 245 of file moo_spectral_format.c.

Referenced by moo_ext_compute_snr(), moo_map_check(), moo_rebin(), and moo_spectral_format_get_wave_range().

◆ moo_spectral_format_info_new()

moo_spectral_format_info * moo_spectral_format_info_new ( void  )

Create a new moo_spectral_format_info.

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

The returned object must be deallocated using moo_ext_delete().

Definition at line 79 of file moo_spectral_format.c.

◆ moo_spectral_format_load()

moo_spectral_format * moo_spectral_format_load ( const cpl_frame *  frame,
moo_mode_type  m 
)

Load a SPECTRAL FORMAT frame and create a moo_spectral_format.

Parameters
framethe SPECTRAL_FORMAT frame
mthe mode of instrument
Returns
1 newly allocated moo_spectral_format or NULL in case of an error

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

  • CPL_ERROR_NULL_INPUT if an input pointer is NULL

Definition at line 99 of file moo_spectral_format.c.

References moo_mode_get_name(), moo_spectral_format_delete(), and moo_spectral_format_new().

◆ moo_spectral_format_new()

moo_spectral_format * moo_spectral_format_new ( void  )

Create a new moo_spectral_format.

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

The returned object must be deallocated using moo_ext_delete().

Definition at line 63 of file moo_spectral_format.c.

Referenced by moo_spectral_format_load().