pro test_full_unshifted_mpeg, y_low=y_low,y_high=y_high,x_low=x_low,x_high=x_high,$
	Shack_Directory=Shack_Directory,Date=Date

If (not keyword_set(Date)) then Date='11'
If (not keyword_set(Shack_Directory)) then Shack_Directory='/a/pippin01/Volumes/u08/lsst/CPanalysis/2005-05-10/ShackHartman/'
If (not keyword_set(pixels)) then pixels='whole_array'
If (not keyword_set(y_low)) then y_low=140
If (not keyword_set(y_high)) then y_high=780
If (not keyword_set(x_low)) then x_low=220
If (not keyword_set(x_high)) then x_high=860

Raw_dir=Shack_Directory+'raw/'
Raw_files=file_search(Raw_dir+'h*5132**.fits',count=num_files)


;NAME OF MOVIE

frame_no=0
no_frames_per_image=15

;SET PLOT TO BUFFER SO THAT OTHER PROCESSES CAN OCCUR WHILE MOVIE IS MADE
set_plot,'X'

        for file_number=0,num_files do begin

	
	unshifted_filename=Raw_files(file_number)
	raw_path_parts=strsplit(Raw_files(file_number),'/',/extract)
        raw_file_ref=strsplit(raw_path_parts(N_elements(raw_path_parts)-1),'raw.fits',$
                /extract,/regex)
	pre_letter=strsplit(raw_file_ref,'_',/extract)
        pre_letter=pre_letter(0)


	
	print,FORMAT='(%"%s")',file_number

	fits_read,unshifted_filename,unshifted_image

	unshifted_image=unshifted_image(x_low:x_high,y_low:y_high)

	WINDOW,0,XSIZE=768,YSIZE=768

	;SET UP REFERENCE LINE
	x_h=x_low-20+findgen((x_high-x_low)+40)
	y_h=fltarr((x_high-x_low)+40)+468
	x_v=[540,540]
	y_v=[0,820]

;	plot,x,y,xrange=[x_low,x_high],yrange=[y_low,y_high],position=[0,0,1,1],$
 ;       thick=.2,xstyle=11,ystyle=11
        
;	axes=tvrd()
;	axes=congrid(axes,768,768)
	set_plot,'X'

	erase

	!p.noerase=1

	unshifted_image=bytscl(unshifted_image,min=20,max=5000)
	unshifted_image=congrid(unshifted_image,768,768)

	image1=fltarr(3,768,768)
	image1(0,*,*)=unshifted_image
	image1(1,*,*)=unshifted_image
	image1(2,*,*)=unshifted_image

	tv,image1,true=1

	plot,x_h,y_h,xrange=[x_low,x_high],yrange=[y_low,y_high],position=[0,0,1,1],$
 	     thick=.2,xstyle=11,ystyle=11
	plot,x_v,y_v,xrange=[x_low,x_high],yrange=[y_low,y_high],position=[0,0,1,1],$
             thick=.2,xstyle=11,ystyle=11
	xyouts,25,25,pre_letter,/device

	;image2=tvrd()
	;set_plot,'x'
	;tv,image2

	



	frame_no=frame_no+1
	stop
	endfor
	

end

