1funhead(1) SAORD Documentation funhead(1)
2
3
4
6 funhead - display a header in a Funtools file
7
9 funhead [-a] [-s] [-t] [-L] <iname> [oname ename]
10
12 -a # display all extension headers
13 -s # display 79 chars instead of 80 before the new-line
14 -t # prepend data type char to each line of output
15 -L # output in rdb/starbase list format
16
18 funhead displays the FITS header parameters in the specified FITS
19 Extension.
20
21 The first argument to the program specifies the Funtools input file to
22 display. If "stdin" is specified, data are read from the standard
23 input. Funtools Bracket Notation is used to specify particular FITS
24 extension to process. Normally, the full 80 characters of each header
25 card is output, followed by a new-line.
26
27 If the -a switch is specified, the header from each FITS extensions in
28 the file is displayed. Note, however, that the -a switch does not work
29 with FITS files input via stdin. We hope to remove this restriction in
30 a future release.
31
32 If the -s switch is specified, only 79 characters are output before the
33 new-line. This helps the display on 80 character terminals.
34
35 If the -t switch is specified, the data type of the parameter is output
36 as a one character prefix, followed by 77 characters of the param. The
37 parameter data types are defined as: FUN_PAR_UNKNOWN ('u'),
38 FUN_PAR_COMMENT ('c'), FUN_PAR_LOGICAL ('l'), FUN_PAR_INTEGER ('i'),
39 FUN_PAR_STRING ('s'), FUN_PAR_REAL ('r'), FUN_PAR_COMPLEX ('x').
40
41 If the -L (rdb table) switch is used, the output will conform to star‐
42 base/rdb data base list format.
43
44 For example to display the EVENTS extension (binary table):
45
46 [sh] funhead "foo.fits[EVENTS]"
47 XTENSION= 'BINTABLE' / FITS 3D BINARY TABLE
48 BITPIX = 8 / Binary data
49 NAXIS = 2 / Table is a matrix
50 NAXIS1 = 20 / Width of table in bytes
51 NAXIS2 = 30760 / Number of entries in table
52 PCOUNT = 0 / Random parameter count
53 GCOUNT = 1 / Group count
54 TFIELDS = 7 / Number of fields in each row
55 EXTNAME = 'EVENTS ' / Table name
56 EXTVER = 1 / Version number of table
57 TFORM1 = '1I ' / Data type for field
58 TTYPE1 = 'X ' / Label for field
59 TUNIT1 = ' ' / Physical units for field
60 TFORM2 = '1I ' / Data type for field
61 etc. ...
62 END
63
64 To display the third header:
65
66 [sh] funhead "foo.fits[3]"
67 XTENSION= 'BINTABLE' / FITS 3D BINARY TABLE
68 BITPIX = 8 / Binary data
69 NAXIS = 2 / Table is a matrix
70 NAXIS1 = 32 / Width of table in bytes
71 NAXIS2 = 40 / Number of entries in table
72 PCOUNT = 0 / Random parameter count
73 GCOUNT = 1 / Group count
74 TFIELDS = 7 / Number of fields in each row
75 EXTNAME = 'TGR ' / Table name
76 EXTVER = 1 / Version number of table
77 TFORM1 = '1D ' / Data type for field
78 etc. ...
79 END
80
81 To display the primary header (i.e., extension 0):
82
83 sh> funhead "coma.fits[0]"
84 SIMPLE = T /STANDARD FITS FORMAT
85 BITPIX = 16 /2-BYTE TWOS-COMPL INTEGER
86 NAXIS = 2 /NUMBER OF AXES
87 NAXIS1 = 800 /
88 NAXIS2 = 800 /
89 DATATYPE= 'INTEGER*2' /SHORT INTEGER
90 END
91
92 The funhead program also can edit (i.e. add, delete, or modify) or dis‐
93 play individual headers parameters. Edit mode is signalled by the pres‐
94 ence of two additional command-line arguments: output file and edit
95 command file, in that order. Edit mode acts as a filter: the output
96 file will contain the entire input FITS file, including other exten‐
97 sions. The edit command file can be "stdin", in which case edit command
98 are read from the standard input.
99
100 The edit command file contains parameter comments (having '#' in the
101 first column) and delete and assignment(modify or add) operations. A
102 delete operation is specified by preceding the parameter name with a
103 minus sign "-". A display operation (very useful in interactive ses‐
104 sions, i.e., where the edit commands are taken from stdin) is specified
105 by preceding the parameter name with a question mark "?". In either
106 case, a parameter value need not be specified. An assignment operation
107 is specified in the same two ways that a parameter is specified in a
108 text header (but without the comment character that precedes header
109 params), i.e.:
110
111 · FITS-style comments have an equal sign "=" between the keyword and
112 value and an optional slash "/" to signify a comment. The strict
113 FITS rules on column positions are not enforced.
114
115 · Free-form comments can have an optional colon separator between the
116 keyword and value. In the absence of quote, all tokens after the
117 keyword are part of the value, i.e. no comment is allowed.
118
119 For example, the following interactive session checks for the existence
120 of parameters, adds new parameters, modifies them, and modifies and
121 deletes existing parameters:
122
123 sh$ ./funhead snr.ev foo.fits -
124 # look for FOO1
125 ? FOO1
126 WARNING: FOO1 not found
127 # add new foo1
128 FOO1 = 100
129 # add foo2
130 FOO2 = 200
131 # reset foo1 to a different value
132 FOO1 -1
133 # delete foo2
134 -FOO2
135 # change existing value
136 EXTVER 2
137 ? XS-SORT
138 XS-SORT = 'EOF ' / type of event sort
139 # delete existing value
140 -XS-SORT
141 # exit
142 ^D
143
144 See Column-based Text Files for more information about header parameter
145 format.
146
148 See funtools(n) for a list of Funtools help pages
149
150
151
152version 1.4.0 August 15, 2007 funhead(1)