MOONS Pipeline Reference Manual 0.13.2
moo_mask.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_MASK_H
21#define MOO_MASK_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 cpl_mask *data[6];
37
38} moo_mask;
39
40#define MASK_EXTENSION "MASK"
41/*-----------------------------------------------------------------------------
42 Functions prototypes
43 -----------------------------------------------------------------------------*/
44moo_mask *moo_mask_new(void);
45void moo_mask_delete(moo_mask *self);
46void moo_mask_save(moo_mask *self, const char *filename);
47cpl_mask *moo_mask_get(moo_mask *self, moo_detector_type type, int num);
48cpl_error_code
49moo_mask_set(moo_mask *self, moo_detector_type type, int num, cpl_mask *mask);
50#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
cpl_mask * moo_mask_get(moo_mask *self, moo_detector_type type, int num)
Get the cpl_mask associated to given type,num.
Definition: moo_mask.c:81
void moo_mask_delete(moo_mask *self)
Delete a moo_mask.
Definition: moo_mask.c:124
void moo_mask_save(moo_mask *self, const char *filename)
Save a moo_mask to a FITS file.
Definition: moo_mask.c:150
cpl_error_code moo_mask_set(moo_mask *self, moo_detector_type type, int num, cpl_mask *mask)
Set the cpl_mask associated to given type,num.
Definition: moo_mask.c:103
moo_mask * moo_mask_new(void)
Create a new moo_mask
Definition: moo_mask.c:64