From bd86796f06b024cfa560785c5ffea11f68413140 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 29 Jul 2011 09:49:00 -0400 Subject: [PATCH] `name` is a ChannelConfig setting, not an AxisConfig setting. --- pypiezo/afm.py | 3 ++- pypiezo/base.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pypiezo/afm.py b/pypiezo/afm.py index 2dee129..1906115 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -73,8 +73,9 @@ class AFMPiezo (_base.Piezo): >>> axis_config = config.AxisConfig() >>> axis_config.update( - ... {'name': 'z', 'gain':20, 'sensitivity':8e-9, 'minimum':-9}) + ... {'gain':20, 'sensitivity':8e-9, 'minimum':-9}) >>> axis_config['channel'] = config.OutputChannelConfig() + >>> axis_config['channel']['name'] = 'z' >>> input_config = config.InputChannelConfig() >>> input_config['name'] = 'deflection' diff --git a/pypiezo/base.py b/pypiezo/base.py index 50abcaa..37c6fc4 100644 --- a/pypiezo/base.py +++ b/pypiezo/base.py @@ -364,8 +364,9 @@ class Piezo (object): ... chan.range = chan.find_range(unit=UNIT.volt, min=-10, max=10) >>> axis_config = _config.AxisConfig() - >>> axis_config.update({'name': 'z', 'gain':20, 'sensitivity':8e-9}) + >>> axis_config.update({'gain':20, 'sensitivity':8e-9}) >>> axis_config['channel'] = _config.OutputChannelConfig() + >>> axis_config['channel']['name'] = 'z' >>> axis_config['monitor'] = _config.InputChannelConfig() >>> input_config = _config.InputChannelConfig() >>> input_config['name'] = 'some-input' -- 2.26.2