pro darks2 ; This program prints out a list of the Dark Dataset measurements ; in the current directory. It is to be run from the test log. Outfile='Darks.out' close,2 openw,2,outfile cd,'', current=cdir & cd,cdir DB="DB" ;cd,cdir+'\'+DB+'\Dark' printf,2,cdir files=findfile(cdir+'\'+DB+'\Dark\*_Drk',count=nfiles) ;files=t_getfil('*.*') & siz=size(files) & nfiles=siz(1) ;for lots of files if nfiles eq 0 then print,'*** No Files Found in*** in ', DB ;;spawn,'lsf',files,/noshell ;;s=size(files) ;;nfiles=s(1) print,string(10b),'There are: ',sstr(nfiles),' files.' printf,2,string(10b),'There are: ',sstr(nfiles),' files.',string(10b) printf,2,'' printf,2,'File Set Time Temp Exp. # Cols 7 & 8 Cols 9 & 10 Lamp Nul2 Nul3 O+SR Dark' printf,2,' # # (sec) (K) (ms) Col Mean Max. Mean Max. (DN) (DN) (DN) (DN)' printf,2,'' for i=0,nfiles-1 do begin if i eq nfiles then goto,exit d_read,files(i),h,p set=d_value(h,87) 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) nul2=d_value(h,122) nul3=d_value(h,123) osr=((nul2/4.+0.125)+(nul3/4.+0.125))/2. if ncol eq 4 then begin & p(0,*)=p(0,*)+p(1,*) & p(1,*)=p(2,*)+p(3,*) & endif ;un-summed data Ave1=mean(p(0,*)) ;average of the sum of covered columns 7 & 8 Ave2=mean(p(1,*)) ;average of the sum of covered columns 9 & 10 Dark=((mean([Ave1,Ave2])/2)-(osr));/(exp/1000.) 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 8190 then sat=' *' printf,2,i,set,time,temp,exp,ncol,mean(p(0,*)),max(p(0,*)),mean(p(1,*)),max(p(1,*)),sat,lamp,nul2,nul3,osr,Dark,$ format='(i4,i4,f10.2,f8.1,f7.1,i4,2(f9.2,i7),a2,1x,a5,i5,i5,f8.2,f8.2)' endfor ;for i exit: print,'' print,' * = Saturated Data' cd,cdir ;stop close,/all print,'Done, results are in ',cdir+'\'+outfile end