2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

master,run: automatically call analyze function

This commit is contained in:
Sebastien Bourdeauducq 2015-02-19 09:40:15 -07:00
parent 5bb6a3d8a6
commit 9ffc370416
3 changed files with 4 additions and 1 deletions

View File

@ -113,6 +113,8 @@ def main():
unit_inst = unit(dbh, **arguments)
unit_inst.run()
if hasattr(unit_inst, "analyze"):
unit_inst.analyze()
if args.hdf5 is not None:
f = h5py.File(args.hdf5, "w")

View File

@ -94,6 +94,8 @@ def run(obj):
try:
unit_inst = unit(dbh, **obj["arguments"])
unit_inst.run()
if hasattr(unit_inst, "analyze"):
unit_inst.analyze()
except Exception:
put_object({"action": "report_completed",
"status": "failed",

View File

@ -52,7 +52,6 @@ class FloppingF(AutoDB):
self.frequency.append(frequency)
self.brightness.append(brightness)
time.sleep(0.1)
self.analyze()
def analyze(self):
popt, pcov = curve_fit(model_numpy,