pro irs,first ; This program prints out a list of the ir spectrometer measurements ; in the current directory. It is to be run from the test log. ; 'first' is the number of the first IR to read (default = 0) if n_params() eq 0 then first = 0 ;i.e. begin with first IR in Log cd,'', current=cdir & cd,cdir cd,cdir+'/DB2/Ir' files=findfile('*',count=nfiles) ;spawn,'lsf',files,/noshell s=size(files) nfiles=s(1) print,string(10b),'There are ',sstr(nfiles),' IR files in this Log.' print,' * = Possibly Saturated Data, min(measurement) < 15000 dn' print,'' print,' IR # Time (min) Temp (K) Type Ave. Max. Exp. Collect' print,'' n=0 ;bail-out counter for i=first,nfiles-1 do begin d_irread,files(i),h,p,g siz=size(p) seq=d_value(h,87) time=d_value(h,88) temp=d_value(h,105) collect=d_value(h,108) g1=g.(1) ;Sample-time from structure g exp=g1(5)*8.064 ;exp=d_value(h,36) sat='' type=mtype(files(i)) typ='Unknown' if type eq 8 then typ='DLIS' if type eq 9 then typ='ULIS' if type eq 10 then typ='Comb' if type eq 11 then typ='Long' ;for descent ir's... if siz(2) eq 24 then begin r=p(*,8:15)-p(*,0:7) ;DLIS Closed-Open aved=intarr(8) for j=0,7 do aved(j)=mean(r(9:140,j)) if min(p(9:140,*)) le 15000 then sat=' *' else sat='' for j=0,7 do print,seq,time/60,temp,typ,j,aved(j),max(j),exp,sat,collect, $ format='(i6,f12.4,f11.2,4x,a,i2,T45,f8.2,i8,f11.1,a2,f7.3)' r=p(*,20:23)-p(*,16:19) ;ULIS Closed-Open aveu=intarr(4) for j=0,3 do aveu(j)=mean(r(9:140,j)) if min(p(9:140,*)) le 15000 then sat=' *' else sat='' for j=0,3 do print,seq,time/60,temp,typ,j,aveu(j),max(j),exp,sat,collect, $ format='(i6,f12.4,f11.2,4x,a,i2,T45,f8.2,i8,f11.1,a2,f7.3)' goto,next_file endif ;for simple ulis or dlis files r=p(*,1)-p(*,0) ;Shutter Closed-Open. if min(p(9:140,0)) le 15000 then sat=' *' else sat='' if type eq 10 then typ2=typ+' dn' else typ2=typ print,seq,time/60,temp,typ2,mean(r(9:140,*)),max(r(9:140,*)),exp,sat,collect, $ format='(i6,f12.4,f11.2,4x,a,T45,f8.2,i8,f11.1,a2,f7.3)' ;for ircomb files... if siz(2) eq 4 then begin if min(p(9:140,2)) le 15000 then sat=' *' else sat='' r=p(*,3)-p(*,2) ;Upward looking data for Combined reads if type eq 10 then typ2=typ+' up' print,seq,time/60,temp,typ2,mean(r(9:140,*)),max(r(9:140,*)),exp,sat,collect, $ format='(i6,f12.4,f11.2,4x,a,T45,f8.2,i8,f11.1,a2,f7.3)' endif next_file: n=n+1 if n eq 20 then begin ;every 20 files you get a chance to quit n=0 ans='' read,"Do you wish to continue? (return to continue or 'n' to quit): ",ans if ans eq 'n' or ans eq 'q' then goto,exit print,'' print,' IR # Time (min) Temp (K) Type Ave. Max. Exp. Collect' print,'' endif endfor exit: print,'' print,' * = Possibly Saturated Data, min(measurement) < 15000 dn' cd,cdir ;stop end