c-------------------------------------------------------------------- 
c                          test  pair-wise selection of largest seed
      PARAMETER (Ncenter = 30)
      common /DAT/ x(Ncenter)
      dimension Lab(Ncenter)

      Do i=1,Ncenter
         x(i) = INT(1210. +1.1*sin(15.*i*3.141592653/Ncenter))
         Lab(i) = 1
      EndDo 
      n =0

      write (*,*) ' start search',Ncenter

      Do  i=1,Ncenter
         xx =x(i)
                Do j=1,Ncenter
                   If(i.ne.j)Then
c                      if(xx.lt.x(j))Lab(i)=0
c                      if(abs(xx-x(j)).lt.1.e-3.and.i.lt.j)Lab(i)=0
                   EndIf 
            q1   =xx/x(j)
             if(abs(q1-1.d0).lt.1.d-3.and.i.lt.j)q1=0.9
             if(abs(q1-1.d0).lt.1.d-3.and.i.gt.j)q1=1.1

             If(q1.lt.1.)Then
                Lab(i)=0     ! kill dublicate
             EndIf

                EndDo 
      EndDo 

      write (*,'(5(i6,f9.3,i2))') (i,x(i),Lab(i),i=1,Ncenter)
      write (*,*)  ' final selection:'
      Do  i=1,Ncenter
         If(Lab(i).eq.1)write(*,'(i6,f11.3,i2)') i,x(i),Lab(i)
      EndDo 
      Stop
      end
