Script execution

This commit is contained in:
gac-x04sa
2018-01-25 10:59:08 +01:00
parent 1fcfd9fe82
commit ee4adffd3c
+4 -2
View File
@@ -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))