pro average_reference_pos, Date=Date,Directory=Directory,$
        stats_directory=stats_directory,xcenter=xcenter,ycenter=ycenter,$
        center_file=center_file


                                                                               
If (not keyword_set(Date)) then Date='11'
If (not keyword_set(Directory)) then Directory='/a/pippin01/Volumes/u08/lsst/CPanalysis/2005-05-'$
        +date+'/ShackHartman/'
If (not keyword_set(stats_directory)) then stats_directory='stats_temp'
If (not keyword_set(x_center)) then x_center=[542]
If (not keyword_set(y_center)) then y_center=[465]
If (not keyword_set(center_file)) then center_file=Directory+stats_directory+'/centers.txt'

;CONSTANTS
num=25                          ;The number of rows and columns in reference grid
num_of_files=100                ;The number of files for each letter
subx=2*indgen(num)-25           ;The x-reference numbers
suby=indgen(num)-12             ;The y-reference numbers
box=11                          ;The distance used for assigning coordinates to the ref grid


