From c4e0771d90d2e3fe1c3f8c427537323ec6a3caac Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 29 Jul 2011 09:44:12 -0400 Subject: [PATCH] Temporary debugging instrumentation. --- pypiezo/afm.py | 2 +- pypiezo/base.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pypiezo/afm.py b/pypiezo/afm.py index 8f211df..2dee129 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -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 diff --git a/pypiezo/base.py b/pypiezo/base.py index eb8d221..50abcaa 100644 --- a/pypiezo/base.py +++ b/pypiezo/base.py @@ -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) -- 2.26.2