produces the maximum deflection at the left-most point, and the
final (non-contact) slope (:math:`p_3`) is zero.
"""
- left_offset = self.info['max deflection']
- left_slope = 2*(-self.info['deflection range']
- /self.info['position range'])
+ left_offset = self.info['min deflection']
+ left_slope = 2*(self.info['deflection range']
+ /self.info['position range'])
kink_position = (self.info['max position']
+self.info['min position'])/2.0
right_slope = 0
% (params[2],
self.info['max position']-0.02*self.info['position range']))
if (self.info['guessed contact slope'] != None
- and params[3] < 0.5 * self.info['guessed contact slope']):
- raise PoorFit('Too far')
+ and abs(params[1]) < 0.5 * abs(self.info['guessed contact slope'])):
+ raise PoorFit('Too far (contact slope %g, but expected ~%g'
+ % (params[3], self.info['guessed contact slope']))
return params
class VelocityClampPlugin (Builtin):