Skip to content
Snippets Groups Projects
Commit d6eb3da7 authored by Sander Snoo's avatar Sander Snoo
Browse files

Raise exception when t_measure too short to measure anything

parent cfc24443
No related branches found
No related tags found
No related merge requests found
......@@ -772,6 +772,8 @@ class UploadAggregator:
PulsarConfig.align(acquisition.interval))
elif trigger_period:
n_cycles = max(1, iround(t_measure / trigger_period))
if n_cycles < 1:
raise Exception(f'{channel_name} acquisition t_measure < {trigger_period} (1/sample_rate)')
seq.repeated_acquire(t, trigger_period, n_cycles, trigger_period)
else:
seq.acquire(t, t_measure)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment