From 8d80e1cb6c3377264eaa9fe94957261ba4c9e4ff Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 28 Jul 2011 13:51:57 -0400 Subject: [PATCH] Remove underscores from config classes in doctests. --- pypiezo/afm.py | 6 +++--- pypiezo/base.py | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/pypiezo/afm.py b/pypiezo/afm.py index 5a9a6e6..685a779 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -71,11 +71,11 @@ class AFMPiezo (_base.Piezo): first few surface approaching steps, which could lead to an `EdgeKink` error instead of a `FlatFit` error. - >>> axis_config = config._AxisConfig() + >>> axis_config = config.AxisConfig() >>> axis_config.update( ... {'gain':20, 'sensitivity':8e-9, 'minimum':-9}) - >>> axis_channel_config = config._ChannelConfig() - >>> input_channel_config = config._ChannelConfig() + >>> axis_channel_config = config.ChannelConfig() + >>> input_channel_config = config.ChannelConfig() >>> a = _base.PiezoAxis(axis_config=axis_config, ... axis_channel_config=axis_channel_config, diff --git a/pypiezo/base.py b/pypiezo/base.py index b648a9d..f15e8f3 100644 --- a/pypiezo/base.py +++ b/pypiezo/base.py @@ -42,7 +42,7 @@ from . import package_config as _package_config def convert_bits_to_volts(config, data): """Convert bit-valued data to volts. - >>> config = _config._ChannelConfig() + >>> config = _config.ChannelConfig() >>> config['conversion-coefficients'] = [1, 2, 3] >>> config['conversion-origin'] = -1 >>> convert_bits_to_volts(config, -1) @@ -58,7 +58,7 @@ def convert_bits_to_volts(config, data): def convert_volts_to_bits(config, data): """Convert bit-valued data to volts. - >>> config = _config._ChannelConfig() + >>> config = _config.ChannelConfig() >>> config['inverse-conversion-coefficients'] = [1, 2, 3] >>> config['inverse-conversion-origin'] = -1 >>> convert_volts_to_bits(config, -1) @@ -91,7 +91,7 @@ def convert_volts_to_bits(config, data): def convert_volts_to_meters(config, data): """Convert volt-valued data to meters. - >>> config = _config._AxisConfig() + >>> config = _config.AxisConfig() >>> config['gain'] = 20.0 >>> config['sensitivity'] = 8e-9 >>> convert_volts_to_meters(config, 1) @@ -107,7 +107,7 @@ def convert_volts_to_meters(config, data): def convert_meters_to_volts(config, data): """Convert bit-valued data to volts. - >>> config = _config._AxisConfig() + >>> config = _config.AxisConfig() >>> config['gain'] = 20.0 >>> config['sensitivity'] = 8e-9 >>> convert_meters_to_volts(config, 1.6e-7) @@ -122,10 +122,10 @@ def convert_meters_to_volts(config, data): def convert_bits_to_meters(channel_config, axis_config, data): """Convert bit-valued data to meters. - >>> channel_config = _config._ChannelConfig() + >>> channel_config = _config.ChannelConfig() >>> channel_config['conversion-coefficients'] = [1, 2, 3] >>> channel_config['conversion-origin'] = -1 - >>> axis_config = _config._AxisConfig() + >>> axis_config = _config.AxisConfig() >>> axis_config['gain'] = 20.0 >>> axis_config['sensitivity'] = 8e-9 >>> convert_bits_to_meters(channel_config, axis_config, 1) @@ -144,10 +144,10 @@ def convert_bits_to_meters(channel_config, axis_config, data): def convert_meters_to_bits(channel_config, axis_config, data): """Convert meter-valued data to volts. - >>> channel_config = _config._ChannelConfig() + >>> channel_config = _config.ChannelConfig() >>> channel_config['inverse-conversion-coefficients'] = [1, 2, 3] >>> channel_config['inverse-conversion-origin'] = -1 - >>> axis_config = _config._AxisConfig() + >>> axis_config = _config.AxisConfig() >>> axis_config['gain'] = 20.0 >>> axis_config['sensitivity'] = 8e-9 >>> convert_meters_to_bits(channel_config, axis_config, 1.6e-7) @@ -208,10 +208,10 @@ class PiezoAxis (object): >>> for chan in [axis_channel, monitor_channel]: ... chan.range = chan.find_range(unit=UNIT.volt, min=-10, max=10) - >>> axis_config = _config._AxisConfig() + >>> axis_config = _config.AxisConfig() >>> axis_config.update({'gain':20, 'sensitivity':8e-9}) - >>> axis_channel_config = _config._ChannelConfig() - >>> monitor_channel_config = _config._ChannelConfig() + >>> axis_channel_config = _config.ChannelConfig() + >>> monitor_channel_config = _config.ChannelConfig() >>> monitor_channel_config['device'] = '/dev/comediX' >>> p = PiezoAxis(axis_config=axis_config, @@ -315,7 +315,7 @@ class InputChannel(object): >>> channel = s.channel(0, factory=AnalogChannel, aref=AREF.diff) >>> channel.range = channel.find_range(unit=UNIT.volt, min=-10, max=10) - >>> channel_config = _config._ChannelConfig() + >>> channel_config = _config.ChannelConfig() >>> c = InputChannel(channel_config=channel_config, channel=channel) >>> c.setup_config() @@ -373,11 +373,11 @@ class Piezo (object): >>> for chan in [axis_channel, monitor_channel, input_channel]: ... chan.range = chan.find_range(unit=UNIT.volt, min=-10, max=10) - >>> axis_config = _config._AxisConfig() + >>> axis_config = _config.AxisConfig() >>> axis_config.update({'gain':20, 'sensitivity':8e-9}) - >>> axis_channel_config = _config._ChannelConfig() - >>> monitor_channel_config = _config._ChannelConfig() - >>> input_channel_config = _config._ChannelConfig() + >>> axis_channel_config = _config.ChannelConfig() + >>> monitor_channel_config = _config.ChannelConfig() + >>> input_channel_config = _config.ChannelConfig() >>> a = PiezoAxis(axis_config=axis_config, ... axis_channel_config=axis_channel_config, -- 2.26.2