MOONS Pipeline Reference Manual 0.13.2
moo_det.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_DET_H
21#define MOO_DET_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28#include <hdrl.h>
29#include "moo_detector.h"
30#include "moo_single.h"
31
32
33/*-----------------------------------------------------------------------------
34 Types
35 -----------------------------------------------------------------------------*/
36/* detector structure */
37
38typedef struct
39{
40 char *filename;
41
42 cpl_propertylist *primary_header;
43
44 moo_single *ri[2];
45
46 moo_single *yj[2];
47
48 moo_single *h[2];
49
50 cpl_table *fibre_table;
51} moo_det;
52/*-----------------------------------------------------------------------------
53 Functions prototypes
54 -----------------------------------------------------------------------------*/
55moo_det *moo_det_new(void);
56moo_det *moo_det_create(const cpl_frame *frame);
57cpl_error_code moo_det_load(moo_det *self, unsigned int level);
58moo_single *
59moo_det_load_single(moo_det *self, moo_detector_type type, int num, int level);
60cpl_error_code
61moo_det_free_single(moo_det *self, moo_detector_type type, int num);
62cpl_error_code moo_det_load_ri(moo_det *self, int num, int level);
63cpl_error_code moo_det_load_yj(moo_det *self, int num, int level);
64cpl_error_code moo_det_load_h(moo_det *self, int num, int level);
65
66cpl_error_code moo_det_set_single(moo_det *self,
68 int num,
69 moo_single *single);
70moo_single *moo_det_get_single(moo_det *self, moo_detector_type type, int num);
71
72cpl_propertylist *moo_det_get_primary_header(moo_det *self);
73cpl_table *moo_det_get_fibre_table(moo_det *self);
74
75cpl_propertylist *
76moo_det_get_single_header(moo_det *self, moo_detector_type type, int num);
77
78void moo_det_delete(moo_det *self);
79void moo_det_save(moo_det *self, const char *filename);
80cpl_error_code moo_det_dump(const moo_det *self, FILE *stream);
81cpl_error_code moo_det_divide(moo_det *self, moo_det *det);
82cpl_error_code moo_det_rescale_using_exptime(moo_det *self, moo_det *det);
83cpl_error_code moo_det_sum(moo_det *self, moo_det *det);
84cpl_error_code moo_det_subtract(moo_det *self, moo_det *det);
85cpl_error_code moo_det_mean(moo_det *self, moo_det *det);
86cpl_error_code moo_det_filter_snr(moo_det *self, double *min_snr);
87#endif
cpl_error_code moo_det_load_h(moo_det *self, int num, int level)
Load the H part in DET.
Definition: moo_det.c:298
moo_single * moo_det_load_single(moo_det *self, moo_detector_type type, int num, int level)
Load the type part in DET and return it.
Definition: moo_det.c:197
cpl_error_code moo_det_rescale_using_exptime(moo_det *self, moo_det *det)
Rescale using exptime factor.
Definition: moo_det.c:721
cpl_error_code moo_det_filter_snr(moo_det *self, double *min_snr)
Flag low snr pixels from DET structure.
Definition: moo_det.c:808
cpl_error_code moo_det_load_ri(moo_det *self, int num, int level)
Load the RI part in DET.
Definition: moo_det.c:166
cpl_error_code moo_det_load_yj(moo_det *self, int num, int level)
Load the YJ part in DET.
Definition: moo_det.c:265
cpl_error_code moo_det_free_single(moo_det *self, moo_detector_type type, int num)
Free the given type part in DET.
Definition: moo_det.c:231
cpl_error_code moo_det_sum(moo_det *self, moo_det *det)
Sum DET structure.
Definition: moo_det.c:604
cpl_propertylist * moo_det_get_primary_header(moo_det *self)
Get the PRIMARY HEADER in DET.
Definition: moo_det.c:453
moo_det * moo_det_create(const cpl_frame *frame)
Create a new moo_det from the given DET frame.
Definition: moo_det.c:91
moo_det * moo_det_new(void)
Create a new moo_det.
Definition: moo_det.c:71
void moo_det_save(moo_det *self, const char *filename)
Save a moo_det to a FITS file.
Definition: moo_det.c:507
cpl_error_code moo_det_dump(const moo_det *self, FILE *stream)
Dump structural information of DET.
Definition: moo_det.c:550
cpl_table * moo_det_get_fibre_table(moo_det *self)
Get the FIBRE TABLE in DET.
Definition: moo_det.c:424
cpl_error_code moo_det_load(moo_det *self, unsigned int level)
Load all parts in DET.
Definition: moo_det.c:135
cpl_error_code moo_det_subtract(moo_det *self, moo_det *det)
Subtract DET structure.
Definition: moo_det.c:643
void moo_det_delete(moo_det *self)
Delete a moo_det.
Definition: moo_det.c:472
cpl_error_code moo_det_mean(moo_det *self, moo_det *det)
Sum DET structure.
Definition: moo_det.c:769
moo_single * moo_det_get_single(moo_det *self, moo_detector_type type, int num)
Get the type part in DET and return it.
Definition: moo_det.c:359
cpl_error_code moo_det_divide(moo_det *self, moo_det *det)
Divide DET structure.
Definition: moo_det.c:682
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64