MOONS Pipeline Reference Manual 0.13.2
moo_sci.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_SCI_H
21#define MOO_SCI_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_sci_single.h"
31#include "moo_detector.h"
32#include "moo_sky_lines_list.h"
33#include "moo_params.h"
34#include "moo_target_table.h"
35/*-----------------------------------------------------------------------------
36 Types
37 -----------------------------------------------------------------------------*/
38typedef struct
39{
40 const char *filename;
41 cpl_propertylist *primary_header;
42 moo_sci_single *ri;
43 moo_sci_single *yj;
44 moo_sci_single *h;
45 moo_target_table *target_table;
46} moo_sci;
47/*-----------------------------------------------------------------------------
48 Functions prototypes
49 -----------------------------------------------------------------------------*/
50moo_sci *moo_sci_new(void);
51void moo_sci_delete(moo_sci *self);
52cpl_error_code
53moo_sci_add_target_table(moo_sci *self, moo_target_table *fibre_table);
54cpl_error_code moo_sci_set_single(moo_sci *self, moo_sci_single *s);
55cpl_error_code
56moo_sci_add_single(moo_sci *self, moo_detector_type type, moo_sci_single *s);
57
59moo_sci *moo_sci_create(const cpl_frame *frame);
60cpl_error_code moo_sci_load(moo_sci *self, unsigned int level);
61moo_sci_single *
62moo_sci_load_single(moo_sci *self, moo_detector_type type, int level);
63moo_sci_single *moo_sci_get_single(moo_sci *self, moo_detector_type type);
64void moo_sci_save(moo_sci *self, const char *filename);
65cpl_error_code moo_sci_compute_snr(moo_sci *self, moo_sky_lines_list *skylines);
66
67#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
cpl_error_code moo_sci_set_single(moo_sci *self, moo_sci_single *s)
assign moo_sci_single structure in moo_sci structure
Definition: moo_sci.c:174
cpl_error_code moo_sci_add_target_table(moo_sci *self, moo_target_table *fibre_table)
Add target table to SCI file and update moo_sci structure.
Definition: moo_sci.c:132
moo_sci_single * moo_sci_load_single(moo_sci *self, moo_detector_type type, int level)
Load the type part in SCI and return it.
Definition: moo_sci.c:323
void moo_sci_delete(moo_sci *self)
Delete a moo_sci.
Definition: moo_sci.c:84
moo_sci * moo_sci_new(void)
Create a new moo_sci.
Definition: moo_sci.c:66
moo_sci * moo_sci_create(const cpl_frame *frame)
Create a new empty SCI filename.
Definition: moo_sci.c:249
cpl_error_code moo_sci_add_single(moo_sci *self, moo_detector_type type, moo_sci_single *s)
Add SCI_SINGLE extension to SCI file and update moo_sci structure.
Definition: moo_sci.c:216
moo_sci_single * moo_sci_get_single(moo_sci *self, moo_detector_type type)
Get the type part in SCI and return it.
Definition: moo_sci.c:351
void moo_sci_save(moo_sci *self, const char *filename)
Save a moo_sci to a FITS file.
Definition: moo_sci.c:385
moo_target_table * moo_sci_get_target_table(moo_sci *sci)
Get the target table of SCI file.
Definition: moo_sci.c:284
cpl_error_code moo_sci_compute_snr(moo_sci *self, moo_sky_lines_list *skylines)
Compute SNR for all targets in SCI.
Definition: moo_sci.c:415
the different type of detectors