MOONS Pipeline Reference Manual 0.13.2
moo_spectral_format.h
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef MOO_SPECTRAL_FORMAT_H
21#define MOO_SPECTRAL_FORMAT_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_loc_single.h"
31#include "moo_detector.h"
32/*-----------------------------------------------------------------------------
33 Types
34 -----------------------------------------------------------------------------*/
35#define ARM_COLNAME "ARM"
36#define MODE_COLNAME "MODE"
37#define WMIN_COLNAME "WAVEMIN"
38#define WMAX_COLNAME "WAVEMAX"
39#define RES_COLNAME "RESOLUTION"
40#define DISPMIN_COLNAME "DISPMIN"
41#define DISPMAX_COLNAME "DISPMAX"
42#define DIRECTION_COLNAME "DIRECTION"
43
44#define MODE_LR "LR"
45#define MODE_HR "HR"
46
47typedef struct
48{
49 double wmin;
50 double wmax;
51 double resolution;
52 double dispmin;
53 double dispmax;
54 int direction;
55} moo_spectral_format_info;
56
57typedef struct
58{
59 moo_mode_type mode;
60 cpl_table *table;
61
62} moo_spectral_format;
63
64
65/*-----------------------------------------------------------------------------
66 Functions prototypes
67 -----------------------------------------------------------------------------*/
68moo_spectral_format *moo_spectral_format_new(void);
69
70moo_spectral_format *
71moo_spectral_format_load(const cpl_frame *frame, moo_mode_type mode);
72
73moo_spectral_format_info *moo_spectral_format_get(moo_spectral_format *self,
75 int ntas);
76
77cpl_error_code moo_spectral_format_get_wave_range(moo_spectral_format *self,
79 double *min,
80 double *max);
81
82void moo_spectral_format_delete(moo_spectral_format *self);
83void moo_spectral_format_info_delete(moo_spectral_format_info *self);
84#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
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.
moo_spectral_format * moo_spectral_format_load(const cpl_frame *frame, moo_mode_type mode)
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.
moo_spectral_format * moo_spectral_format_new(void)
Create a new moo_spectral_format.
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.