pro combinefiles ; Created on 8/27/97 by C. See ; This program combines the time-orded list (temperature) files into one ; file for ease of ftp & plotting. The combined file contains a the ; time (in seconds) and the temperature (in deg K) fields only. ; This program is to be run from the ./post/timelist directiory. The tolist ; program should have already been run. This program deposits the combined.lst ; file in the ./post/timelist directory file=findfile('*',count=nfiles) arrsiz=500 header=strarr(20) column=fltarr(18,arrsiz) time=fltarr(arrsiz) temp=fltarr(arrsiz) raw=fltarr(arrsiz) raw1=fltarr(arrsiz) siz=fltarr(20) n=0 for i=0,nfiles-1 do begin case file(i) of 't08irchp.lst': goto,ir 't09ccdlg.lst': header(n)='CCD Lug' 't10strtp.lst': header(n)='Strap' 't11opttp.lst': header(n)='Optics' 't12shabd.lst': header(n)='Aux Board' 't13shbox.lst': header(n)='SH Box' 't14eabox.lst': header(n)='EA Box' 't15ccdcp.lst': header(n)='CCD Chip' 't16viotp.lst': header(n)='Violet' else: goto,next endcase close,1 openr,1,file(i) j=0 while not eof(1) do begin readf,1,times,raws,temps ;,format='(F,F,F,/)' time(j)=times & raw(j)=raws & temp(j)=temps j=j+1 endwhile siz(n)=j column(2*n,*)=time column(2*n+1,*)=temp close,1 n=n+1 goto,next ir: header(n)='IR' close,1 openr,1,file(i) j=0 while not eof(1) do begin readf,1,times,raws,raw1s,temps ;,format='(F,F,F,/)' time(j)=times & raw(j)=raws & raw1(j)=raws & temp(j)=temps j=j+1 endwhile siz(n)=j column(2*n,*)=time column(2*n+1,*)=temp close,1 n=n+1 next: endfor close,2 openw,2,'combined.lst' printf,2,header,format='(9(a16,:,4x))' printf,2,format='(9(6x,"Time",6x,"Temp"))' printf,2,column,format='(9(2x,2F9.2))' close,2 ;stop end