MOONS Pipeline Reference Manual 0.13.1
moo_rbn.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_RBN_H
21#define MOO_RBN_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_rbn_single.h"
31#include "moo_detector.h"
32/*-----------------------------------------------------------------------------
33 Types
34 -----------------------------------------------------------------------------*/
35typedef struct
36{
37 const char *filename;
38 cpl_propertylist *primary_header;
39 moo_rbn_single *ri;
40 moo_rbn_single *yj;
41 moo_rbn_single *h;
42 cpl_table *fibre_table;
43} moo_rbn;
44/*-----------------------------------------------------------------------------
45 Functions prototypes
46 -----------------------------------------------------------------------------*/
47moo_rbn *moo_rbn_new(void);
48moo_rbn *moo_rbn_create(const cpl_frame *frame);
49cpl_propertylist *moo_rbn_get_primary_header(moo_rbn *self);
50void moo_rbn_delete(moo_rbn *self);
51cpl_error_code moo_rbn_set_single(moo_rbn *self, moo_rbn_single *s);
52cpl_error_code
53moo_rbn_add_single(moo_rbn *self, moo_detector_type type, moo_rbn_single *s);
54void moo_rbn_save(moo_rbn *self, const char *filename);
55cpl_error_code moo_rbn_add_fibre_table(moo_rbn *self, cpl_table *fibre_table);
56moo_rbn_single *moo_rbn_get_single(moo_rbn *self, moo_detector_type type);
57moo_rbn_single *
58moo_rbn_load_single(moo_rbn *self, moo_detector_type type, unsigned int level);
59cpl_error_code moo_rbn_free_single(moo_rbn *self, moo_detector_type type);
60
61cpl_table *moo_rbn_get_fibre_table(moo_rbn *self);
62cpl_error_code moo_rbn_compute_snr(moo_rbn *self, moo_sky_lines_list *skylines);
63cpl_error_code moo_rbn_dump(const moo_rbn *self, FILE *stream);
64#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
moo_rbn_single * moo_rbn_load_single(moo_rbn *self, moo_detector_type type, unsigned int level)
Load the type part in RBN and return it.
Definition: moo_rbn.c:360
cpl_error_code moo_rbn_set_single(moo_rbn *self, moo_rbn_single *s)
assign moo_rbn_single structure in moo_rbn structure
Definition: moo_rbn.c:184
void moo_rbn_delete(moo_rbn *self)
Delete a moo_rbn.
Definition: moo_rbn.c:120
void moo_rbn_save(moo_rbn *self, const char *filename)
Save a moo_rbn to a FITS file.
Definition: moo_rbn.c:259
cpl_propertylist * moo_rbn_get_primary_header(moo_rbn *self)
Get the PRIMARY HEADER in RBN.
Definition: moo_rbn.c:512
moo_rbn_single * moo_rbn_get_single(moo_rbn *self, moo_detector_type type)
Get a RBN single from RBN.
Definition: moo_rbn.c:325
cpl_error_code moo_rbn_dump(const moo_rbn *self, FILE *stream)
Dump structural information of RBN.
Definition: moo_rbn.c:469
moo_rbn * moo_rbn_create(const cpl_frame *frame)
Create a new empty RBN filename.
Definition: moo_rbn.c:85
cpl_error_code moo_rbn_add_single(moo_rbn *self, moo_detector_type type, moo_rbn_single *s)
Add RBN_SINGLE extension to RBN filename and update moo_rbn structure.
Definition: moo_rbn.c:226
cpl_error_code moo_rbn_add_fibre_table(moo_rbn *self, cpl_table *fibre_table)
Add fibre table to RBN filename and update moo_rbn structure.
Definition: moo_rbn.c:288
cpl_error_code moo_rbn_compute_snr(moo_rbn *self, moo_sky_lines_list *skylines)
Compute SNR for targets in RBN.
Definition: moo_rbn.c:421
cpl_table * moo_rbn_get_fibre_table(moo_rbn *self)
Get the FIBRE TABLE in RBN.
Definition: moo_rbn.c:397
moo_rbn * moo_rbn_new(void)
Create a new moo_rbn.
Definition: moo_rbn.c:67
cpl_error_code moo_rbn_free_single(moo_rbn *self, moo_detector_type type)
Free the given type part in RBN.
Definition: moo_rbn.c:160