pro azimuth ;This program reads the azimuth information from the headers in the current Log. ;It is to be run from the Log. cd,'', current=cdir & cd,cdir ;captures current directory close,1 openw,1,"Azimuth_Time_History.txt" printf,1,"Azimuth History from DB2 of Log: ",cdir printf,1,'' dirs=findfile(cdir+"\DB2\*", count=ndirs) for n=0,ndirs-1 do begin cd,dirs(n) files=findfile('V_*',count=nfiles) if nfiles eq 0 then goto, nextdir for n1=0,nfiles-1 do begin actual_az=999.9 ;if not azimuth data is available if dirs(n) eq "Ir" then d_irread,files(n1),h,p,g else d_read,files(n1),h,p m_time=double(d_value(h,88)) actual_az=d_value(h,101) printf,1,files(n1),m_time,actual_az endfor ;spawn,'lsf',files,/noshell ;s=size(files) ;nfiles=s(1) nextdir: endfor close,1 cd,cdir Print,"Done!" end