AIPS HELP file for TAMRG in 31DEC18
As of Tue Jun 19 10:02:04 2018
TAMRG: Task to merge table rows under specified conditions
INNAME Main input file (name).
INCLASS Main input file (class).
INSEQ 0.0 9999.0 Main input file (seq. #).
0 => high
INDISK Disk unit #. 0 => any
INEXT Input table extension type
INVERS Input table file version no.
OUTVERS Output table file version.
APARM Initial sort: Keys & weights
1,2=> col. & wt pri. key 1.
3,4=> col. & wt sec. key 1.
5,6=> col. & wt pri. key 2.
7,8=> col. & wt sec. key 2.
APARM(1) = 0 => no sort.
BPARM Columns which must be equal
to merge two rows.
CPARM 0.0 Allowed error in the equality
test by column.
DPARM Columns to sum. 0 => none.
BADDISK Disks to avoid for scratch
Use: TAMRG sorts the contents of a given AIPS table extension
file to bring all rows with the "same" control values
together. It then sums some of the columns and resorts
the file into the original sort order. The user
specifies all of these operations via the adverbs. He
should use PRTAB first to make sure he knows the column
numbers associated with each of the parameters.
INNAME......Main file name (name). Standard defaults.
INCLASS.....Main file name (class). Standard defaults.
INSEQ.......Main file name (seq. #) 0 => highest.
INDISK......Disk drive # of image. 0 => any.
INEXT.......Input extension file type ' ' => 'TA'
INVERS......Input extension file version # 0 => highest.
OUTVERS.....Output extension file version # 0 => highest+1.
APARM.......Table columns and factors for the initial sort:
APARM(1) = 0 means no initial sort. The numerical
values on which the sort is performed, the "keys",
are computed using APARM to specify which column
values are used and how these values are scaled.
The first (more slowly varying) key is:
KEY_VALUE1 = COL_VALUE(APARM(1)) * APARM(2) +
COL_VALUE(APARM(3)) * APARM(4)
The faster changing key value is:
KEY_VALUE2 = COL_VALUE(APARM(5)) * APARM(6) +
COL_VALUE(APARM(7)) * APARM(8)
In the case of bit or character strings, only one
column is used to generate the key values. In
this case, APARM(2) is the first character and
APARM(4) is the number of characters to use for
the first key; APARM(6) is the first character
and APARM(8) is the number of characters to use
for the second key.
Sorting is normally in ascending order of the
keys, for decending order use a negative factor
for the relevant key. Factors of 0 => 1.0. To
sort using the ABSOLUTE value of the column, set
the column number to negative.
For a single key sort use APARM(5)=0. To use
a single column as the sort key set APARM(3)=0
and/or APARM(7)=0 as appropriate.
Example: sort by col. 1 (slowest varying) and
col. 6 (fastest) in decending order:
APARM = 1,1,0,0, 6,-1,0,0
To sort by ascending absolute value col. 2 and,
secondarily, by descending value of col. 1:
APARM = -2, 1.0, 0, 0, 1, -1., 0, 0
BPARM.......List of columns for which the values in two rows
must be "equal" in order for the two rows to be
merged. A value of 0.0 terminates the list and
there must be at least 1 column in the list.
CPARM.......For numeric columns, the tolerance allowed to
regard the column values as equal. CPARM(j)
applies to column BPARM(j). Character- and bit-
string columns and logical columns are required to
be exactly equal if they appear in the BPARM list.
DPARM.......Columns to be summed when two rows are merged. A
value of 0.0 terminates the list and the list may
be empty. When two rows are merged, the values
in the first row are taken except for the columns
listed in DPARM, which are summed.
CC file example: column 1 is flux, column 2 is
DeltaX, and column 3 is DeltaY. Columns 4-7
apply to extended source models. CCMRG then is
equivalent to TAMRG with values:
APARM = 2,-1, 0,0, 3,1, 0,0
BPARM = 2, 3, 4, 5, 6, 7, 0
CPARM = d1, d2, d0, d0, 1., 0.
DPARM = 1, 0
where dn = abs(axis incr) / 20.
BADDISK.....Disk drive numbers to avoid for scratch files.