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

NAME

6       funtbl - extract a table from Funtools ASCII output
7

SYNOPSIS

9       funtable [-c cols] [-h] [-n table] [-p prog] [-s sep] <iname>
10

DESCRIPTION

12       [NB: This program has been deprecated in favor of the ASCII text pro‐
13       cessing support in funtools. You can now perform fundisp on funtools
14       ASCII output files (specifying the table using bracket notation) to
15       extract tables and columns.]
16
17       The funtbl script extracts a specified table (without the header and
18       comments) from a funtools ASCII output file and writes the result to
19       the standard output.  The first non-switch argument is the ASCII input
20       file name (i.e. the saved output from funcnts, fundisp, funhist, etc.).
21       If no filename is specified, stdin is read. The -n switch specifies
22       which table (starting from 1) to extract. The default is to extract the
23       first table.  The -c switch is a space-delimited list of column numbers
24       to output, e.g.  -c "1 3 5" will extract the first three odd-numbered
25       columns. The default is to extract all columns. The -s switch specifies
26       the separator string to put between columns. The default is a single
27       space. The -h switch specifies that column names should be added in a
28       header line before the data is output. Without the switch, no header is
29       prepended.  The -p program switch allows you to specify an awk-like
30       program to run instead of the default (which is host-specific and is
31       determined at build time). The -T switch will output the data in rdb
32       format (i.e., with a 2-row header of column names and dashes, and with
33       data columns separated by tabs). The -help switch will print out a mes‐
34       sage describing program usage.
35
36       For example, consider the output from the following funcnts command:
37
38         [sh] funcnts -sr snr.ev "ann 512 512 0 9 n=3"
39         # source
40         #   data file:        /proj/rd/data/snr.ev
41         #   arcsec/pixel:     8
42         # background
43         #   constant value:   0.000000
44         # column units
45         #   area:             arcsec**2
46         #   surf_bri:         cnts/arcsec**2
47         #   surf_err:         cnts/arcsec**2
48
49         # summed background-subtracted results
50         upto   net_counts     error   background    berror      area  surf_bri  surf_err
51         ---- ------------ --------- ------------ --------- --------- --------- ---------
52            1      147.000    12.124        0.000     0.000   1600.00     0.092     0.008
53            2      625.000    25.000        0.000     0.000   6976.00     0.090     0.004
54            3     1442.000    37.974        0.000     0.000  15936.00     0.090     0.002
55
56         # background-subtracted results
57          reg   net_counts     error   background    berror      area  surf_bri  surf_err
58         ---- ------------ --------- ------------ --------- --------- --------- ---------
59            1      147.000    12.124        0.000     0.000   1600.00     0.092     0.008
60            2      478.000    21.863        0.000     0.000   5376.00     0.089     0.004
61            3      817.000    28.583        0.000     0.000   8960.00     0.091     0.003
62
63         # the following source and background components were used:
64         source_region(s)
65         ----------------
66         ann 512 512 0 9 n=3
67
68          reg       counts    pixels      sumcnts    sumpix
69         ---- ------------ --------- ------------ ---------
70            1      147.000        25      147.000        25
71            2      478.000        84      625.000       109
72            3      817.000       140     1442.000       249
73
74       There are four tables in this output. To extract the last one, you can
75       execute:
76
77         [sh] funcnts -s snr.ev "ann 512 512 0 9 n=3" ⎪ funtbl -n 4
78         1 147.000 25 147.000 25
79         2 478.000 84 625.000 109
80         3 817.000 140 1442.000 249
81
82       Note that the output has been re-formatted so that only a single space
83       separates each column, with no extraneous header or comment informa‐
84       tion.
85
86       To extract only columns 1,2, and 4 from the last example (but with a
87       header prepended and tabs between columns), you can execute:
88
89         [sh] funcnts -s snr.ev "ann 512 512 0 9 n=3" ⎪ funtbl -c "1 2 4" -h -n 4 -s "\t"
90         #reg    counts  sumcnts
91         1       147.000 147.000
92         2       478.000 625.000
93         3       817.000 1442.000
94
95       Of course, if the output has previously been saved in a file named
96       foo.out, the same result can be obtained by executing:
97
98         [sh] funtbl -c "1 2 4" -h -n 4 -s "\t" foo.out
99         #reg    counts  sumcnts
100         1       147.000 147.000
101         2       478.000 625.000
102         3       817.000 1442.000
103

SEE ALSO

105       See funtools(n) for a list of Funtools help pages
106
107
108
109version 1.4.0                   August 15, 2007                      funtbl(1)
Impressum