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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
=pod
=head1 NAME
B<FunColumnLookup - lookup a Funtools column>
=head1 SYNOPSIS
#include <funtools.h>
int FunColumnLookup(Fun fun, char *s, int which,
char **name, int *type, int *mode,
int *offset, int *n, int *width)
=head1 DESCRIPTION
The B<FunColumnLookup()> routine returns information about a named
(or indexed) column. The first argument is the Fun handle associated
with this set of columns. The second argument is the name of the
column to look up. If the name argument is NULL, the argument that
follows is the zero-based index into the column array of the column
for which information should be returned. The next argument is a
pointer to a char *, which will contain the name of the column. The
arguments that follow are the addresses of int values into which
the following information will be returned:
=over 4
=item *
B<type>: data type of column:
=over 4
=item *
A: ASCII characters
=item *
B: unsigned 8-bit char
=item *
I: signed 16-bit int
=item *
U: unsigned 16-bit int (not standard FITS)
=item *
J: signed 32-bit int
=item *
V: unsigned 32-bit int (not standard FITS)
=item *
E: 32-bit float
=item *
D: 64-bit float
=back
=item *
B<mode>: bit flag status of column, including:
=over 4
=item *
COL_ACTIVE 1 is column activated?
=item *
COL_IBUF 2 is column in the raw input data?
=item *
COL_PTR 4 is column a pointer to an array?
=item *
COL_READ 010 is read mode selected?
=item *
COL_WRITE 020 is write mode selected?
=item *
COL_REPLACEME 040 is this column being replaced by user data?
=back
=item *
B<offset>: byte offset in struct
=item *
B<n>: number of elements (i.e. size of vector) in this column
=item *
B<width>: size in bytes of this column
=back
If the named column exists, the routine returns a positive integer,
otherwise zero is returned. (The positive integer is the index+1 into
the column array where this column was located.)
If NULL is passed as the return address of one (or more) of these
values, no data is passed back for that information. For
example:
if( !FunColumnLookup(fun, "phas", 0, NULL NULL, NULL, NULL, &npha, NULL) )
gerror(stderr, "can't find phas column\n");
only returns information about the size of the phas vector.
=head1 SEE ALSO
See funtools(n) for a list of Funtools help pages
=cut
|