From: W. Trevor King Date: Wed, 14 Mar 2012 22:49:37 +0000 (-0400) Subject: Add amplitude and max values to the "no room for wiggle" ValueError string. X-Git-Tag: 0.6~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8632c3e7c8aff5a12fbb60658f6d22e103ed17a0;p=pypiezo.git Add amplitude and max values to the "no room for wiggle" ValueError string. --- 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