From 37b18a7f0f2aea4b3e6dea60a086048617bc6334 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 26 Sep 2011 11:10:54 -0400 Subject: [PATCH] Fix up ,select_config usage; now unit tests pass. --- pypiezo/afm.py | 4 ++-- pypiezo/test.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pypiezo/afm.py b/pypiezo/afm.py index da05b68..616c6f4 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -105,8 +105,8 @@ class AFMPiezo (_base.Piezo): into the deflection input channel. >>> target_pos = _base.convert_volts_to_bits( - ... p.config.select_config('axes', 'channel', - get_attribute=_base.get_axis_name), 2) + ... p.config.select_config('axes', 'z', + ... get_attribute=_base.get_axis_name)['channel'], 2) >>> step = int((target_pos - pos)/5) >>> target_def = _base.convert_volts_to_bits( ... p.config.select_config('inputs', 'deflection'), 3) diff --git a/pypiezo/test.py b/pypiezo/test.py index e2efd7d..2f39cc2 100644 --- a/pypiezo/test.py +++ b/pypiezo/test.py @@ -92,10 +92,10 @@ def get_piezo_config(storage=None): conversion-origin: 0 inverse-conversion-coefficients: 0, 1 inverse-conversion-origin: 0 - >>> get_axis_name - >>> d = p.select_config('inputs', 'deflection', - ... get_attribute=_get_axis_name) - >>> d['channel']['name'] + >>> _get_axis_name(p['axes'][0]) + 'x' + >>> d = p.select_config('inputs', 'deflection') + >>> d['name'] 'deflection' """ piezo_config = _PiezoConfig(storage=storage) -- 2.26.2