From d6bc857594e308e1d153cd63b686fe88703cdead Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 17 Aug 2012 10:37:17 -0400 Subject: [PATCH] Add surface-matplotlib config option to pypiezo. Sometimes you want to troubleshoot surface detection without popping up a plot of every single piezo sweep. --- pypiezo/config.py | 4 ++++ pypiezo/surface.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pypiezo/config.py b/pypiezo/config.py index f555b05..01cf06f 100644 --- a/pypiezo/config.py +++ b/pypiezo/config.py @@ -29,6 +29,10 @@ class PackageConfig (_h5config_tools.PackageConfig): name='matplotlib', help='Plot piezo motion using `matplotlib`.', default=False), + _config.BooleanSetting( + name='surface-matplotlib', + help='Plot surface positiong fit using `matplotlib`.', + default=False), ] diff --git a/pypiezo/surface.py b/pypiezo/surface.py index 6443ea2..0534613 100644 --- a/pypiezo/surface.py +++ b/pypiezo/surface.py @@ -209,7 +209,7 @@ def analyze_surface_position_data( full_output=True, maxfev=10000) _LOG.info('best fit parameters: %s' % (params,)) - if _package_config['matplotlib']: + if _package_config['surface-matplotlib']: if not _matplotlib: raise _matplotlib_import_error figure = _matplotlib_pyplot.figure() -- 2.26.2