MOONS Pipeline Reference Manual 0.13.2
moo_bpm.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_BPM_H
21#define MOO_BPM_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 -----------------------------------------------------------------------------*/
34typedef struct
35{
36 char *filename;
37 cpl_propertylist *primary_header;
38 cpl_propertylist *data_header[6];
39 cpl_image *data[6];
40} moo_bpm;
41/*-----------------------------------------------------------------------------
42 Functions prototypes
43 -----------------------------------------------------------------------------*/
44moo_bpm *moo_bpm_new(void);
45cpl_error_code moo_bpm_set_data(moo_bpm *self,
47 int ntas,
48 cpl_image *data,
49 cpl_propertylist *header);
50cpl_error_code moo_bpm_add_data(moo_bpm *self,
51 cpl_image *data,
53 int ntas);
54cpl_error_code moo_bpm_merge(moo_bpm *a, moo_bpm *b);
55void moo_bpm_save(moo_bpm *self, const char *filename);
56void moo_bpm_delete(moo_bpm *self);
57#endif
void moo_bpm_save(moo_bpm *self, const char *filename)
Save a moo_bpm to a FITS file.
Definition: moo_bpm.c:186
cpl_error_code moo_bpm_set_data(moo_bpm *self, moo_detector_type type, int ntas, cpl_image *data, cpl_propertylist *header)
set bpm data for relevant extension
Definition: moo_bpm.c:85
cpl_error_code moo_bpm_merge(moo_bpm *a, moo_bpm *b)
Merge to moo_bpm structure in the first.
Definition: moo_bpm.c:158
void moo_bpm_delete(moo_bpm *self)
Delete a moo_bpm.
Definition: moo_bpm.c:213
cpl_error_code moo_bpm_add_data(moo_bpm *self, cpl_image *data, moo_detector_type type, int ntas)
Add CPL_IMAGE extension to BPM filename and update moo_bpm structure.
Definition: moo_bpm.c:113
moo_bpm * moo_bpm_new(void)
Create a new moo_bpm.
Definition: moo_bpm.c:66
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64