Fix up ,select_config usage; now unit tests pass.
authorW. Trevor King <wking@drexel.edu>
Mon, 26 Sep 2011 15:10:54 +0000 (11:10 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 26 Sep 2011 15:10:54 +0000 (11:10 -0400)
pypiezo/afm.py
pypiezo/test.py

index da05b68535f5b954983416f71b6311cfc5dc66be..616c6f4b6c3d039bf9b916ab961bca1a4dda6d6d 100644 (file)
@@ -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)
index e2efd7d90729441797dfc669bbffebe211bf6d5b..2f39cc2a93072f401758dfec07adbcc2227f181a 100644 (file)
@@ -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)