pro dad_plust,filename,ldata,rdata

;2001,8-11,bao

l1=intarr(523,363)
r1=intarr(523,363)
type='l4*.dad'
read,type,prompt=('dad data:')
filename=findfile(type)



num=n_elements(filename)

for i=0,num-1 do  begin 
read_hr_dad,filename(i),ldata,rdata,info
l=intarr(1,2)
r=intarr(1,2)
l=size(ldata,/DIMENSIONS)
r=size(rdata,/DIMENSIONS)
xl=l(0,0)
yl=l(1,0)
xr=r(0,0)
yr=r(1,0)
print,'size:',xl,yl,xr,yr
xdim=523
ydim=363
;print,size(ldata)
smooth=3
ldata=smooth(ldata,smooth)
ldata=congrid(ldata,xdim,ydim,/interp)
;ldata(i)=intarr(523,363)
;ldata(i)=ldata
l1=l1+ldata
;print,size(l1)
rdata=smooth(rdata,smooth)
rdata=congrid(rdata,xdim,ydim,/interp)
;rdata(i)=bytarr(523,363)
;rdata(i)=rdata
r1=r1+rdata
window,0,xs=xdim,ys=ydim
tvscl,l1
window,1,xs=xdim,ys=ydim
tvscl,r1
;acpole,ldata,rdata
if (i eq num-1) then begin
data1=rdata-ldata
;data2=r1+l1
;data=data1/data2
;data=data*6000
window,2,xs=xdim,ys=ydim
tvscl,data1
xyouts,5,ydim-12,size=1.2,'!6 Date:     '+$
	info(1),/device
xyouts,185,ydim-12,size=1.2,'!6 Time:         '+$
	info(2)+'UT',/device
endif
endfor
end
