Skip to content

Commit ccd4779

Browse files
committed
Changed error message displays to be clearer.
1 parent abaf4c9 commit ccd4779

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

application.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,14 @@ def experiment(self):
535535
pulse[BNC.DELAY] = pulse.experimentTuple[BNC.DELAY].get()
536536
pulse[BNC.WIDTH] = pulse.experimentTuple[BNC.WIDTH].get()
537537
pulse[BNC.STATE] = pulse.experimentTuple[BNC.STATE].get()
538-
assert(p_N_d*float(pulse.experimentTuple[BNC.dPHASE].get()) < p_T)
538+
total_time_used = p_N_d*float(
539+
pulse.experimentTuple[BNC.dPHASE].get())
540+
if total_time_used >= p_T:
541+
raise AssertionError(
542+
"Experiment time to short. Pulse nr {}".
543+
format(pulse.number)
544+
+ " uses {}s but {}s were allocated.".format(
545+
total_time_used, p_T))
539546

540547
self.avh.prepareAll(p_T, True, p_N_c)
541548
totalSpectras = []

0 commit comments

Comments
 (0)