ERIS Pipeline Reference Manual 1.8.15
eris_nix_master_bpm.h
1/* $Id$
2 *
3 * This file is part of the ERIS/NIX Pipeline
4 * Copyright (C) 2017 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/*
22 * $Author$:
23 * $Date$:
24 * $Rev$:
25 */
26
27/*
28 * This file defines constants and methods to create and manipulate a
29 * 'master_bpm' structure. This contains a cpl_image of data type CPL_INT,
30 * whose pixels can have bits set to reflect the nature of any associated
31 * problem. The format follows the data quality format described in the
32 * 'Euro3D Data Format' document.
33 */
34
35#ifndef ERIS_NIX_MASTER_BPM_H
36#define ERIS_NIX_MASTER_BPM_H
37
38#define MASTER_BPM_INITIALISE {NULL, 1<<7, 1<<8, 1<<9, 1<<14, 1<<16}
39
40#ifdef HAVE_CONFIG_H
41#include <config.h>
42#endif
43
44/*-----------------------------------------------------------------------------
45 Includes
46 -----------------------------------------------------------------------------*/
47
48#include <cpl.h>
49#include <hdrl.h>
50
51/*-----------------------------------------------------------------------------
52 Declarations
53 -----------------------------------------------------------------------------*/
54
55typedef struct {
56 const char * filename;
57 const cpl_image * bpm;
58 const cpl_propertylist * plist;
59} master_bpm;
60
61typedef enum {BPM_GOOD,
62 BPM_CORRECTED_TELLURIC,
63 BPM_UNCORRECTED_TELLURIC,
64 BPM_STRAY_LIGHT,
65 BPM_ELECTRONIC_PICKUP,
66 BPM_COSMIC_RAY_REMOVED,
67 BPM_COSMIC_RAY_UNREMOVED,
68 BPM_LOW_QE,
69 BPM_FLAGGED_BY_CALIBRATION,
70 BPM_HOT,
71 BPM_DARK,
72 BPM_QUESTIONABLE,
73 BPM_DETECTOR_SATURATION,
74 BPM_ATOD_SATURATION,
75 BPM_CAMERA_DEFECT,
76 BPM_BAD,
77 BPM_NON_LINEAR,
78 BPM_UNILLUMINATED,
79 BPM_UNDEF_18,
80 BPM_UNDEF_19,
81 BPM_UNDEF_20,
82 BPM_UNDEF_21,
83 BPM_UNDEF_22,
84 BPM_UNDEF_23,
85 BPM_UNDEF_24,
86 BPM_UNDEF_25,
87 BPM_UNDEF_26,
88 BPM_UNDEF_27,
89 BPM_UNDEF_28,
90 BPM_UNDEF_29,
91 BPM_MISSING,
92 BPM_OUTSIDE_RANGE} bpm_code;
93
94/*-----------------------------------------------------------------------------
95 Prototypes
96 -----------------------------------------------------------------------------*/
97
98master_bpm * en_master_bpm_create(const char *,
99 const cpl_mask *,
100 const bpm_code,
101 const cpl_propertylist *);
102
103master_bpm * en_master_bpm_create_from_image(const char *,
104 const cpl_image *,
105 const cpl_propertylist *);
106
107void en_master_bpm_delete(master_bpm *);
108
109cpl_mask * en_master_bpm_get_mask(const master_bpm *, const int);
110
111master_bpm * en_master_bpm_load_from_frameset(const cpl_frameset *,
112 const char *,
113 cpl_frameset *,
114 const int);
115
116cpl_error_code en_master_bpm_set(master_bpm *, const cpl_mask *, bpm_code);
117
118
119#endif /* ERIS_NIX_MASTER_BPM_H */
120
121
void en_master_bpm_delete(master_bpm *)
Delete a 'master_bpm' struct.