| tbsort | noao.digiphot.ptools | tbsort |
tbsort -- sort an APPHOT/DAOPHOT STSDAS table database on one or more columns
tbsort table columns
TBSORT sorts an APPHOT/DAOPHOT STDAS table database. TBSORT operates in place so a copy of the unsorted table must be made with the TABLES package TCOPY task in order to preserve the original table. The column or columns to sort on are specified by the parameter columns , which is a list of column names or column name patterns separated by commas. The most significant column name is the first in the list. Subsequent columns are used to break ties. There are two flags, ascend and casesens . If ascend is yes, the first row in the output table holds the smallest value if the sorted column is numeric or the first string in alpahabetic order if the sorted column is a character string. If casesens is yes, upper case characters precede lower case characters in sort order. Otherwise, case is not significant in determining the sort order. No precedes yes when sorting a boolean column in ascending order. Null table elements always are last in the sort, regardless of whether ascend is yes or no.
TBSORT is identical to the TABLES package sort with the exception that it has its own copy of the default parameter set so that users can modify the parameters independently of the TBSORT task in TABLES.
1. Sort the output of the DAOPHOT ALLSTAR task in increasing order of magnitude.
pt> tbsort m92.al.1 MAG
2. Sort the output of the DAOPHOT task NSTAR in increasing order of the y position.
pt> tbsort m92.nst.1 YCENTER
ptools.txsort,ptools.psort,tables.tbsort