Temporary debugging instrumentation.
authorW. Trevor King <wking@drexel.edu>
Fri, 29 Jul 2011 13:44:12 +0000 (09:44 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 29 Jul 2011 13:44:12 +0000 (09:44 -0400)
pypiezo/afm.py
pypiezo/base.py

index 8f211dfb382c9d89f934d9f34b136b47b236cf99..2dee1292390c1d0e8e394e41450f1eeb7114b0cc 100644 (file)
@@ -84,7 +84,7 @@ class AFMPiezo (_base.Piezo):
     >>> c = _base.InputChannel(config=input_config, channel=input_channel)
     >>> c.setup_config()
 
-    >>> p = AFMPiezo(axes=[a], channels=[c], name='Molly')
+    >>> p = AFMPiezo(axes=[a], inputs=[c], name='Molly')
 
     >>> deflection = p.read_deflection()
     >>> deflection  # doctest: +SKIP
index eb8d221ce9c684df019fff356a6ab91a3d443c47..50abcaafceff78375b0339a0f03aed733e0cfdb4 100644 (file)
@@ -188,7 +188,6 @@ class PiezoAxis (object):
     If used, the montoring channel must (as of now) be on the same
     device as the controlling channel.
 
-    >>> from pprint import pprint
     >>> from pycomedi.device import Device
     >>> from pycomedi.subdevice import StreamingSubdevice
     >>> from pycomedi.channel import AnalogChannel
@@ -227,7 +226,7 @@ class PiezoAxis (object):
     ...     axis_channel=axis_channel, monitor_channel=monitor_channel)
 
     >>> p.setup_config()
-    >>> pprint(config['channel'])
+    >>> print(config['channel'].dump())
     {'channel': 0,
      'conversion-coefficients': array([ -1.00000000e+01,   3.05180438e-04]),
      'conversion-origin': 0.0,
@@ -237,7 +236,7 @@ class PiezoAxis (object):
      'maxdata': 65535L,
      'range': 0,
      'subdevice': 1}
-    >>> pprint(config['monitor'])
+    >>> print(config['monitor'].dump())
     {'channel': 0,
      'conversion-coefficients': array([ -1.00000000e+01,   3.05180438e-04]),
      'conversion-origin': 0.0,
@@ -292,7 +291,6 @@ class PiezoAxis (object):
 class InputChannel(object):
     """An input channel monitoring some interesting parameter.
 
-    >>> from pprint import pprint
     >>> from pycomedi.device import Device
     >>> from pycomedi.subdevice import StreamingSubdevice
     >>> from pycomedi.channel import AnalogChannel
@@ -311,7 +309,7 @@ class InputChannel(object):
 
     >>> c = InputChannel(config=channel_config, channel=channel)
     >>> c.setup_config()
-    >>> pprint(channel_config)
+    >>> print(channel_config.dump())
     {'channel': 0,
      'conversion-coefficients': array([ -1.00000000e+01,   3.05180438e-04]),
      'conversion-origin': 0.0,
@@ -484,6 +482,7 @@ class Piezo (object):
         efficient search.
         """
         for n,channel in self.channels(direction=direction):
+            _LOG.critical('channel name: {}'.format(repr(n)))
             if n == name:
                 return channel
         raise ValueError(name)