c combine 2048*2048 pic.
 	parameter (nfile=99)	
	real white(nfile)
	integer*2 sx(nfile),sy(nfile)
	character*80 f0,f1,f2,head(72)
	real*8 a8(8),adcoef(2,3)
	
	if(iargc().lt.1)then
	  write(*,*)
	  write(*,*)'         ******** calculate shift pixel ***2000.7' 
	  write(*,*)
	  write(*,*)'    cob batch_file'
	  write(*,*)
	  stop
	endif

	call getarg(1,f0)
	open(51,file=f0,status='old')
	i=0
20	i=i+1
	read(51,'(a)',end=10)f2
	goto 20
10	if(i.lt.3)stop 'too less files, must>=2'
	close(51)
	m=i-1
	if(m.gt.nfile)m=nfile

	open(51,file=f0,status='old')
	write(*,2)
2	format(35x,'shift(x,y)           UT.     exp.    sky'/78('-'))
	nt=0
	do 30 i=1,m
	if(i.eq.1)then
	  read(51,'(a)')f1              	! mother file
	  call gethead(f1,head)
	  call geta8(head,a8)
	  call xytoad(a8,adcoef)
	  x=a8(7)
	  y=a8(8)
	  f2=f1
	else
	  read(51,'(a)')f2
	  call gethead(f2,head)
	endif
	ipos=indexpos(head,'A87     ')
	read(head(ipos)(20:),*)alpha
	read(head(ipos+1)(20:),*)delta
        call standc(x,y,alpha,delta,xi,xn)
        x2=adcoef(1,1)*xi+adcoef(1,2)*xn+adcoef(1,3)-1024.5
        y2=adcoef(2,1)*xi+adcoef(2,2)*xn+adcoef(2,3)-1024.5
	sx(i)=nint(x2)
	sy(i)=nint(y2)
	ipos1=indexpos(head,'TIME    ')
	ipos2=indexpos(head,'EXPOSURE')
	read(head(ipos2)(26:),*)j
	nt=nt+j
	ipos3=indexpos(head,'VOLT2   ')
	if(head(ipos3)(42:46).ne."PIXEL")then
          write(*,*)"do statsky first !"
          stop
        endif
	read(head(ipos3)(22:),*)white(i)
	write(*,1)i,f2(1:22),x2,y2,sx(i),sy(i),
     *  head(ipos1)(16:27),head(ipos2)(24:30),white(i)
1	format(i2,':  ',a,2f6.1,2x,2i4,2a,f8.2)
30	continue
	close(51)
	end

	subroutine gethead(f1,head)
	character*80 f1,head(72)
	open(52,file=f1,status='old',access='direct',recl=5760)
	read(52,rec=1)head
	close (52)
	end
	
	subroutine geta8(head,a8)
	real*8 a8(8)
	character*80 head(72)
	ipos=indexpos(head,'A81     ')-1
	do 10 i=1,8
10	read(head(i+ipos)(12:),*)a8(i)
	end

        function indexpos(head,f1)
        character*80 head(72),f1*8
        do 10 indexpos=1,72
10      if(head(indexpos)(1:8).eq.f1)return
        end
