MOONS Pipeline Reference Manual 0.13.1
moo_f2f.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_F2F_H
21#define MOO_F2F_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28#include <hdrl.h>
29#include "moo_detector.h"
30/*-----------------------------------------------------------------------------
31 Types
32 -----------------------------------------------------------------------------*/
33typedef struct
34{
35 const char *filename;
36 cpl_propertylist *primary_header;
37 cpl_table *table;
38} moo_f2f;
39
40#define MOO_F2F_EXTNAME "F2F"
41#define MOO_F2F_INDEX "INDEX"
42#define MOO_F2F_INDEX_TYPE CPL_TYPE_INT
43#define MOO_F2F_TRANS_RI "TRANS_RI"
44#define MOO_F2F_TRANS_RI_TYPE CPL_TYPE_FLOAT
45#define MOO_F2F_TRANS_YJ "TRANS_YJ"
46#define MOO_F2F_TRANS_YJ_TYPE CPL_TYPE_FLOAT
47#define MOO_F2F_TRANS_H "TRANS_H"
48#define MOO_F2F_TRANS_H_TYPE CPL_TYPE_FLOAT
49/*-----------------------------------------------------------------------------
50 Functions prototypes
51 -----------------------------------------------------------------------------*/
52moo_f2f *moo_f2f_new(void);
53moo_f2f *moo_f2f_load(const cpl_frame *f2f_frame);
54moo_f2f *moo_f2f_create(int nbrows, cpl_table *table);
55cpl_error_code moo_f2f_order_by_indexrbn(moo_f2f *f2f);
56cpl_error_code moo_f2f_order_by_index(moo_f2f *f2f);
57cpl_error_code moo_f2f_set_trans(moo_f2f *self,
59 cpl_array *idx,
60 cpl_vector *values);
61const char *moo_f2f_get_trans_colname(moo_f2f *self, moo_detector_type type);
62cpl_vector *
63moo_f2f_get_trans(moo_f2f *self, moo_detector_type type, cpl_array *idxtab);
64float *moo_f2f_get_trans_column(moo_f2f *self, moo_detector_type type);
65
66cpl_error_code moo_f2f_compute_qc(moo_f2f *self, int *ref, cpl_array *bad);
67
68
69/*cpl_error_code moo_ext_set_single(moo_ext* self, moo_detector_type type,
70 int ntas, moo_ext_single* s);
71moo_ext* moo_ext_create(const char* filename);
72
73moo_ext* moo_ext_load(const cpl_frame* extframe);
74moo_ext_single* moo_ext_get_single(moo_ext* self, moo_detector_type type,
75 int num);
76
77cpl_error_code moo_ext_add_single(moo_ext* self, moo_ext_single* s,
78 moo_detector_type type, int ntas);
79cpl_error_code moo_ext_add_fibre_table(moo_ext* self, cpl_table* fibre_table);
80
81cpl_table* moo_ext_get_fibre_table(moo_ext* self);*/
82void moo_f2f_delete(moo_f2f *self);
83cpl_error_code moo_f2f_save(moo_f2f *self, const char *filename);
84//cpl_error_code moo_ext_dump(const moo_ext * self, FILE * stream);
85#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
float * moo_f2f_get_trans_column(moo_f2f *self, moo_detector_type type)
Get transmission column from table.
Definition: moo_f2f.c:319
moo_f2f * moo_f2f_new(void)
Create a new moo_f2f.
Definition: moo_f2f.c:68
const char * moo_f2f_get_trans_colname(moo_f2f *self, moo_detector_type type)
Get transmission column name from table.
Definition: moo_f2f.c:260
cpl_error_code moo_f2f_order_by_indexrbn(moo_f2f *f2f)
Order F2F by INDEXRBN (ASC)
Definition: moo_f2f.c:169
void moo_f2f_delete(moo_f2f *self)
Delete a moo_f2f.
Definition: moo_f2f.c:413
cpl_vector * moo_f2f_get_trans(moo_f2f *self, moo_detector_type type, cpl_array *idxtab)
Get transmission values from table.
Definition: moo_f2f.c:289
moo_f2f * moo_f2f_load(const cpl_frame *f2f_frame)
Load a F2F table from a fits file.
Definition: moo_f2f.c:139
cpl_error_code moo_f2f_set_trans(moo_f2f *self, moo_detector_type type, cpl_array *idx, cpl_vector *values)
Set transmission values in table.
Definition: moo_f2f.c:216
moo_f2f * moo_f2f_create(int nbrows, cpl_table *table)
Create a new moo_f2f and an empty structure in memory.
Definition: moo_f2f.c:86
cpl_error_code moo_f2f_order_by_index(moo_f2f *f2f)
Order F2F by SPECTRO,INDEX (ASC)
Definition: moo_f2f.c:190