pro regis,image_list,shiftfile,x0=x0,y0=y0,xsize=xsize,ysize=ysize,$ chain=chain,fine=fine cc=0.0 ; read the image list here files=file_list(image_list,nnn) ; read the first image, put in the reference buff fxread,files(0),ref,header print,'Reference image...',files(0) ref_fn=files(0) openw,8,shiftfile ; find the indices of the subarray used for correlation calculation if (not keyword_set(x0)) then x0=128 if (not keyword_set(y0)) then y0=128 x0=fix(x0) y0=fix(y0) if (not keyword_set(xsize)) then begin xsize=256 endif else begin xsize=fix(xsize) endelse if (not keyword_set(ysize)) then begin ysize=256 endif else begin ysize=fix(ysize) endelse x1=fix(x0+xsize-1) y1=fix(y0+ysize-1) for k=1,nnn-1 do begin fxread,files(k),data2,header if( not keyword_set(fine)) then begin regis_core,ref,data2,out,[x0,x1],[y0,y1],nx,ny,cc,/nofine endif else begin regis_core,ref,data2,out,[x0,x1],[y0,y1],nx,ny,cc endelse out_fn='scra:[echols]Rf_'+files(k) writefits,out_fn,out,header printf,8,ref_fn,' ',files(k),' ',nx,ny,cc if( keyword_set(chain)) then begin ref_fn=files(k) ref=out endif endfor close,8 return end