Skip to content

Releases: bluesky/ophyd-async

v0.12

16 Jul 11:45
864c2c2

Choose a tag to compare

Breaking changes

Flyscanning plan stubs have been deleted

In preparation for flyscanning development, the following have been deleted from ophyd_async.plan_stubs:

  • fly_and_collect. Plans should now use bps.collect_while_completing
  • The prepare_* plan stubs will eventually make their way back here, but only when we've defined a bunch of specific ones to make a generic plan stub out of
  • The convenience *_fly_and_collect_* plan stubs that wrap together the preparing and the flying should be wrapped into a generic plan at a later date

What's Changed

New Contributors

Full Changelog: v0.11...v0.12

v0.11

26 Jun 09:48
5b9e43b

Choose a tag to compare

Notable changes

Child signals named on attach to device

Previously the naming of child signals was inconsistent between those named by passing name in __init__, and those named after the fact using set_name via init_devices or something similar. Now child devices are now named when they are attached to a parent, which means that the super order in __init__ doesn't matter from the perspective of naming. For example:

class Base(Device):
    def __init__(self, name: str = ""):
        self.sig1 = soft_signal_rw(float)
        super().__init__(name=name)

class Derived1(Base):
    def __init__(self, name: str = ""):
        self.sig2 = soft_signal_rw(float)
        super().__init__(name=name)

class Derived2(Base):
    def __init__(self, name: str = ""):
        super().__init__(name=name)
        self.sig2 = soft_signal_rw(float)

Previously:
-If device = Derived1(name="mydevice") then device.sig2.name == "mydevice-sig2"
-If device = Derived2(name="mydevice") then device.sig2.name == ""

Now:

  • device.sig2.name == "mydevice-sig2" in both cases

The canonical way to rename a signal to something different to {parent.name}-{signal_name} is to override set_name, e.g. in motor:

    def set_name(self, name: str, *, child_name_separator: str | None = None) -> None:
        """Set name of the motor and its children."""
        super().set_name(name, child_name_separator=child_name_separator)
        # Readback should be named the same as its parent in read()
        self.user_readback.set_name(name)

Shared FlyMotorInfo for SimMotor and EpicsMotor

# old
from ophyd_async.sim import FlySimMotorInfo
info = FlySimMotorInfo(cv_start=0, cv_end=1, cv_time=0.2)
# new
from ophyd_async.core import FlyMotorInfo
info = FlyMotorInfo(start_position=0, end_position=1, time_for_move=0.2)

or

# old
from ophyd_async.epics import motor
info = motor.FlyMotorInfo(start_position=0, end_position=1, time_for_move=0.2)
# new
from ophyd_async.core import FlyMotorInfo
info = FlyMotorInfo(start_position=0, end_position=1, time_for_move=0.2)

Remove EigerTriggerInfo

# old
from ophyd_async.fastcs.eiger import EigerDetector, EigerTriggerInfo
await det.prepare(
    EigerTriggerInfo(
        number_of_events=1,
        trigger=DetectorTrigger.INTERNAL,
        energy_ev=10000,
    )
)
# new
from ophyd_async.core import TriggerInfo
await det.drv.detector.photon_energy.set(10000)
await det.prepare(
    TriggerInfo(
        number_of_events=1,
        trigger=DetectorTrigger.INTERNAL,
    )
)

What's Changed

New Contributors

Full Changelog: v0.10.1...v0.11

v0.10.1

11 Jun 16:02
4acb229

Choose a tag to compare

What's Changed

Full Changelog: v0.10.0...v0.10.1

v0.10.0

11 Jun 15:09
ce36cf6

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.9.0...v0.10.0

v0.10.0a4

20 May 12:40
1c87084

Choose a tag to compare

v0.10.0a4 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.10.0a3...v0.10.0a4

v0.10.0a3

25 Apr 09:47
a6e46fb

Choose a tag to compare

v0.10.0a3 Pre-release
Pre-release

