diff --git a/script/scans/SampleSearch.py b/script/scans/SampleSearch.py index 16166bf..e7bc8d1 100644 --- a/script/scans/SampleSearch.py +++ b/script/scans/SampleSearch.py @@ -16,9 +16,11 @@ sensor = scd_sim if SIMULATION else scd X_MIN, X_MAX, Y_MIN, Y_MAX = float(X_MIN), float(X_MAX), float(Y_MIN), float(Y_MAX) +step=0 for y in frange(Y_MIN, Y_MAX, Y_STEP): scy.move(y) - r = cscan(scx, sensor, scx.minValue, scx.maxValue, 0.01, latency = DIODE_SETTLING_TIME) + scan_range = [scx.minValue, scx.maxValue] if (step % 0==0) else [scx.maxValue, scx.minValue] + r = cscan(scx, sensor, scan_range[0], scan_range[1], 0.01, latency = DIODE_SETTLING_TIME) try: xdata = enforce_monotonic(r.getPositions(0)) @@ -38,7 +40,7 @@ for y in frange(Y_MIN, Y_MAX, Y_STEP): break except: print "Invalid x fit for y=", y - + step += 1 r = cscan(scy, sensor, scy.minValue, scy.maxValue, 0.01, latency = DIODE_SETTLING_TIME) xdata = enforce_monotonic(r.getPositions(0))