1funcolumnlookup(3)            SAORD Documentation           funcolumnlookup(3)
2
3
4

NAME

6       FunColumnLookup - lookup a Funtools column
7

SYNOPSIS

9         #include <funtools.h>
10
11         int FunColumnLookup(Fun fun, char *s, int which,
12                             char **name, int *type, int *mode,
13                             int *offset, int *n, int *width)
14

DESCRIPTION

16       The FunColumnLookup() routine returns information about a named (or
17       indexed) column.  The first argument is the Fun handle associated with
18       this set of columns. The second argument is the name of the column to
19       look up.  If the name argument is NULL, the argument that follows is
20       the zero-based index into the column array of the column for which
21       information should be returned.  The next argument is a pointer to a
22       char *, which will contain the name of the column. The arguments that
23       follow are the addresses of int values into which the following infor‐
24       mation will be returned:
25
26       ·   type: data type of column:
27
28           ·   A: ASCII characters
29
30           ·   B: unsigned 8-bit char
31
32           ·   I: signed 16-bit int
33
34           ·   U: unsigned 16-bit int (not standard FITS)
35
36           ·   J: signed 32-bit int
37
38           ·   V: unsigned 32-bit int (not standard FITS)
39
40           ·   E: 32-bit float
41
42           ·   D: 64-bit float
43
44       ·   mode: bit flag status of column, including:
45
46           ·   COL_ACTIVE      1 is column activated?
47
48           ·   COL_IBUF        2 is column in the raw input data?
49
50           ·   COL_PTR         4 is column a pointer to an array?
51
52           ·   COL_READ      010 is read mode selected?
53
54           ·   COL_WRITE     020 is write mode selected?
55
56           ·   COL_REPLACEME 040 is this column being replaced by user data?
57
58       ·   offset: byte offset in struct
59
60       ·   n: number of elements (i.e. size of vector) in this column
61
62       ·   width: size in bytes of this column
63
64       If the named column exists, the routine returns a positive integer,
65       otherwise zero is returned. (The positive integer is the index+1 into
66       the column array where this column was located.)
67
68       If NULL is passed as the return address of one (or more) of these val‐
69       ues, no data is passed back for that information.  For example:
70
71         if( !FunColumnLookup(fun, "phas", 0, NULL NULL, NULL, NULL, &npha, NULL) )
72           gerror(stderr, "can't find phas column\n");
73
74       only returns information about the size of the phas vector.
75

SEE ALSO

77       See funtools(n) for a list of Funtools help pages
78
79
80
81version 1.4.0                   August 15, 2007             funcolumnlookup(3)
Impressum