Startup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Mon Aug 21 11:00:19 CEST 2023
|
||||
#Tue Aug 22 11:40:39 CEST 2023
|
||||
LastRunDate=230821
|
||||
FileSequentialNumber=18658
|
||||
DaySequentialNumber=6
|
||||
DaySequentialNumber=0
|
||||
|
||||
47
script/optics/microfocus/ManipulatorScan.py
Normal file
47
script/optics/microfocus/ManipulatorScan.py
Normal file
@@ -0,0 +1,47 @@
|
||||
"""
|
||||
Arguments:
|
||||
|
||||
MOTOR (device)
|
||||
SENSORS (list)
|
||||
RANGE (tuple (min, max))
|
||||
STEPS (int or tuple)
|
||||
LATENCY (double)
|
||||
RELATIVE (BOOLEAN)
|
||||
FLY_SCAN (BOOLEAN)
|
||||
ENDSCAN (BOOLEAN)
|
||||
"""
|
||||
|
||||
#set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
|
||||
adjust_sensors()
|
||||
set_adc_averaging()
|
||||
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
|
||||
set_exec_pars(compression=True)
|
||||
|
||||
try:
|
||||
if FLY_SCAN:
|
||||
# time per scienta acquisition in seconds
|
||||
trig_scienta()
|
||||
time1 = time.time()
|
||||
before_readout()
|
||||
time.sleep(0.2)
|
||||
time2 = time.time()
|
||||
scienta_time = (time2 - time1) + 1.
|
||||
print "step time: ", scienta_time
|
||||
|
||||
if isinstance(STEPS,int):
|
||||
raise Exception ("Fly Scan must define step size, and not number of steps")
|
||||
|
||||
STEP = STEPS[0]
|
||||
SPEED = STEP / scienta_time
|
||||
fly_time = (RANGE[1] - RANGE[0]) / SPEED
|
||||
STEPS = int(fly_time / scienta_time) + 1
|
||||
|
||||
print "speed: ", SPEED
|
||||
print "scan time: ", fly_time
|
||||
cscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, fly_time, RELATIVE, before_read=before_readout, after_read = after_readout, check_positions = False)
|
||||
else:
|
||||
lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout)
|
||||
finally:
|
||||
if ENDSCAN:
|
||||
after_scan()
|
||||
|
||||
Reference in New Issue
Block a user