MOONS Pipeline Reference Manual 0.13.2
moo_cube.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_CUBE_H
21#define MOO_CUBE_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28#include <hdrl.h>
29#include "moo_detector.h"
30#include "moo_saturate_map.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34typedef struct
35{
36 char *filename;
37 cpl_propertylist *primary_header;
38 cpl_propertylist *data_header[6];
39 cpl_imagelist *data[6];
40} moo_cube;
41/*-----------------------------------------------------------------------------
42 Functions prototypes
43 -----------------------------------------------------------------------------*/
44moo_cube *moo_cube_new(void);
45moo_cube *moo_cube_load(const cpl_frame *frame);
46cpl_error_code moo_cube_set_data(moo_cube *self,
48 int ntas,
49 cpl_imagelist *data,
50 cpl_propertylist *header);
51cpl_error_code moo_cube_add_data(moo_cube *self,
52 cpl_imagelist *list,
54 int ntas);
55cpl_error_code moo_cube_normalise(moo_cube *self, moo_saturate_map *saturate);
56void moo_cube_save(moo_cube *self, const char *filename);
57moo_cube *moo_cube_merge(moo_cube *cubea,
58 moo_saturate_map *saturatea,
59 moo_cube *cubeb,
60 moo_saturate_map *saturateb);
61void moo_cube_delete(moo_cube *self);
62#endif
moo_cube * moo_cube_new(void)
Create a new moo_cube.
Definition: moo_cube.c:66
cpl_error_code moo_cube_add_data(moo_cube *self, cpl_imagelist *list, moo_detector_type type, int ntas)
Add CPL_IMAGELIST extension to CUBE filename and update moo_cube structure.
Definition: moo_cube.c:147
void moo_cube_delete(moo_cube *self)
Delete a moo_cube.
Definition: moo_cube.c:343
moo_cube * moo_cube_merge(moo_cube *cubea, moo_saturate_map *saturatea, moo_cube *cubeb, moo_saturate_map *saturateb)
Merging two cubes.
Definition: moo_cube.c:312
cpl_error_code moo_cube_normalise(moo_cube *self, moo_saturate_map *saturate)
Normalise a moo_cube using saturate map.
Definition: moo_cube.c:238
void moo_cube_save(moo_cube *self, const char *filename)
Save a moo_cube to a FITS file.
Definition: moo_cube.c:191
cpl_error_code moo_cube_set_data(moo_cube *self, moo_detector_type type, int ntas, cpl_imagelist *data, cpl_propertylist *header)
set cube data for relevant extension
Definition: moo_cube.c:119
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64