flookup -- Create a new FITS file from selection based on a lookup table
flookup infile[ext#] outfile lookup
This task creates a new table based on the criteria specified in a lookup table. Based on the value of each row's element in the column specified by the tcolumn parameter, the upper and lower bounds of acceptable value of "column" are found in the lookup table. Depending on the value of the "bounds" parameter, all rows with values satisfying the requested condition are copied to the output file. Single value lookups are specified by setting the ubcol parameter equal to a blank or a '-'.
The bounds parameter is used to describe the condition between the upper and lower bounds in the lookup table, and the condition column in the input file. In this parameter a parenthesis specifies that the value of the bound in NOT included in the condition, and a square bracket means that the value IS included. Further, the direction of the parenthesis or bracket indicates the position of the table condition column value with respect to the lower or upper bound column value. This is best described with examples:
condition bounds
lbcol < column < ubcol ()
column < lbcol or column > ubcol )(
lbcol <= column <= ubcol []
column < lbcol or column >= ubcol )[
lbcol < column (
column <= lbcol ]
lbcol = column []
lbcol <> column )(
This program is currently optimized for lookup table keys that are one value apart (i.e. 1,2,3) and 1024 elements or less.
Rows containing null values in either the key column or the comparison column are never copied to the output file. BUGS
fselect