PRO PMTRAS_DBASE_DUMP, dbsolution ; ; Generates ascii display of PMTRAS database in structure, dbsolution ; Output is written to PMTRAS_DBASE_DUMP.out ; ; 5-May-2003 gh Initial version ; 16-Jul-2003 gh Added output line count to IDL log ; Display est_error, av_offset and rms_outset in milliradians instead of radians. ; 20-Jul-2003 gh Updated stars. tagnames to 'intensity' and 'rms_scatter'. ; 21-Jul-2003 gh Added column headings ; 22-Jul-03 gh Add roll_phase output. ; 23-Jul-03 gh Add roll period and boundary phase output in place of roll_phase. ; TWOPI = 2.*!DPI npt = N_ELEMENTS(dbsolution) OPENW, dumplun, 'PMTRAS_DBASE_DUMP.out', /GET_LUN PRINTF, dumplun, ' PMTRAS_DBASE_DUMP OUTPUT' PRINTF, dumplun PRINTF, dumplun, ' sctime est_error qual period boundary-phases' PRINTF, dumplun, ' HRN ndet inten scatter' PRINTF, dumplun, ' mr mr mr s rot rot' nline = 5 ; Running count of output lines ; Begin loop over output lines. FOR n=0,npt-1 DO BEGIN bndryphases = [0,0] roll_period = dbsolution[n].roll_period IF roll_period GT 0 THEN $ bndryphases = (dbsolution[n].roll_phase *1.D-6/TWOPI + [-32.D, +32.D] / roll_period + 10.D) MOD 1. PRINTF, dumplun, dbsolution[n].sctime, dbsolution[n].est_error*1000., dbsolution[n].roll_quality, $ dbsolution[n].roll_period, bndryphases, FORMAT='(I11, F8.2, 31X, I4, 3F9.6)' js = dbsolution[n].starcount FOR j=0,js-1 DO BEGIN PRINTF, dumplun, dbsolution[n].stars[j].id, $ dbsolution[n].stars[j].detections, $ dbsolution[n].stars[j].intensity, $ dbsolution[n].stars[j].av_offset*1000., $ dbsolution[n].stars[j].rms_scatter*1000., FORMAT='(I23, I3, F6.0, 2F9.2)' ENDFOR nline = nline + js + 1 ENDFOR CLOSE, dumplun PRINT, 'PMTRAS_DBASE_DUMP: Printed', nline, ' lines to PMTRAS_DBASE_DUMP.OUT' END