MOONS Pipeline Reference Manual 0.13.1
moo_detector.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_DETECTOR_H
21#define MOO_DETECTOR_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28#include <hdrl.h>
29
30/*-----------------------------------------------------------------------------
31 Types
32 -----------------------------------------------------------------------------*/
40{
41 /* type */
42
55};
56
65
66enum _moo_mode_type_
67{
68 /* type */
69
73 MOO_MODE_LR,
77 MOO_MODE_HR
78};
79
80typedef enum _moo_mode_type_ moo_mode_type;
81
82#define MOO_CHANNEL_RI_NAME "RI"
83#define MOO_CHANNEL_YJ_NAME "YJ"
84#define MOO_CHANNEL_H_NAME "H"
85
86#define MOO_SPECTRO1 1
87#define MOO_SPECTRO2 2
88
89#define MOO_DETECTOR_RI1_NAME "RI_1"
90#define MOO_DETECTOR_RI2_NAME "RI_2"
91#define MOO_DETECTOR_YJ1_NAME "YJ_1"
92#define MOO_DETECTOR_YJ2_NAME "YJ_2"
93#define MOO_DETECTOR_H1_NAME "H_1"
94#define MOO_DETECTOR_H2_NAME "H_2"
95
96#define MOO_MODE_LR_NAME "LR"
97#define MOO_MODE_HR_NAME "HR"
98
99#define MOO_QUAL "QUAL"
100#define MOO_ERR "ERR"
101#define MOO_EXTNAME(prefix, name) prefix "_" name
102
105/*-----------------------------------------------------------------------------
106 Functions prototypes
107 -----------------------------------------------------------------------------*/
108const char *moo_detector_get_err_extname(moo_detector_type type, int ntas);
109const char *moo_detector_get_qual_extname(moo_detector_type type, int ntas);
110const char *moo_detector_get_extname(moo_detector_type type, int ntas);
111int moo_detector_get_spectro(int ntas);
113
114const char *moo_mode_get_name(moo_mode_type type);
115moo_mode_type moo_mode_get(const cpl_frame *frame);
116int moo_offset_get(const cpl_frame *refframe);
117#endif
const char * moo_detector_get_name(moo_detector_type type)
Get the extension name of a detector.
Definition: moo_detector.c:183
int moo_detector_get_spectro(int ntas)
Get the spctro name for a ntas.
Definition: moo_detector.c:165
moo_mode_type moo_mode_get(const cpl_frame *frame)
Get the name of a mode from a frame.
Definition: moo_detector.c:224
int moo_offset_get(const cpl_frame *refframe)
Get the offset from a frame.
Definition: moo_detector.c:254
const char * moo_detector_get_err_extname(moo_detector_type type, int ntas)
Get the ERROR extension name of a detector.
Definition: moo_detector.c:66
const char * moo_detector_get_extname(moo_detector_type type, int ntas)
Get the extension name of a detector.
Definition: moo_detector.c:137
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
_moo_detector_type_
the different type of detectors
Definition: moo_detector.h:40
const char * moo_detector_get_qual_extname(moo_detector_type type, int ntas)
Get the QUAL extension name of a detector.
Definition: moo_detector.c:101
const char * moo_mode_get_name(moo_mode_type type)
Get the name of a mode.
Definition: moo_detector.c:204
@ MOO_TYPE_YJ
Definition: moo_detector.h:50
@ MOO_TYPE_H
Definition: moo_detector.h:54
@ MOO_TYPE_RI
Definition: moo_detector.h:46