From e56cff18ed60dc8867d85f5690aca41c4b1b5546 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 12 Jul 2012 18:25:53 -0400 Subject: [PATCH] Add explanatory message to analyze_surface_position_data's final==start error. --- pypiezo/surface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypiezo/surface.py b/pypiezo/surface.py index a0f9055..fe096bb 100644 --- a/pypiezo/surface.py +++ b/pypiezo/surface.py @@ -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 -- 2.26.2