forked from M-Labs/artiq
1
0
Fork 0

examples/flopping_f_simulation: do not setattr needlessly

This commit is contained in:
Sebastien Bourdeauducq 2015-08-06 18:53:14 +08:00
parent 1f5a49d263
commit 705ec6ba04
1 changed files with 8 additions and 8 deletions

View File

@ -37,16 +37,16 @@ class FloppingF(EnvExperiment):
self.attr_device("scheduler")
def run(self):
self.frequency = self.set_result("flopping_f_frequency", [],
frequency = self.set_result("flopping_f_frequency", [],
realtime=True, store=False)
self.brightness = self.set_result("flopping_f_brightness", [],
brightness = self.set_result("flopping_f_brightness", [],
realtime=True)
self.set_result("flopping_f_fit", [], realtime=True, store=False)
for frequency in self.frequency_scan:
brightness = model(frequency, self.F0) + self.noise_amplitude*random.random()
self.frequency.append(frequency)
self.brightness.append(brightness)
for f in self.frequency_scan:
m_brightness = model(f, self.F0) + self.noise_amplitude*random.random()
frequency.append(f)
brightness.append(m_brightness)
time.sleep(0.1)
self.scheduler.submit(self.scheduler.pipeline_name, self.scheduler.expid,
self.scheduler.priority, time.time() + 20, False)