From 74393cea65276641cb3d4f6bde3e97a3b11465f9 Mon Sep 17 00:00:00 2001 From: yannachen Date: Tue, 26 Mar 2024 17:01:43 -0500 Subject: [PATCH] Ipython startup now adds registry to ipython namespace. --- ipython_startup.py | 4 ++++ src/haven/instrument/power_supply.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ipython_startup.py b/ipython_startup.py index f1278bea..4a38ae14 100644 --- a/ipython_startup.py +++ b/ipython_startup.py @@ -14,6 +14,7 @@ logging.basicConfig(level=logging.WARNING) + # Allow best effort callback to update properly plt.ion() @@ -24,6 +25,9 @@ haven.load_instrument() print(f"Finished initalization in {time.monotonic() - t0:.2f} seconds.") RE = haven.run_engine() + +# Save references to some commonly used things in the global namespace +registry = haven.registry ion_chambers = haven.registry.findall("ion_chambers") # Add metadata to the run engine diff --git a/src/haven/instrument/power_supply.py b/src/haven/instrument/power_supply.py index b7cfa2c3..816767b9 100644 --- a/src/haven/instrument/power_supply.py +++ b/src/haven/instrument/power_supply.py @@ -59,9 +59,6 @@ def load_power_supply_coros(config=None): config = load_config() # Determine if any power supplies are available ps_configs = config.get("power_supply", {}) - from pprint import pprint - - pprint(ps_configs) for name, ps_config in ps_configs.items(): # Do it once for each channel for ch_num in range(1, ps_config["n_channels"] + 1):