MOONS Pipeline Reference Manual 0.13.1
moo_badpix.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_BADPIX_H
21#define MOO_BADPIX_H
22
23/*-----------------------------------------------------------------------------
24 Includes
25 -----------------------------------------------------------------------------*/
26
27#include <cpl.h>
28/*-----------------------------------------------------------------------------
29 Types
30 -----------------------------------------------------------------------------*/
36#define MOO_BADPIX_GOOD 0x0
37
39#define MOO_BADPIX_NOISY 0x8
40
42#define MOO_BADPIX_COSMIC_UNREMOVED 0x20
43
45#define MOO_BADPIX_LOW_QE 0x40
46
48#define MOO_BADPIX_CALIB_DEFECT 0x80
49
51#define MOO_BADPIX_HOT 0x100
52
54#define MOO_BADPIX_COLD 0x200
55
57#define MOO_BADPIX_COSMETIC 0x2000
58
60#define MOO_BADPIX_NON_LINEAR 0x8000
62#define MOO_BADPIX_OUTSIDE_DATA_RANGE 0x80000000
63
65/*-----------------------------------------------------------------------------
66 Functions prototypes
67 -----------------------------------------------------------------------------*/
68cpl_error_code
69moo_badpix_to_mask(cpl_image *badpix, cpl_mask *mask, unsigned int level);
70cpl_error_code
71moo_mask_to_badpix(cpl_image *badpix, cpl_mask *mask, unsigned int level);
72cpl_error_code moo_badpix_merge(cpl_image *badpix1, cpl_image *badpix2);
73#endif
cpl_error_code moo_mask_to_badpix(cpl_image *badpix, cpl_mask *mask, unsigned int level)
Add the mask of the badpix level to the badpix map.
Definition: moo_badpix.c:105
cpl_error_code moo_badpix_merge(cpl_image *badpix1, cpl_image *badpix2)
Merge to bad pixel map.
Definition: moo_badpix.c:146
cpl_error_code moo_badpix_to_mask(cpl_image *badpix, cpl_mask *mask, unsigned int level)
Apply the badpix map on the given mask.
Definition: moo_badpix.c:58