A high level routine that selects rows in a table file on the basis of an input "mask" file. If a line has been flagged as a "Y" line in the mask file, then it is written to a new output table file.
% get_table_rows --help
Usage: get_table_rows A1 mask.file B1 N
arg1 = basename of the table file (e.g. A1 for A1.table)
arg2 = name of mask file that flags rows to get
arg3 = basename of output file (e.g. B1 for B1.table)
arg4 = run in debug/verbose mode (Y/N)
EXAMPLE:
% cat ZPCLEAN.parlab
ZPSEC ZP for 1-sec exptime
MeanSky Mean sky in adu
Fpeak Flux peak (including bkg)
g g magnitude from PABSTARRS
r r magnitude from PABSTARRS
% cat ZPCLEAN.table
# data
-2.648 75.896 13957.640 14.086 12.375
-2.702 65.875 5290.610 15.133 14.428
-2.699 73.421 4204.510 15.355 14.401
-2.735 66.440 2212.590 16.016 15.040
% cat s.1
Y
N
Y
N
% get_table_rows ZPCLEAN s.1 BBB N
% cat BBB.parlab
ZPSEC ZP for 1-sec exptime
MeanSky Mean sky in adu
Fpeak Flux peak (including bkg)
g g magnitude from PABSTARRS
r r magnitude from PABSTARRS
% cat BBB.table
# data
-2.648 75.896 13957.640 14.086 12.375
-2.699 73.421 4204.510 15.355 14.401
NOTE: The proper lines (1 and 3) are written to the new BBB table file.