atomiq.heros module¶
- atomiq.heros.get_heros()[source]¶
To import heros, we have to play tricks here. Since the artiq worker calls our code in the artiq.master.worker_impl.examine function and afterwards removes the imported modules from sys.modules. The PyO3 used for the python zenoh bindings does not like this since then every subsequent import heros will reinitialize the PyO3 rust extension, leading to the error
PyO3 modules compiled for CPython 3.8 or older may only be initialized once per interpreter process
To work around this, we save a reference to the heros module in the sys module and use this reference if it exists. We use the sys module since it should always exist.
- class atomiq.heros.AtomiqHERO(experiment)[source]¶
Bases:
LocalHERO
- name: str = ''¶
- rid: int = -1¶
- chunksize = -1¶
- property step_counter¶
- property identifier¶
- property steps_total¶
Return the total number of steps. Since this is only available after the prepare stage of the experiment, the method returns -1 if the prepare was not yet run.
- emit_data¶
Descriptor of @event decorated methods of a LocalHERO.