GIRAFFE Pipeline Reference Manual

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

This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:42 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004