// This function creates an index according to the value of its input
// (sorts by Right Ascension, i-mag, h-mag,f52,f41,LHR)
// Decreasing order if sorting by RA,f52,f41,lhr, but zeros at end.
// Increasing order if sorting by i or h mag or RA
// If 2 fields have the same RA use dec.
// 
// Returns the actual lines of the ascii files in the right order
//
// Inputs:
// $sort: what to sort on
// $file: ascii file generated by mkhtml_table.pro with following format:
// format='(a5,a5,a30,a8,a8,a8,a8,a8,a8,a8,a7,a7,a2,a7,a2,a7,a2,a7,a2,a7,a2,a8,
//       a8,a8,a8,a7,a7),record1,xmmnr[i],posstr(i),f251,f521,f241,f411,f571,
//       wxoff1,wyoff1,totdw1,imag1,ic1,zmag1,zc1,rmag1,rc1,gmag1,gc1,umag1,
//       uc1,LR1,REL1,cxoff1,cyoff1,totdc1,hmag1
// This programs read RA and dec as 6 variables (hh, mm, ss.ss,sdd,mm,ss.s)
//
// Written by Suzanne Aigrain on 05-Feb-2001

(See /home/xmmssc/soft/php/srt_match_tbl.php)


Suzanne Aigrain <visitor2@ast.cam.ac.uk>
Last modified: Thu Feb 15 17:30:19 2001