-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCCfits.h
More file actions
155 lines (121 loc) · 3.35 KB
/
CCfits.h
File metadata and controls
155 lines (121 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Astrophysics Science Division,
// NASA/ Goddard Space Flight Center
// HEASARC
// http://heasarc.gsfc.nasa.gov
// e-mail: ccfits@legacy.gsfc.nasa.gov
//
// Original author: Ben Dorman
#ifndef CCFITS_H
#define CCFITS_H 1
// fitsio
#include "fitsio.h"
// string
#include <string>
namespace CCfits {
class ExtHDU;
class Column;
} // namespace CCfits
#include <map>
#include <sys/types.h>
#include "longnam.h"
#include "float.h"
namespace CCfits {
/*! \namespace CCfits
* \brief Namespace enclosing all CCfits classes and globals definitions.
*/
static const int BITPIX = -32;
static const int NAXIS = 2;
static const int MAXDIM = 99;
extern const unsigned long USBASE;
extern const unsigned long ULBASE;
extern char BSCALE[7];
extern char BZERO[6];
typedef enum {Read=READONLY,Write=READWRITE} RWmode;
/*! \enum ValueType
* \brief CCfits value types and their CFITSIO equivalents (in caps)
* Tnull,
* Tbit = TBIT,
* Tbyte = TBYTE,
* Tlogical = TLOGICAL,
* Tstring = TSTRING,
* Tushort = TUSHORT,
* Tshort = TSHORT,
* Tuint = TUINT,
* Tint = TINT,
* Tulong = TULONG,
* Tlong = TLONG,
* Tlonglong = TLONGLONG,
* Tfloat = TFLOAT,
* Tdouble = TDOUBLE,
* Tcomplex = TCOMPLEX,
* Tdblcomplex=TDBLCOMPLEX,
* VTbit= -TBIT,
* VTbyte=-TBYTE,
* VTlogical=-TLOGICAL,
* VTstring=-TSTRING,
* VTushort=-TUSHORT,
* VTshort=-TSHORT,
* VTuint=-TUINT,
* VTint=-TINT,
* VTulong=-TULONG,
* VTlong=-TLONG,
* VTlonglong=-TLONGLONG,
* VTfloat=-TFLOAT,
* VTdouble=-TDOUBLE,
* VTcomplex=-TCOMPLEX,
* VTdblcomplex=-TDBLCOMPLEX
*/
typedef enum {
Tnull,
Tbit = TBIT,
Tbyte = TBYTE,
Tlogical = TLOGICAL,
Tstring = TSTRING,
Tushort = TUSHORT,
Tshort = TSHORT,
Tuint = TUINT,
Tint = TINT,
Tulong = TULONG,
Tlong = TLONG,
Tlonglong = TLONGLONG,
Tfloat = TFLOAT,
Tdouble = TDOUBLE,
Tcomplex = TCOMPLEX,
Tdblcomplex = TDBLCOMPLEX,
VTbit = -TBIT,
VTbyte = -TBYTE,
VTlogical = -TLOGICAL,
VTstring = -TSTRING,
VTushort = -TUSHORT,
VTshort = -TSHORT,
VTuint = -TUINT,
VTint = -TINT,
VTulong = -TULONG,
VTlong = -TLONG,
VTlonglong = -TLONGLONG,
VTfloat = -TFLOAT,
VTdouble = -TDOUBLE,
VTcomplex = -TCOMPLEX,
VTdblcomplex= -TDBLCOMPLEX
} ValueType;
// GroupTbl isn't a real CFITSIO HDU type, but we use it when creating
// new Grouping Tables
typedef enum {AnyHdu=-1, ImageHdu, AsciiTbl, BinaryTbl, GroupTbl} HduType;
typedef enum {Inotype = 0, Ibyte=BYTE_IMG,
Ishort = SHORT_IMG,
Ilong = LONG_IMG,
Ifloat = FLOAT_IMG,
Idouble = DOUBLE_IMG,
Iushort = USHORT_IMG,
Iulong = ULONG_IMG,
Ilonglong = LONGLONG_IMG} ImageType;
typedef std::string String;
typedef std::multimap<String,CCfits::ExtHDU*> ExtMap;
/*! \var typedef std::multipmap<std::string,CCfits::Column*> ColMap
\brief Type definition for a table's column container.
*/
typedef std::multimap<std::string,CCfits::Column*> ColMap;
typedef ExtMap::const_iterator ExtMapConstIt;
typedef ExtMap::iterator ExtMapIt;
} // namespace CCfits
#endif