pro sas2 ; This program prints out a list of the Solar Aureole measurements ; in the current directory. It is to be run from the test log. cd,'', current=cdir & cd,cdir ;;cd,cdir+'/DB2/Solar' outfile=findfile(cdir+'\SA_list.out',count=nfiles) ans='' if nfiles ne 0 then begin read,'Output file exists, replace? (y or n): ',ans if ans ne 'y' then goto,exit endif close,1 openw,1,cdir+'\SA_list.out' files=findfile(cdir+'/DB2/Solar/*_Slr',count=nfiles) ;spawn,'lsf',files,/noshell ;;s=size(files) ;;nfiles=s(1) print,string(10b),'There are: ',sstr(nfiles),' files.' ;for j=0,nfiles/20 do begin printf,1,'' printf,1,'File Time Temp Exp. # SA1 SA2 SA3 SA4 Lamp' printf,1,' # (sec) (K) (ms) Col Mean Max. Mean Max. Mean Max. Mean Max.' printf,1,'' for i=0,nfiles-1 do begin ;if i eq nfiles then goto,exit d_read,files(i),h,p time=d_value(h,88) temp=d_value(h,22) exp=d_value(h,36) ncol=d_value(h,121) lamp=d_value(h,102) type=mtype(files(i)) ;check to see if data is saturated... sat='' max2=max(p) ;the maximum mean2=mean(p) ;the average if max2 ge 4095*24./fix(ncol) then sat=' *' printf,1,i,time,temp,exp,ncol,mean(p(0,*)),max(p(0,*)),mean(p(1,*)),max(p(1,*)),$ mean(p(2,*)),max(p(2,*)),mean(p(3,*)),max(p(3,*)),sat,lamp,$ format='(i4,f12.2,f8.1,i6,i6,4(f9.2,i7),a2,1x,a5)' endfor ;for i printf,1,'' printf,1,' * = Saturated Data' exit: print,"Done!" cd,cdir close,/all ;stop end