Bridge family · bluesky-ophyd

OpenMHS family: bluesky-ophyd

Classic Ophyd Devices through OphydDriver

Recipe published28 packageshardwaresimulated
On this page 9 sections
  1. Launch
  2. Registry coverage
  3. Applicability
  4. Capability mapping
  5. Safety
  6. Fidelity
  7. Pitfalls
  8. First task cards
  9. Sources

Classic Ophyd Devices through OphydDriver

Generated by MHS/registry/build_registry.py on 2026-10-20T00:00:00Z from 28 registry records and their task cards. A plan, not a conformance claim.

  • bridge_status: available
  • helper: OphydDriver
  • exemplar: MHS/drivers/labs/bcda-aps__apstools

Launch

Every driver package starts the same way; per-repo configuration (environment id, model path, port, baud rate, VISA resource) lives in the package's driver.py, never in launch flags:

text
mhs serve <driver-dir>

A package is done when python3 -m mhs.driver check <driver-dir> --backend fake exits 0 (evidence contract_checked; a fake never yields an MHS-Device level).

Registry coverage

  • Repos: 28
  • Decisions: bridge-runtime 4, family-config 3, reference 7, skip 14
  • Waves: 2: 1, 3: 1, 5: 1, 9: 25
  • Dispatchable now: 0
  • Modes: hardware 7, simulated 5

Applicability

