MOONS Pipeline Reference Manual 0.13.2
moo_saturate_map.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_SATURATE_MAP_H
21#define MOO_SATURATE_MAP_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_detector.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34#define MOO_SATURATE_MAP_INDEX "INDEX"
35#define MOO_SATURATE_MAP_FLUX "FLUX"
36#define MOO_SATURATE_MAP_ERR "ERR"
37#define MOO_SATURATE_MAP_TIME "TIME"
38
39typedef struct
40{
41 char *filename;
42 cpl_propertylist *primary_header;
43 cpl_propertylist *data_header[6];
44 cpl_image *data[6];
45 cpl_image *flux[6];
46 cpl_image *err[6];
47 cpl_image *exptime[6];
48} moo_saturate_map;
49/*-----------------------------------------------------------------------------
50 Functions prototypes
51 -----------------------------------------------------------------------------*/
52moo_saturate_map *moo_saturate_map_new(void);
53moo_saturate_map *moo_saturate_map_load(const cpl_frame *mapframe);
54cpl_error_code moo_saturate_map_set_data(moo_saturate_map *self,
56 int ntas,
57 cpl_image *data,
58 cpl_image *flux,
59 cpl_image *err,
60 cpl_image *exptime,
61 cpl_propertylist *header);
62cpl_error_code moo_saturate_map_add_data(moo_saturate_map *self,
63 cpl_image *data,
64 cpl_image *flux,
65 cpl_image *err,
66 cpl_image *exptime,
68 int ntas);
69void moo_saturate_map_save(moo_saturate_map *self, const char *filename);
70void moo_saturate_map_delete(moo_saturate_map *self);
71#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
cpl_error_code moo_saturate_map_add_data(moo_saturate_map *self, cpl_image *data, cpl_image *flux, cpl_image *err, cpl_image *exptime, moo_detector_type type, int ntas)
Add CPL_IMAGE extension to MAP filename and update moo_saurate_map structure.
moo_saturate_map * moo_saturate_map_new(void)
Create a new moo_saturate_map.
void moo_saturate_map_delete(moo_saturate_map *self)
Delete a moo_map_saturate.
void moo_saturate_map_save(moo_saturate_map *self, const char *filename)
Save a moo_saturate_map to a FITS file.
cpl_error_code moo_saturate_map_set_data(moo_saturate_map *self, moo_detector_type type, int ntas, cpl_image *data, cpl_image *flux, cpl_image *err, cpl_image *exptime, cpl_propertylist *header)
set saturate map data for relevant extension