pro movie_hr_ha, hdr,ibegin=ibegin,iend=iend,swap=swap,$
		vmax=vmax,vmin=vmin

filename=findfile(hdr,count=number)

print,filename

if n_elements(vmax) eq 0 then vmax=250
if n_elements(vmin) eq 0 then vmin=0
if n_elements(ibegin) eq 0 then ibegin=0
if n_elements(iend) eq 0 then iend=number-1

if n_elements(swap) ne 0 then read_hr_ha,filename(0),dat1,xdim,ydim,info=info,/swap
if n_elements(swap) eq 0 then read_hr_ha,filename(0),dat1,xdim,ydim,info=info

xs=500.
ys=xs*ydim/xdim
window,xsize=xs*2,ysize=ys
tvscl,congrid(dat1,xs,ys,/interp)
xyouts,20.,ys-20.0,filename(0),size=2.5,/device
xyouts,20.,ys-50.0,sxpar(info,'time-obs'),size=2.5,/device

for ncircle=ibegin+1,iend do begin
if n_elements(swap) ne 0 then read_hr_ha,filename(ncircle),dat1,info=info,/swap
if n_elements(swap) eq 0 then read_hr_ha,filename(ncircle),dat1,info=info
;	print,max(dat1,min=min),min
	tvscl,congrid(dat1,xs,ys,/interp)>vmin<vmax,(ncircle mod 2)
	xyouts,(ncircle-ncircle/2*2)*xs+20.0,ys-20.0,filename(ncircle),$
		size=2.5,/device
	xyouts,(ncircle-ncircle/2*2)*xs+20.0,ys-50.0,sxpar(info,'time-obs'),$
		size=2.5,/device
        print,''
	print,'------- press cursor for continuing------'
	print,''
	cursor,x,y,/device
endfor
end





pro read_hr_ha,filename,data,xdim,ydim,info=hdr,swap=swap

data=readfits(filename,hdr)
xdim=sxpar(hdr,'NAXIS1')
ydim=sxpar(hdr,'NAXIS2')
if n_elements(swap) ne 0 then data=swap_endian(data)
data=rotate(data,7)

end





















