Institut für Astronomie und AstrophysikAbteilung AstronomieWaldhäuser Str. 64, D-72076 Tübingen, Germany |
DBSORT
Routine to sort list of entries in data base
result = dbsort( list, items , [ REVERSE = ])
list - list of entry numbers to sort -1 to sort all entries items - list of items to sort (up to 9 items)
result - numeric vector giving input list sorted by items
REVERSE - scalar or vector with the same number of elements as the the number of items to sort. If the corresponding element of REVERSE is non-zero then that item is sorted in descending rather than ascending order.
Sort an astronomical catalog with RA as primary sort, and declination as secondary sort (used when RA values are equal) IDL> NEWLIST = DBSORT( -1, 'RA,DEC' ) If for some reason, one wanted the DEC sorted in descending order, but the RA in ascending order IDL> NEWLIST = DBSORT( -1, 'RA,DEC', REV = [ 0, 1 ] )
The list is sorted such that each item is sorted into asscending order starting with the last item.
DBCOM
ZPARCHECK, BSORT, DB_ITEM
VERSION 1 D. Lindler Oct. 86 Added REVERSE keyword W. Landsman August, 1991 Converted to IDL V5.0 W. Landsman September 1997
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]