mirror of https://github.com/m-labs/artiq.git
examples/flopping_f_simulation: do not setattr needlessly
This commit is contained in:
parent
1f5a49d263
commit
705ec6ba04
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue