help="""
As an alternative to 'ignore index', ignore after the last peak in the
peak list stored in the `.info` dictionary.
help="""
As an alternative to 'ignore index', ignore after the last peak in the
peak list stored in the `.info` dictionary.
+""".strip()),
+ Argument(name='force zero non-contact slope', type='bool',
+ default=False, count=1,
+ help="""
+Fix the fitted non-contact slope at zero.
""".strip()),
Argument(name='distance info name', type='string',
default='surface distance offset',
""".strip()),
Argument(name='distance info name', type='string',
default='surface distance offset',
if reverse == True: # approaching, contact region on the right
d_data = d_data[::-1]
s = SurfacePositionModel(d_data, info={
if reverse == True: # approaching, contact region on the right
d_data = d_data[::-1]
s = SurfacePositionModel(d_data, info={
s.info['ignore non-contact before index'] = ignore_index
offset,contact_slope,surface_index,non_contact_slope = s.fit(
outqueue=outqueue)
s.info['ignore non-contact before index'] = ignore_index
offset,contact_slope,surface_index,non_contact_slope = s.fit(
outqueue=outqueue)
+ deflection_offset = offset + contact_slope*surface_index
+ delta_pos_per_point = z_data[1] - z_data[0]
+ contact_slope /= delta_pos_per_point # ddef/point -> ddev/dpos
+ non_contact_slope /= delta_pos_per_point
if reverse == True:
surface_index = len(d_data)-1-surface_index
return (numpy.round(surface_index), deflection_offset, info)
if reverse == True:
surface_index = len(d_data)-1-surface_index
return (numpy.round(surface_index), deflection_offset, info)
def _run(self, hooke, inqueue, outqueue, params):
self._add_to_command_stack(params)
params = self._setup_params(hooke=hooke, params=params)
def _run(self, hooke, inqueue, outqueue, params):
self._add_to_command_stack(params)
params = self._setup_params(hooke=hooke, params=params)
def_data = self._get_column(hooke=hooke, params=params,
column_name='deflection column')
out = def_data * def_data.info[params['spring constant info name']]
def_data = self._get_column(hooke=hooke, params=params,
column_name='deflection column')
out = def_data * def_data.info[params['spring constant info name']]