Remove underscores from config classes in doctests.
authorW. Trevor King <wking@drexel.edu>
Thu, 28 Jul 2011 17:51:57 +0000 (13:51 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 28 Jul 2011 17:51:57 +0000 (13:51 -0400)
pypiezo/afm.py
pypiezo/base.py

index 5a9a6e6736589581eee7e9ca1c29dc0c518c558d..685a779a23a40a5296de672fc48482c5c92dd7cb 100644 (file)
@@ -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,
index b648a9d79202f5855cf6462cd0da3ed0ec7c0ccb..f15e8f39899ddddcb1a26e2e2491b09059fae9dc 100644 (file)
@@ -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,