Double initial guess for the surface kink position.
[hooke.git] / hooke / plugin / vclamp.py
index 0cfad0def3bef641e9022afd56a8db13cf840b2a..88306ff44ededee715b174438cd18da374e46356 100644 (file)
@@ -165,7 +165,7 @@ Minimum `fit-contact-slope/guessed-contact-slope` ratio for a "good" fit.
         left_offset = self.info['min deflection']
         middle_deflection = (self.info['min deflection']
                              + self.info['deflection range']/2.)
-        kink_position = (self._data > middle_deflection).argmax()
+        kink_position = 2*(self._data > middle_deflection).argmax()
         left_slope = ((self._data[-1] - self.info['min deflection'])
                       /kink_position)
         right_slope = 0