ISISComputingGroup / IBEX

Top level repository for IBEX stories
4 stars 2 forks source link

SCANS: Use bluesky within genie_python #8351

Closed KathrynBaker closed 1 month ago

KathrynBaker commented 1 month ago

As someone using the new scans library I want to be able to use bluesky and ophyd natively in genie_python.

Acceptance Criteria

Extra Information

How to Test

  1. Build genie_python with the new requirements.txt
  2. The following code should then pass giving a table with the beam current at that time:
    
    from ophyd.signal import EpicsSignal
    test = EpicsSignal("AC:TS1:BEAM:CURR", name="test")

from bluesky import RunEngine from bluesky.callbacks import LiveTable RE = RunEngine() token = RE.subscribe(LiveTable(["test", "x"]))

from bluesky.plans import count RE(count([test]))

KathrynBaker commented 1 month ago

A count is about the simplest scan that bluesky provides, and a single reading is as simple as it gets. Note that this uses ophyd to create a link to a PV, before using bluesky to run a simple scan

KathrynBaker commented 1 month ago

Pull requests: https://github.com/ISISComputingGroup/genie_python/pull/408 https://github.com/ISISComputingGroup/IBEX/pull/8352

KathrynBaker commented 1 month ago

Note to the reviewer, the branch build on Jenkins has failed copying things after the build rather than anything within the changes in question.