anchor.diff:      end if
       if (cheby_r1(jj)<zero) then
         write(lerr,"(a)")      "CHEBY> ERROR R1 cannot be lower than zero!"
  +      goto 10
  +    end if
  +    if (cheby_r2(jj)<zero) then
  +      ! a sanity check, most probably will never be triggered, but better stay safe
  +      write(lerr,"(a)")      "CHEBY> ERROR R2 cannot be lower than zero!"
         goto 10
       end if
       if (cheby_I (jj)<=zero) then
  
positive.code:   epsilon=c1m15
    gteps=one+epsilon
    lteps=one-epsilon
    
    XCLO=cheby_offset_x(icheby(ix))
    YCLO=cheby_offset_y(icheby(ix))
  
negative.code:   ax=abs(XA) ;
    ay=abs(YA) ;
    ! (x,y)<r1 or ( (xx>r2) || (yy>r2) ): no kick from lens
    if (.not. ( (ax.lt.r1lteps.and.ay.lt.r1lteps) .or. (ax.gt.r2gteps.or.ay.gt.r2gteps) ) ) then
       
      if (st_debug) then
        write(lout,'(2(a,1pe22.15))')'CHEBY> CHEBY_KICK_FOX computing at XA=',XA,' - YA=',YA
  