diff --git a/script/test/ManipulatorZFlyScan.py b/script/test/ManipulatorZFlyScan.py new file mode 100644 index 00000000..98bcea2e --- /dev/null +++ b/script/test/ManipulatorZFlyScan.py @@ -0,0 +1,49 @@ +""" +Continuous 1D Manipulator scan + +set manipulator scan parameters below. +set analyser parameters in the scienta window. recommended: fixed mode, dwell time between 0.2 and 1.0 s + +the motor speed is determined from the STEP parameter and the scienta busy time (dwell time + dead time). +note that the motors have a limited speed range! +""" + +import math + +MOTORS = (ManipulatorZ) +RANGE = (110., 120.) +SPEED = 0.05 + +SENSORS = (Counts, SampleCurrent, RefCurrent) +MONITORS = (SampleCurrent) + +# --- do not edit below --- + +RELATIVE = False +LATENCY = 0.0 +ZIGZAG = False +ENDSCAN = False + +adjust_sensors() +set_adc_averaging() + +# time per scienta acquisition in seconds +trig_scienta() +time1 = time.time() +before_readout() +time2 = time.time() +scienta_time = (time2 - time1) +print "step time: ", scienta_time + +SPEED = 0.05 +fly_time = (RANGE[1] - RANGE[0]) / SPEED +STEPS = int(fly_time / scienta_time) + 1 +print "scan time: ", fly_time + +try: + cscan(MOTORS, SENSORS, RANGE[0], RANGE[1], STEPS, time=fly_time, before_read=trig_scienta, check_positions = False, monitors=MONITORS) + +finally: + if ENDSCAN: + after_scan() + \ No newline at end of file