Add surface-matplotlib config option to pypiezo.
authorW. Trevor King <wking@tremily.us>
Fri, 17 Aug 2012 14:37:17 +0000 (10:37 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 17 Aug 2012 14:37:20 +0000 (10:37 -0400)
Sometimes you want to troubleshoot surface detection without popping
up a plot of every single piezo sweep.

pypiezo/config.py
pypiezo/surface.py

index f555b059c8067c67dd112db6c2c0d7e8ecc9a5e4..01cf06fb07253b195e036dc38aa2ea29193e9b0d 100644 (file)
@@ -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),
         ]
 
 
index 6443ea29a5e4562a760e3301239c8a102737dd22..0534613d28ed8d13a02fa57c4a1c4fa7fb82dbed 100644 (file)
@@ -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()