;+ ; This procedure lists a summary of the input dataset. ; ; @examples ;
; filein,'myfile.fits' ; summary ;; ; @version $Id: summary.pro,v 1.10 2005/05/29 21:46:29 bgarwood Exp $ ;- pro summary compile_opt idl2 if file_test(!g.lineio->get_index_file_name(/full)) ne 1 then begin message, 'There is a problem with the index file', /info return endif ; can we use more if !g.interactive then begin openw, out, '/dev/tty', /get_lun, /more endif else begin ; just write to stdout out = -1 endelse printf,out,' Scan Source Vel Proc Sub RestF nIF nInt nFd Az El' printf,out,'-------------------------------------------------------------------------------' scans = !g.lineio->get_index_values("SCAN") indx = lonarr(n_elements(scans)) count = 0 oldscan = -1 for i=0,n_elements(scans)-1 do begin scan = scans[i] if scan ne oldscan then begin indx[count] = i count += 1 oldscan = scan endif endfor if (count eq 0) then return indx = indx[0:(count-1)] az = !g.lineio->get_index_values("AZIMUTH",index=indx) el = !g.lineio->get_index_values("ELEVATION",index=indx) source = !g.lineio->get_index_values("SOURCE",index=indx) proc = !g.lineio->get_index_values("PROCEDURE",index=indx) sub = !g.lineio->get_index_values("SUBSCAN",index=indx) vel = !g.lineio->get_index_values("VELOCITY",index=indx) restf = !g.lineio->get_index_values("RESTFREQ",index=indx) for i=0,(count-1) do begin scan = scans[indx[i]] scaninfo = scan_info(scan) printf,out,scan,source[i],vel[i]/1e3,proc[i],sub[i],restf[i]/1e9,scaninfo.n_ifs, $ scaninfo.n_integrations, scaninfo.n_feeds, az[i], el[i], $ format='(i6,1x,a16,1x,f8.1,1x,a7,2x,i2,2x,f6.3,1x,i3,1x,i4,1x,i3,2x,f5.1,2x,f5.1)' endfor if out ne -1 then free_lun, out end