ISISComputingGroup/IBEX

SCANS: Use bluesky within genie_python

Closed this issue · 3 comments

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

Acceptance Criteria

  • The bluesky requirements are in genie_python, and a simple scan can be run

Extra Information

  • The new scans library will be making use of the framework for scanning that bluesky provides, however it has requirements that are not standard to genie_python, these need to be added
  • This is being included in genie_python rather than being a separate item as this could be used without the rest of the scans library within IBEX setups potentially, and becuase this type of scanning is fundamental to the ways that Reflectometry, SANS, and Muons work, and has potential benefits accross all groups
  • These are additional libraries, no automated tests need to be added, the tests for the scans functions when they are created are better placed for this

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]))

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

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