diff --git a/script/test/HoloFlyScanSingleDataset.py b/script/test/HoloFlyScanSingleDataset.py index 5abeff25..2e881f47 100644 --- a/script/test/HoloFlyScanSingleDataset.py +++ b/script/test/HoloFlyScanSingleDataset.py @@ -15,12 +15,12 @@ SENSORS (list of devices) THETA_RANGE = (-9.0, 81.0) THETA_STEP = 1.0 -PHI_RANGE = (-40.0, +40.0) +PHI_RANGE = (-160.0, +160.0) PHI_STEP = 40.0 LATENCY = 0.0 ZIGZAG = True -ENDSCAN = False +ENDSCAN = True MOTORS = (ManipulatorTheta) #SENSORS = (Counts, Scienta.spectrum, SampleCurrent, RefCurrent, MachineCurrent) SENSORS = (Counts, Scienta.dataMatrix, SampleCurrent, RefCurrent, MachineCurrent) @@ -51,15 +51,14 @@ print "phi_positions: ", phi_positions def before_pass(index, scan): global phi_positions print "Starting pass: ", index - phi = phi_positions[index] + phi = phi_positions[index-1] ManipulatorPhi.write(phi) print "phi = ", phi ManipulatorPhi.waitValueInRange(phi, 1.0, 100) + + try: - try: - cscan(MOTORS, SENSORS, THETA_RANGE[0], THETA_RANGE[1], THETA_NSTEPS - 1, time=theta_time, passes=len(phi_positions), zigzag=ZIGZAG, before_read=before_readout, after_read = after_readout, before_pass = before_pass) - except ContinuousScanFollowingErrorException: - print time.time(), " cscan: exception at (theta, phi) = ({th}, {ph})".format(th=ManipulatorTheta.read(), ph=phi) + cscan(MOTORS, SENSORS, THETA_RANGE[0], THETA_RANGE[1], THETA_NSTEPS - 1, time=theta_time, passes=len(phi_positions), zigzag=ZIGZAG, before_read=before_readout, after_read = after_readout, before_pass = before_pass) finally: if ENDSCAN: