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

Added check on t_measure vs sample rate

parent b83346ce
No related branches found
No related tags found
No related merge requests found
......@@ -791,9 +791,9 @@ class UploadAggregator:
if acq_conf.sample_rate is not None:
logging.info(f'Acquisition sample_rate is ignored when n_repeat is set')
elif trigger_period:
n_cycles = max(1, iround(t_measure / trigger_period))
n_cycles = iround(t_measure / trigger_period)
if n_cycles < 1:
raise Exception(f'{channel_name} acquisition t_measure < {trigger_period} (1/sample_rate)')
raise Exception(f'{channel_name} acquisition t_measure ({t_measure}) < 1/sample_rate ({trigger_period})')
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