funtbl(1)
β¨ NAME β¨
funtbl β bestie, this little icon extracts a table out of your Funtools ASCII output π
π¦ SYNOPSIS π¦
funtable [-c cols] [-h] [-n table] [-p prog] [-s sep] <iname>
πΈ DESCRIPTION πΈ
okay so first things first, bestie: this program has been DEPRECATED π It got retired in favor of the ASCII text processing support that lives in funtools now. The glow-up version: you can just dofundispon funtools ASCII output files (and specify the table using bracket notation) to pull out tables and columns. No cap. So yeah,funtblis giving legacy energy, but we still love her.
The funtbl script extracts a specified table (and btw, it comes without the header and comments, so don't come for her) from a funtools ASCII output file and writes the result straight to standard output. Slay.
π«Ά the args, one by one
- The first non-switch argument is the ASCII input file name β i.e. the saved output from
funcnts,fundisp,funhist, etc. - If no filename is specified at all? She reads
stdin. Simple as that. β¨
π the switches
-nβ picks which table to extract, and heads up, tables are numbered starting from 1. The default is to extract the first table.-cβ a space-delimited list of column numbers to output. So like,-c "1 3 5"will extract the first three odd-numbered columns. The default is to extract all columns.-sβ the separator string that gets put between columns. The default is a single space.-hβ says "yes please add column names as a header line before the data gets output". Without this switch, no header is prepended. That's it, that's the whole vibe check.-pβ the program switch, lets you hand her an awk-like program to run instead of the default. And what's the default, you ask? It's host-specific and determined at build time. iykyk. π§-Tβ outputs the data in rdb format, meaning a 2-row header of column names and dashes, with data columns separated by tabs. Iconic formatting choice honestly.-helpβ prints out a message describing program usage. Very demure, very mindful. π
π example time (this is the fun part)
Say you've got the output from this funcnts command:
[sh] funcnts -sr snr.ev "ann 512 512 0 9 n=3"
# source
# data file: /proj/rd/data/snr.ev
# arcsec/pixel: 8
# background
# constant value: 0.000000
# column units
# area: arcsec**2
# surf_bri: cnts/arcsec**2
# surf_err: cnts/arcsec**2
# summed background-subtracted results
upto net_counts error background berror area surf_bri surf_err
---- ------------ --------- ------------ --------- --------- --------- ---------
1 147.000 12.124 0.000 0.000 1600.00 0.092 0.008
2 625.000 25.000 0.000 0.000 6976.00 0.090 0.004
3 1442.000 37.974 0.000 0.000 15936.00 0.090 0.002
# background-subtracted results
reg net_counts error background berror area surf_bri surf_err
---- ------------ --------- ------------ --------- --------- --------- ---------
1 147.000 12.124 0.000 0.000 1600.00 0.092 0.008
2 478.000 21.863 0.000 0.000 5376.00 0.089 0.004
3 817.000 28.583 0.000 0.000 8960.00 0.091 0.003
# the following source and background components were used:
source_region(s)
----------------
ann 512 512 0 9 n=3
reg counts pixels sumcnts sumpix
---- ------------ --------- ------------ ---------
1 147.000 25 147.000 25
2 478.000 84 625.000 109
3 817.000 140 1442.000 249
So there are four tables in this output. To extract the last one, you can execute:
[sh] funcnts -s snr.ev "ann 512 512 0 9 n=3" βͺ funtbl -n 4
1 147.000 25 147.000 25
2 478.000 84 625.000 109
3 817.000 140 1442.000 249
And notice how the output got re-formatted so that only a single space separates each column, with no extraneous header or comment information? Yeah. That's the whole point. Clean. Minimal. Main character energy. β¨
Now say you want only columns 1, 2, and 4 from that last example β but with a header prepended and tabs between the columns. You'd run:
[sh] funcnts -s snr.ev "ann 512 512 0 9 n=3" βͺ funtbl -c "1 2 4" -h -n 4 -s "\t"
#reg counts sumcnts
1 147.000 147.000
2 478.000 625.000
3 817.000 1442.000
And of course, if that output was already saved into a file named foo.out, you get the exact same result by executing:
[sh] funtbl -c "1 2 4" -h -n 4 -s "\t" foo.out
#reg counts sumcnts
1 147.000 147.000
2 478.000 625.000
3 817.000 1442.000
Literally the same glow-up, just from a file instead of a pipe. π
π SEE ALSO π
See funtools(7) for a list of Funtools help pages β go read the whole family of them, bestie, they're all right there. π
k bye ily, this was funtbl(1) from the SAORD Documentation, version 1.4.5, dated April 14, 2011 π stay deprecated and stay gorgeous π
π¦ where this page comes from
- debian bookworm: funtools 1.4.8-1 Β· GPL
- debian trixie: funtools 1.4.8-1.1+b2 Β· GPL
- ubuntu jammy: funtools 1.4.8-1 Β· GPL
- ubuntu noble: funtools 1.4.8-1.1build2 Β· GPL
- ubuntu questing: funtools 1.4.8-2
- ubuntu resolute: funtools 1.4.8-2build1 Β· GPL
- ubuntu stonking: funtools 1.4.8-2build1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms