Add amplitude and max values to the "no room for wiggle" ValueError string.
authorW. Trevor King <wking@drexel.edu>
Wed, 14 Mar 2012 22:49:37 +0000 (18:49 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 14 Mar 2012 22:49:37 +0000 (18:49 -0400)
pypiezo/afm.py

index 88dd3e85bc91001d21bcef69ccf1a5db8b6c0a52..8f9d6213edd8d50d743393ca53c7ee4ad7a593c0 100644 (file)
@@ -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