Script execution
This commit is contained in:
@@ -160,31 +160,35 @@ def trigger_detectors(position, scan):
|
||||
global count_id, image_filename
|
||||
count_time = get_count_time()
|
||||
pix_is_on = pixel in scan.readables
|
||||
mythen.abort()
|
||||
myt_is_on = mythen in scan.readables
|
||||
if myt_is_on:
|
||||
mythen.abort()
|
||||
open_shutter()
|
||||
try:
|
||||
if (count_time != 0):
|
||||
if pix_is_on:
|
||||
pixel.set_expose(count_time)
|
||||
pixel.start()
|
||||
|
||||
if (count_time > 0):
|
||||
mythen.set_acquire_time(count_time)
|
||||
mythen.set_acquire_mode("Single")
|
||||
mythen.start()
|
||||
else:
|
||||
print "Preset monitor counting is not supported\!"
|
||||
|
||||
if myt_is_on:
|
||||
if (count_time > 0):
|
||||
mythen.set_acquire_time(count_time)
|
||||
mythen.set_acquire_mode("Single")
|
||||
mythen.start()
|
||||
else:
|
||||
print "Preset monitor counting is not supported\!"
|
||||
|
||||
if pix_is_on:
|
||||
pixel.wait_finished(10.0)
|
||||
|
||||
i = 0
|
||||
while (mythen.is_acquiring()):
|
||||
time.sleep (0.05)
|
||||
i += 1
|
||||
if (i * 0.05 >= count_time * 2):
|
||||
print "MYTHEN Izero times out, status: " + str(mythen.get_status())
|
||||
break
|
||||
|
||||
if myt_is_on:
|
||||
i = 0
|
||||
while (mythen.is_acquiring()):
|
||||
time.sleep (0.05)
|
||||
i += 1
|
||||
if (i * 0.05 >= count_time * 2):
|
||||
print "MYTHEN Izero times out, status: " + str(mythen.get_status())
|
||||
break
|
||||
|
||||
if pix_is_on:
|
||||
image_filename = pixel.get_image_filename()
|
||||
|
||||
Reference in New Issue
Block a user