GIRAFFE Pipeline Reference Manual

giutils.h
1/*
2 * This file is part of the GIRAFFE Pipeline
3 * Copyright (C) 2002-2019 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 St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef GIUTILS_H
21#define GIUTILS_H
22
23#include <cxtypes.h>
24
25#include <cpl_macros.h>
26#include <cpl_image.h>
27#include <cpl_propertylist.h>
28#include <cpl_parameterlist.h>
29#include <cpl_frameset.h>
30
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36 typedef struct GiTable GiTable;
37
38 enum GiInstrumentMode {
39 GIMODE_NONE = 0,
40 GIMODE_MEDUSA = 1,
41 GIMODE_IFU = 2,
42 GIMODE_ARGUS = 3
43 };
44
45 typedef enum GiInstrumentMode GiInstrumentMode;
46
47
48 enum GiBadPixelFlags {
49 /* Good pixel */
50 GI_BPIX_OK = 0x00000,
51
52 /* CCD bad pixel */
53 GI_BPIX_CCD = 0x00001,
54
55 /* CCD hot pixel */
56 GI_BPIX_HOT = 0x00003,
57
58 /* CCD dark pixel */
59 GI_BPIX_COLD = 0x00005,
60
61 /* Pixel rejected by dark processing */
62 GI_RPIX_DARK = 0x00100,
63
64 /* Pixel rejected by bias processing */
65 GI_RPIX_BIAS = 0x00200,
66
67 /* Pixel rejected by multiple CR detection */
68 GI_RPIX_CRHM = 0x00400,
69
70 /* Pixel rejected by single CR detection */
71 GI_RPIX_CRHS = 0x00800,
72
73 /* Pixel rejected by estimation */
74 GI_RPIX_ESTM = 0x01000,
75
76 /* Pixel rejected by optimal extraction */
77 GI_RPIX_EXTO = 0x02000,
78
79 /* 2D growing in both directions */
80 GI_APIX_ESTM = 0x10000
81 };
82
83 typedef enum GiBadPixelFlags GiBadPixelFlags;
84
85
86 enum GiBadPixelMasks {
87 /* CCD bad pixels */
88 GI_M_PIX_BAD = 0x000ff,
89
90 /* Pixels rejected by processing */
91 GI_M_PIX_REJECT = 0x0ff00,
92
93 /* Any bad pixel */
94 GI_M_PIX_SET = 0x0ffff
95 };
96
97 typedef enum GiBadPixelMasks GiBadPixelMasks;
98
99
100 struct GiRecipeInfo {
101 cxchar* recipe;
102 cxint sequence;
103 cxchar* start;
104 cpl_parameterlist *options;
105 };
106
107 typedef struct GiRecipeInfo GiRecipeInfo;
108
109
110 struct GiGroupInfo {
111 const cxchar* tag;
112 cpl_frame_group group;
113 };
114
115 typedef struct GiGroupInfo GiGroupInfo;
116
117
118 /*
119 * Static information retrieval
120 */
121
122 const cxchar* giraffe_get_license(void);
123
124
125 /*
126 * Miscellaneous
127 */
128
129 GiInstrumentMode giraffe_get_mode(cpl_propertylist* properties);
130
131 cxchar* giraffe_path_get_basename(const cxchar* path);
132
133 cxchar* giraffe_localtime_iso8601(void);
134
135 cxint giraffe_add_recipe_info(cpl_propertylist* plist,
136 const GiRecipeInfo* info);
137 cxint giraffe_add_frameset_info(cpl_propertylist* plist,
138 const cpl_frameset* set,
139 cxint sequence);
140
141 cxint giraffe_propertylist_update(cpl_propertylist* self,
142 cpl_propertylist* properties,
143 const cxchar* hint);
144 cxint giraffe_propertylist_copy(cpl_propertylist* self,
145 const cxchar* name,
146 const cpl_propertylist* other,
147 const cxchar* othername);
148
149 cxint giraffe_frameset_set_groups(cpl_frameset* set, GiGroupInfo* groups);
150
151 cxint giraffe_propertylist_update_wcs(cpl_propertylist* properties,
152 cxsize naxis,
153 const cxdouble* crpix,
154 const cxdouble* crval,
155 const cxchar** ctype,
156 const cxchar** cunit,
157 const cpl_matrix* cd);
158
159 cxdouble giraffe_propertylist_get_conad(const cpl_propertylist* properties);
160
161 cxdouble giraffe_propertylist_get_ron(const cpl_propertylist* properties);
162
163 const char * giraffe_get_flat_type(cpl_propertylist* plist);
164
165 const int giraffe_qc_airm_see_avg(cpl_propertylist* properties);
166
167 const int giraffe_qc_update_sci_props(cpl_propertylist* properties, GiTable* fibers);
168
169
170#ifdef __cplusplus
171}
172#endif
173
174#endif /* GIUTILS_H */
cxint giraffe_add_recipe_info(cpl_propertylist *plist, const GiRecipeInfo *info)
Add recipe specific information to a property list.
Definition: giutils.c:625
cxchar * giraffe_localtime_iso8601(void)
Get the current date and time in ISO 8601 format.
Definition: giutils.c:582
cxint giraffe_add_frameset_info(cpl_propertylist *plist, const cpl_frameset *set, cxint sequence)
Add frameset specific information to a property list.
Definition: giutils.c:784
cxchar * giraffe_path_get_basename(const cxchar *path)
Gets the name of a file without any leading directory components.
Definition: giutils.c:520
cxint giraffe_propertylist_copy(cpl_propertylist *self, const cxchar *name, const cpl_propertylist *other, const cxchar *othername)
Copy a property from one list to another.
Definition: giutils.c:1106
cxdouble giraffe_propertylist_get_conad(const cpl_propertylist *properties)
Retrieve the ADU to electrons conversion factor from the given properties.
Definition: giutils.c:1471
const cxchar * giraffe_get_license(void)
Get the pipeline copyright and license.
Definition: giutils.c:420
cxint giraffe_propertylist_update(cpl_propertylist *self, cpl_propertylist *properties, const cxchar *hint)
Update a property list.
Definition: giutils.c:1015
cxdouble giraffe_propertylist_get_ron(const cpl_propertylist *properties)
Retrieve the read-out noise from the given properties.
Definition: giutils.c:1555
GiInstrumentMode giraffe_get_mode(cpl_propertylist *properties)
Determines the instrument mode from a property list.
Definition: giutils.c:442

This file is part of the GIRAFFE Pipeline Reference Manual 2.18.3.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri May 23 2025 16:31:10 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2004