From 8632c3e7c8aff5a12fbb60658f6d22e103ed17a0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 14 Mar 2012 18:49:37 -0400 Subject: [PATCH] Add amplitude and max values to the "no room for wiggle" ValueError string. --- pypiezo/afm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pypiezo/afm.py b/pypiezo/afm.py index 88dd3e8..8f9d621 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -344,7 +344,9 @@ class AFMPiezo (_base.Piezo): _LOG.debug(('generated amplitude for interference wiggle: {}' ).format(config['amplitude'])) if config['amplitude'] > max_amplitude: - raise ValueError('no room for a two wavelength wiggle') + raise ValueError( + 'no room for a two wavelength wiggle ({} > {})'.format( + config['amplitude'], max_amplitude)) n = config['samples'] # samples in a single oscillation scan_frequency = config['frequency'] * n -- 2.26.2