[WCSTools Utility Programs]

gettab Examples

1. Print Usage Instructions

Print basic instructions for use of this program by typing only the program name.
$ gettab
GETTAB 2.6, 22 January 1999, Doug Mink, SAO
Print FITS or IRAF header keyword values
usage: gethead [-ahtv][-n num] file1.tab ... filen.tab kw1 kw2 ... kwn
       gethead [-ahptv][-n num] @filelist kw1 kw2 ... kwn
       gethead [-ahptv][-n num] 

2. Verbose Mode

Print the X and Y columns from a tab table in verbose mode.
$ gettab -v test.tab X Y fiber\<5
GETTAB 2.6, 22 January 1999, Doug Mink, SAO
Print table Values from tab table file hectobj.tab
X = 1523
Y = 1024
X = 970
Y = 1073
X = 1024
Y = 1020
X = 1543
Y = 1701
$

3. Default Output Format

Print the X and Y columns from a tab table.
$ gettab test.tab X Y fiber\<5
1523 1024
970 1073
1024 1020
1543 1701
$

4. Tab Table Output

Print the fiber, X, and Y columns from a tab table.
$ gettab -t test.tab fiber X Y fiber\<5
fiber   X       Y
-----   -       -
1       1523    1024
2       970     1073
3       1024    1020
4       1543    1701
$

5. Tab Table Output with Different Column Names

Print the fiber, X, and Y columns from a tab table, but call them FIBER, FIBER_X and FIBER_Y.
$ gettab -t test.tab fiber@FIBER X@FIBER_X Y@FIBER_Y fiber\<5
FIBER   FIBER_X FIBER_Y
-----   ------- -------
1       1523    1024
2       970     1073
3       1024    1020
4       1543    1701
$

6. Single Line Output with Different Column Names

Print the fiber, X and Y columns for a single line in tab table, calling them FIBER, FIBER_X, and FIBER_Y. Print them as assignment statements which can be used as input by sethead.
$ gettab -e test.tab fiber@FIBER X@FIBER_X Y@FIBER_Y fiber=4
FIBER=4 FIBER_X=1543 FIBER_Y=1701
$

Last updated 03 August 2018 by Jessica Mink

Telescope Data Center