Classic (synchronous) Ophyd Devices: triage rule 9, family:ophyd. OphydDriver is a configuration-only helper over the Python-object bridge. Each field is a Field in parameters plus one signal_bindings entry: signal (a direct Component attribute of the card's entry class), get: True, set (equal to Field.writable), profile, get_kwargs, timeout_ms (1..60000) and source_ref (the path:LINE of the Component assignment). Profiles: classic_epics_v1 (Component(EpicsSignal, ...): get, and a set that waits for its Status), classic_epics_ro_v1 (Component(EpicsSignalRO, ...): get only) and classic_soft_v1 (Component(Signal, ...), get_kwargs {}). Both EPICS profiles read with get(use_monitor=False) and require exactly that get_kwargs. Gate G7 proves each declaration in the pinned source without importing Ophyd, and refuses any other dotted member the fake or the driver touches (OPHYD_UNPROVEN_MEMBER).

The apstools exemplar is a read-only R0 monitor: seven EpicsSignalRO fields of ApsMachineParametersDevice, one observational x-cap capability whose native is the proven current.get, a source-shaped fake and a hardware factory that builds the upstream Device. It shows the declaration grammar, the fake and the facts; it does not demonstrate a write, a Status or a native stop. The Ophyd driver guide gives the complete contract.

Capability mapping

native callOpenMHS targetnotes
Component(EpicsSignal, "PV")a parameters Field and a signal_bindings entry, profile: classic_epics_v1a write calls Signal.set and waits for the returned Status within timeout_ms; raw put is never compiled; every numeric write cites a source line or is Limit.operator_required
Component(EpicsSignalRO, "PV")a get-only binding, profile: classic_epics_ro_v1a fresh get(use_monitor=False); set: True is refused
Component(Signal, ...) (soft signal)a binding with profile: classic_soft_v1the value lives in the Python process, not in an IOC
a read-only Devicea capability: a catalogue read class that fits, else an x-cap read action (commands and actions) whose native is a bound <signal>.getresource reads alone are not a capability; request the x-cap id in RESULT.json
stop(), trigger(), stage(), a positioner's move()commands/actions or safety_bindings, only with source evidence of what the method doesa done Status does not prove that its callbacks ended; no exemplar demonstrates a native stop yet
EPICS engineering unitsField(unit=...) only when the source states the unit, else unit_bindings with an explicit operator option, or no unitnever infer a unit from a PV name
Device construction, wait_for_connection()lifecycle: the native.py factorythe gate never imports it; PV prefixes are deployment data
nested Components, FormattedComponent, DynamicDeviceComponent, custom Signal classes, ophyd-async Devicesnot expressibleG7 reports OPHYD_COMPONENT_SOURCE or OPHYD_IDENTITY_UNRESOLVED: stop blocked with the finding in the notes

Class ids come from python3 -m mhs.driver catalog search <words>. The deprecated classes cap.device.describe.v1, cap.world.state.v1, cap.world.snapshot.v1 and cap.world.restore.v1 are replaced by the protocol methods mhs.devices.get, mhs.resource.read, mhs.snapshot and mhs.restore.

Safety

The risk floor of a device is the highest catalogue risk_class of its classes (CAP-017); a driver may declare a higher risk, never a lower one. Hardware at R1 or above needs a native stop (safety_bindings.estop) and a non-empty safe state. Ophyd Devices front motors, shutters, detectors and high-voltage supplies: risk follows the hazard table of the safety specification, not the card's floor, and a model-authored R2 or R3 package never runs its hardware backend before a human signs reviewed_by. A Device's generic stop() is not evidence that anything physical stopped. EPICS drive limits, validators and PV metadata read at run time are not sourced limits.

Fidelity

A source-shaped fake holds one stand-in object per bound Component that implements only the calls the driver makes (get(use_monitor=...), and set(value) returning a Status for a writable binding); its values are placeholders and it runs no IOC. It yields contract_checked evidence only: Channel Access, PV connection and record processing are not modelled.

Pitfalls

EPICS PV names are deployment-specific; area detectors produce large arrays (NEEDS_ARTIFACTS); startup-script profile collections are not Device classes. A class body with executable statements, decorators, metaclasses, reflection or receiver escapes fails the source proof even when its Components look simple.

First task cards

  • gh.diamondlightsource/dodal: family-config, wave 2, rank 8, MHS/registry/tasks/labs/diamondlightsource__dodal.json
  • gh.bcda-aps/apstools: family-config, wave 3, rank 22, MHS/registry/tasks/labs/bcda-aps__apstools.json
  • gh.bec-project/ophyd_devices: family-config, wave 5, rank 15, MHS/registry/tasks/labs/bec-project__ophyd_devices.json
  • gh.bluesky/ophyd: bridge-runtime, wave 9, rank 46, MHS/registry/tasks/labs/bluesky__ophyd.json
  • gh.bluesky/ophyd-async: bridge-runtime, wave 9, rank 58, MHS/registry/tasks/labs/bluesky__ophyd-async.json

Sources

  • Task cards: MHS/registry/tasks/<track>/<owner>__<repo>.json (schema/taskcard.schema.json).
  • Triage rules and the helper table: MHS/registry/triage.py; curated decisions: MHS/registry/overrides/.
  • Driver API and gate: MHS/sdk/docs/driver-authoring.md; exemplars: MHS/drivers/.
  • Ophyd driver contract and driver authoring.
  • apstools exemplar fake, tests, source facts and result/evidence scope.

Packages

Top 24 of 28 by stars. Filter the full list.

PackageTierRingEvidenceStars
bluesky/ophyd
bluesky/ophyd: repository for microscopy imaging; optics; electronic measurement and DAQ (lab instrumentation track). Op
Tier A3agent read75
bluesky/ophyd-async
bluesky/ophyd-async: repository for microscopy imaging; optics; electronic measurement and DAQ (lab instrumentation trac
Tier A3static scan28
bcda-aps/apstools
bcda-aps/apstools: control framework for general (lab instrumentation track). OpenMHS plan: family-config with OphydDriv
Tier B1contract checked19
pcdshub/typhos
pcdshub/typhos: auxiliary tooling for general (lab instrumentation track). OpenMHS plan: not integrated (skip:tooling).
Tier D3static scan17
diamondlightsource/hyperion
diamondlightsource/hyperion: orchestration/scheduling for physics (lab instrumentation track). OpenMHS plan: reference o
Tier D3static scan6
bluesky/hklpy
bluesky/hklpy: auxiliary tooling for materials (lab instrumentation track). OpenMHS plan: not integrated (skip:tooling).
Tier D3static scan5
bluesky/ophyd-websocket
bluesky/ophyd-websocket: protocol implementation/bridge for general (lab instrumentation track). OpenMHS plan: reference
Tier D3static scan5
cnpem/sophys-common
cnpem/sophys-common: auxiliary tooling for general (lab instrumentation track). OpenMHS plan: not integrated (skip:tooli
Tier D3static scan5
diamondlightsource/dodal
diamondlightsource/dodal: device backend for physics (lab instrumentation track). OpenMHS plan: family-config with Ophyd
Tier B1contract checked5
bluesky/ophyd-tango
bluesky/ophyd-tango: protocol implementation/bridge for general (lab instrumentation track). OpenMHS plan: SDK bridge ru
Tier B3static scan3
bec-project/ophyd_devices
bec-project/ophyd_devices: device backend for general (lab instrumentation track). OpenMHS plan: family-config with Ophy
Tier B3static scan2
klauer/recordwhat
klauer/recordwhat: auxiliary tooling for general (lab instrumentation track). OpenMHS plan: not integrated (skip:tooling
Tier D3static scan2
sampleenvironment/secop-ophyd
sampleenvironment/secop-ophyd: protocol implementation/bridge for materials (lab instrumentation track). OpenMHS plan: S
Tier B3static scan2
bluesky/bluesky-diffraction-demo
bluesky/bluesky-diffraction-demo: repository (lab instrumentation track). OpenMHS plan: not integrated (override:recon).
Tier D3static scan1
aps-ht-hedm/jupyter-ht-hedm
aps-ht-hedm/jupyter-ht-hedm: orchestration/scheduling for materials (lab instrumentation track). OpenMHS plan: reference
Tier D3static scan0
bnl-atf/profile_atf
bnl-atf/profile_atf: auxiliary tooling for optics (lab instrumentation track). OpenMHS plan: not integrated (skip:toolin
Tier D3static scan0
dmgav/ophyd-service
dmgav/ophyd-service: protocol implementation/bridge for general (lab instrumentation track). OpenMHS plan: reference onl
Tier D3static scan0
klauer/ophydocker
klauer/ophydocker: auxiliary tooling for general (lab instrumentation track). OpenMHS plan: not integrated (skip:tooling
Tier D3static scan0
mikehart85/lewis_ophyd_playground
mikehart85/lewis_ophyd_playground: auxiliary tooling for general (lab instrumentation track). OpenMHS plan: not integrat
Tier D3static scan0
natertott/profile_sim
natertott/profile_sim: auxiliary tooling for general (lab instrumentation track). OpenMHS plan: not integrated (skip:too
Tier D3static scan0
nicholasmanha/mock-ophydws
nicholasmanha/mock-ophydws: device backend for general (lab instrumentation track). OpenMHS plan: not integrated (overri
Tier D3static scan0
nsls2/hex-ob
nsls2/hex-ob: orchestration/scheduling for materials (lab instrumentation track). OpenMHS plan: reference only (host). D
Tier D3static scan0
nsls2/hxn-profile-collection
nsls2/hxn-profile-collection: device backend for materials (lab instrumentation track). OpenMHS plan: reference only (ho
Tier D3static scan0
nsls2/ophyd-service
nsls2/ophyd-service: protocol implementation/bridge for general (lab instrumentation track). OpenMHS plan: reference onl
Tier D3static scan0