You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a quick question regarding an issue I encountered while running our long-term experiments with the RedPitaya. When I increase the number of timepoints to e.g. 25000, the executor.PrepareActions function generating the action table takes a few seconds to finish. However, since there is no signal to read back, the code continues running, and I get an error that there are no images yet. While I could add some sleeping time and increase my timeout, I am wondering if there is a way to receive a signal once PrepareActions is finished.
I have included the code I am running below. Any help or comments would be much appreciated!
Also, I have a practical question: how do I stop the RedPitaya execution during an acquisition?
Hi all,
I have a quick question regarding an issue I encountered while running our long-term experiments with the RedPitaya. When I increase the number of timepoints to e.g. 25000, the executor.PrepareActions function generating the action table takes a few seconds to finish. However, since there is no signal to read back, the code continues running, and I get an error that there are no images yet. While I could add some sleeping time and increase my timeout, I am wondering if there is a way to receive a signal once PrepareActions is finished.
I have included the code I am running below. Any help or comments would be much appreciated!
Also, I have a practical question: how do I stop the RedPitaya execution during an acquisition?
Thank you in advance!
`N_TIMEPOINTS = 20000
EXECUTOR_URI = 'PYRO:[email protected]:8005'
executor = Pyro4.Proxy(EXECUTOR_URI)
actions = []
running_time = 0.0
for light_name, emitting_time in LIGHT_TO_EXPOSURE:
filtermask = FILTER_TO_EXECUTOR_LINE[light_name] | FILTERSTEP_EXECUTOR_LINE
action = (running_time, (filtermask, [0, 0]))
actions.append(action)
running_time += 70
lasermask = LIGHT_TO_EXECUTOR_LINE[light_name] | CAMERA_EXECUTOR_LINE
action = (running_time, (lasermask, [0, 0]))
actions.append(action)
running_time += emitting_time
action = (running_time, (0, [0, 0]))
actions.append(action)
running_time += camera.get_cycle_time() * 1000 #camera read out time
action = (running_time, (0, [0, 0]))
actions.append(action)# wait before start next repetition
executor.PrepareActions(actions, N_TIMEPOINTS)
time.sleep(15)
thread = threading.Thread(target=executor.RunActions)
thread.start()
n_acquired = 0
expected_images = len(LIGHT_TO_EXPOSURE) * N_TIMEPOINTS
timeout = (max_emission_time / 1000.0)+15
t_acc = 0
while n_acquired < expected_images:
im = camera_buffer.get(timeout = timeout)
path = TIFF_PATH + 'im%s'%n_acquired +'.tif'
tifffile.imwrite(path, im)
n_acquired = n_acquired + 1
thread.join()
time.sleep(5)`
The text was updated successfully, but these errors were encountered: