ISISComputingGroup / ibex_bluesky_core

Core bluesky plan stubs & devices for use at ISIS. Not instrument/technique specific.
https://isiscomputinggroup.github.io/ibex_bluesky_core/
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Consolidate import name spaces #68

Open jackbdoughty opened 3 days ago

jackbdoughty commented 3 days ago

For the test on CRISP our imports ended up looking like this, for relatively simple scans:

from ibex_bluesky_core.callbacks.file_logger import HumanReadableFileCallback
from ibex_bluesky_core.callbacks.fitting import LiveFit
from ibex_bluesky_core.callbacks.fitting.livefit_logger import LiveFitLogger
from ibex_bluesky_core.callbacks.fitting.fitting_utils import Fit, Linear
from ibex_bluesky_core.callbacks.plotting import LivePlot
from ibex_bluesky_core.devices import get_pv_prefix
from ibex_bluesky_core.devices.block import BlockRw, BlockWriteConfig, block_rw
from ibex_bluesky_core.devices.simpledae import SimpleDae
from ibex_bluesky_core.devices.simpledae.controllers import (
    PeriodPerPointController,
    RunPerPointController,
)
from ibex_bluesky_core.devices.simpledae.reducers import MonitorNormalizer
from ibex_bluesky_core.devices.simpledae.waiters import GoodFramesWaiter, PeriodGoodFramesWaiter
from ibex_bluesky_core.run_engine import get_run_engine
from ibex_bluesky_core.callbacks.fitting import fitting_utils as fit

This is a bit verbose, mostly due to having to import things from multiple levels in a hierarchy

Acceptance criteria

Notes

Tom-Willemsen commented 1 day ago

Could also look at flattening out some of our classes a bit / replacing with free functions - e.g. could Gaussian().fit() be just gaussian as a free function?