What's Changed

  • Make length of mocked pvi device vectors a class attribute so it can … by @jwlodek in #845
  • Add test that checks to make sure put completion works for PVA signals by @jwlodek in #846
  • Remove NameProvider by @paula-mg in #842
  • Raise exception when duplicate readable device found in derived class and test by @shihab-dls in #853
  • Support signal_r for one-to-many derived_signal_rw by @coretl in #852
  • Rename multiplier to exposures_per_event and move to first dim of shape by @thomashopkins32 in #726
  • Remove unnecessary _RBV from armed signal PV suffix for PIL by @jwlodek in #861
  • Use fastCS-Eiger Without fastCS-Odin Changes by @shihab-dls in #862
  • Use ADOdin with FastCS-Eiger by @shihab-dls in #863

Full Changelog: v0.10.0a2...v0.10.0a3

v0.10.0a2

28 Mar 14:20
4832416

Choose a tag to compare

v0.10.0a2 Pre-release
Pre-release

What's Changed

  • Allow no alarm_severity in assert_reading by @coretl in #840
  • Support __future__ annotations in derived signal by @coretl in #843

Full Changelog: v0.10.0a1...v0.10.0a2

v0.10.0a1

25 Mar 09:51
d3ea0c9

Choose a tag to compare

v0.10.0a1 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v0.9.0...v0.10.0a1

v0.9.0

10 Feb 17:26
a69d4e2

Choose a tag to compare

Breaking changes since v0.8.0

DeviceCollector renamed to init_device

Functionality is the same, just the name is different

# old
from ophyd_async.core import DeviceCollector
with DeviceCollector():
    ...
# old
from ophyd_async.core import init_devices
with init_devices():
    ...

sim.demo renamed to sim

# old
from ophyd_async.sim.demo import SimMotor
# new
from ophyd_async.sim import SimMotor

AreaDetector support TIFF and JPEG as well as HDF writers

The initialisation arguments for HDF change slightly as a result

from ophyd_async.epics import adaravis
# old
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", hdf_suffix="HDF:")
# new
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", fileio_suffix="HDF:")

Load/Save has been rewritten

Docs for this will follow in the 0.10 production release

mock_puts_blocked is now sync rather than async

# old
async with mock_puts_blocked(sig):
    ...
# old
with mock_puts_blocked(sig):
    ...

All enums are now uppercase, and StrictEnum and SubsetEnum subclasses enforce this.

# old
trigger_mode = DetectorTrigger.internal
image_mode = adcore.ImageMode.multiple
# new
trigger_mode = DetectorTrigger.INTERNAL
image_mode = adcore.ImageMode.MULTIPLE

Testing utils moved to ophyd_async.testing

The following have moved to ophyd_async.testing and should be imported from there:
- assert_configuration
- assert_emitted
- assert_reading
- assert_value
- callback_on_mock_put
- get_mock
- get_mock_put
- mock_puts_blocked
- reset_mock_put_calls
- set_mock_put_proceeds
- set_mock_value
- set_mock_values
- wait_for_pending_wakeups

# old
from ophyd_async.core import set_mock_value
# new
from ophyd_async.testing import set_mock_value

