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") self.attr_device("scheduler")
def run(self): def run(self):
self.frequency = self.set_result("flopping_f_frequency", [], frequency = self.set_result("flopping_f_frequency", [],
realtime=True, store=False) realtime=True, store=False)
self.brightness = self.set_result("flopping_f_brightness", [], brightness = self.set_result("flopping_f_brightness", [],
realtime=True) realtime=True)
self.set_result("flopping_f_fit", [], realtime=True, store=False) self.set_result("flopping_f_fit", [], realtime=True, store=False)
for frequency in self.frequency_scan: for f in self.frequency_scan:
brightness = model(frequency, self.F0) + self.noise_amplitude*random.random() m_brightness = model(f, self.F0) + self.noise_amplitude*random.random()
self.frequency.append(frequency) frequency.append(f)
self.brightness.append(brightness) brightness.append(m_brightness)
time.sleep(0.1) time.sleep(0.1)
self.scheduler.submit(self.scheduler.pipeline_name, self.scheduler.expid, self.scheduler.submit(self.scheduler.pipeline_name, self.scheduler.expid,
self.scheduler.priority, time.time() + 20, False) self.scheduler.priority, time.time() + 20, False)