Add explanatory message to analyze_surface_position_data's final==start error.
authorW. Trevor King <wking@tremily.us>
Thu, 12 Jul 2012 22:25:53 +0000 (18:25 -0400)
committerW. Trevor King <wking@tremily.us>
Thu, 12 Jul 2012 22:25:53 +0000 (18:25 -0400)
pypiezo/surface.py

index a0f9055e2cacb8f098fd43315a6a2aab3134a36a..fe096bb89ccb6d806fe6a31295efe7facfcce3dd 100644 (file)
@@ -177,7 +177,7 @@ def analyze_surface_position_data(
     start_pos = data['z'].min()
     final_pos = data['z'].max()
     if final_pos == start_pos:
-        raise SurfaceError()
+        raise SurfaceError('cannot fit a single approach step (too close?)')
     start_def = data['deflection'].min()
     final_def = data['deflection'].max()
     # start_def and start_pos are probably for 2 different points