In detail

  • Make mock_puts_blocked a sync contextmanager as it doesn't do any async things by @coretl in #672
  • Update all Enums to UPPER_CASE across the code base by @jennmald in #673
  • Add a hint to PandA if we can't find a block by @coretl in #668
  • Make name separator configurable by @coretl in #675
  • Prevent issues with writing data with software scans by @DiamondJoseph in #685
  • Add new timeout for observe_value by @coretl in #650
  • Ensure motors can be stopped by @Tom-Willemsen in #688
  • adjusted tests to avoid pytest.approx bool comparison by @evalott100 in #689
  • Remove mailmap by @coretl in #690
  • Allow for fields w/ epics_signal_rw_rbv, also support long strings/waveforms with PVA backend. by @jwlodek in #682
  • Add Python 3.12 to CI now that p4p is updated by @OCopping in #655
  • fixed bad logic introducted to test_observe by @evalott100 in #692
  • Fix SimMotor watcher output direction by @coretl in #670
  • Move testing utils from core to testing by @coretl in #695
  • Update copier template to 2.6.0 by @coretl in #698
  • Faster tango tests by @jsouter in #684
  • 618 assert statements broken in tests by @Relm-Arrowny in #702
  • Improve import linting by @coretl in #704
  • Switch from intelligent save to intelligent load by @coretl in #697
  • Reimplement DeviceCollector as init_devices by @coretl in #705
  • Move contents of sim by @coretl in #708
  • Move make_detector to conftest.py and make it a fixture by @thomashopkins32 in #716
  • Rewrite EPICS signal tests by @coretl in #714
  • Split out common AD file plugin logic into core writer class, create ADTiffWriter by @jwlodek in #606
  • Convert float prec 0 pvs to int on request by @coretl in #718
  • Add queue size signal to base AD plugin IO class by @jwlodek in #725
  • Sync files with new version of ruff by @thomashopkins32 in #731
  • fixed persistent tasks by @evalott100 in #730
  • use ophyd async logger for logging.debug statements by @rerpha in #686
  • Remove assert in production code by @kivel in #728
  • Add areaDetector JPEG writer by @jwlodek in #720
  • Expand assert_* functions to work with all signal types by @jsouter in #711
  • Widen Array1D to fix changes to numpy shape by @coretl in #736
  • Add embed scene for set_and_wait_for svg by @ZohebShaikh in #745
  • Adding offset signal for epics motor by @jwlodek in #746
  • Port andor new ad format by @jwlodek in #724
  • Update to offer more helpful error message if str fallback is used wi… by @jwlodek in #752
  • Add doc string to SubsetEnumMeta dunder by @shihab-dls in #749
  • Remove unnecessary attribute from hdf writer by @jwlodek in #756

New Contributors

Full Changelog: v0.8.0...v0.9.0

v0.9.0a2

24 Jan 10:30
d5bb776

Choose a tag to compare

v0.9.0a2 Pre-release
Pre-release

Breaking changes

DeviceCollector renamed to init_device

Functionality is the same, just the name is different

# old
from ophyd_async.core import DeviceCollector
with DeviceCollector():
    ...
# old
from ophyd_async.core import init_devices
with init_devices():
    ...

sim.demo renamed to sim

# old
from ophyd_async.sim.demo import SimMotor
# new
from ophyd_async.sim import SimMotor

AreaDetector support TIFF and JPEG as well as HDF writers

The initialisation arguments for HDF change slightly as a result

from ophyd_async.epics import adaravis
# old
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", hdf_suffix="HDF:")
# new
det = adaravis.AravisDetector(prefix, path_provider, drv_suffix="CAM:", fileio_suffix="HDF:")

Load/Save has been rewritten

Docs for this will follow in the 0.9 production release

In detail

  • 618 assert statements broken in tests by @Relm-Arrowny in #702
  • Improve import linting by @coretl in #704
  • Switch from intelligent save to intelligent load by @coretl in #697
  • Reimplement DeviceCollector as init_devices by @coretl in #705
  • Move contents of sim by @coretl in #708
  • Move make_detector to conftest.py and make it a fixture by @thomashopkins32 in #716
  • Rewrite EPICS signal tests by @coretl in #714
  • Split out common AD file plugin logic into core writer class, create ADTiffWriter by @jwlodek in #606
  • Convert float prec 0 pvs to int on request by @coretl in #718
  • Add queue size signal to base AD plugin IO class by @jwlodek in #725
  • Sync files with new version of ruff by @thomashopkins32 in #731
  • fixed persistent tasks by @evalott100 in #730
  • use ophyd async logger for logging.debug statements by @rerpha in #686
  • Remove assert in production code by @kivel in #728
  • Add areaDetector JPEG writer by @jwlodek in #720
  • Expand assert_* functions to work with all signal types by @jsouter in #711
  • Widen Array1D to fix changes to numpy shape by @coretl in #736
  • Add embed scene for set_and_wait_for svg by @ZohebShaikh in #745
  • Adding offset signal for epics motor by @jwlodek in #746
  • Port andor new ad format by @jwlodek in #724

New Contributors

  • @thomashopkins32 made their first contribution in #716
  • @kivel made their first contribution in #728

Full Changelog: v0.9.0a1...v0.9.0a2