| thselect | ttools | thselect |
thselect -- Print table keyword values.
thselect table keywords expr
This task was based on hselect, and it behaves in a very similar manner, except that it works on tables rather than images.
Keyword values will be printed to the standard output, one line per input table, with the values separated by tabs. String values that contain whitespace will be enclosed in quotes.
For each input table, the values of these keywords in the current input table will be printed, if expr is a true expression for the current table. Any keyword that is not found will be silently ignored.
Wildcards are supported; however, the "@filename" syntax is not supported.
The expression may include constants and/or keyword names.
1. Compare thselect with thedit for displaying a single keyword value.
tt> thselect timetag.fits[events,7] rootname yes
O57P03030
tt> thedit timetag.fits[events,7] rootname .
timetag.fits[events,7],ROOTNAME = O57P03030 / rootname of the obser
vation set
2. Compare i_file with i_table for a FITS table ($I and i_table are equivalent).
tt> thselect timetag.fits[events,7] i_file,i_table yes
timetag.fits timetag.fits[EVENTS,7]
3. Find all FITS files with DETECTOR = CCD in the primary header. Since the primary header of a FITS file can be opened either as an image or as a table, either hselect or thselect could be used for this example.
tt> thselect *.fits[0] $I "detector == 'CCD'"
h1v11148o_1dx.fits[0]
h4s13500o_1dx.fits[0]
i1c1615po_1dx.fits[0]
This task was written by Phil Hodge, based on hselect.