Stop searching contour when the width of window reaches a threshold instead of exceeding the domain; a big speedup
Switch to the lower limit when limit difference below the threshold. In many cases, cd or CI change rapidly around the target contour, so the contours of the two limits may be very different although their values are close.
Use both coherency index (CI) and convexity deficiency (cd) for the rclv boundary criterion. Users can set CI as "-np.inf" if don't need it.