Small fix in Experiment class (get_length() rturns correct time when called while in loop.

This commit is contained in:
Joachim Beerwerth 2018-04-06 19:40:06 +02:00
parent 72f1e1c159
commit 89edfcd95d

View File

@ -558,7 +558,8 @@ class Experiment:
#calculate the correct timelength also for unclosed loops, if there is no unclosed loop
#the timelength of this experiment is self.total_time[-1].
for i in range(len(self.total_time)):
timelength += self.total_time[i]*self.loop_iterations[i]
timelength += self.total_time[i]
timelength *= self.loop_iterations[i]
return timelength
@ -602,7 +603,7 @@ def self_test():
e.set_pts_local()
print e.write_xml_string()
print e.get_timelength()
print e.get_length()
if __name__ == '__main__':
self_test()