ophyd-async 0.10.1__py3-none-any.whl → 0.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ophyd_async/_version.py +2 -2
- ophyd_async/core/__init__.py +12 -1
- ophyd_async/core/_derived_signal.py +68 -22
- ophyd_async/core/_derived_signal_backend.py +46 -24
- ophyd_async/core/_detector.py +3 -3
- ophyd_async/core/_device.py +24 -16
- ophyd_async/core/_flyer.py +35 -1
- ophyd_async/core/_hdf_dataset.py +11 -10
- ophyd_async/core/_signal.py +43 -28
- ophyd_async/core/_table.py +3 -3
- ophyd_async/core/_utils.py +25 -0
- ophyd_async/core/_yaml_settings.py +3 -3
- ophyd_async/epics/adandor/__init__.py +7 -1
- ophyd_async/epics/adandor/_andor_controller.py +5 -8
- ophyd_async/epics/adandor/_andor_io.py +12 -19
- ophyd_async/epics/adcore/_hdf_writer.py +12 -19
- ophyd_async/epics/eiger/_odin_io.py +4 -2
- ophyd_async/epics/motor.py +46 -96
- ophyd_async/epics/pmac/__init__.py +3 -0
- ophyd_async/epics/pmac/_pmac_io.py +100 -0
- ophyd_async/fastcs/eiger/__init__.py +1 -2
- ophyd_async/fastcs/eiger/_eiger.py +3 -9
- ophyd_async/fastcs/panda/_trigger.py +4 -4
- ophyd_async/fastcs/panda/_writer.py +15 -13
- ophyd_async/sim/__init__.py +1 -2
- ophyd_async/sim/_blob_detector_writer.py +6 -12
- ophyd_async/sim/_mirror_horizontal.py +3 -2
- ophyd_async/sim/_mirror_vertical.py +1 -0
- ophyd_async/sim/_motor.py +13 -43
- {ophyd_async-0.10.1.dist-info → ophyd_async-0.11.dist-info}/METADATA +2 -2
- {ophyd_async-0.10.1.dist-info → ophyd_async-0.11.dist-info}/RECORD +34 -32
- {ophyd_async-0.10.1.dist-info → ophyd_async-0.11.dist-info}/WHEEL +0 -0
- {ophyd_async-0.10.1.dist-info → ophyd_async-0.11.dist-info}/licenses/LICENSE +0 -0
- {ophyd_async-0.10.1.dist-info → ophyd_async-0.11.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
from collections.abc import Sequence
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
from ophyd_async.core import Array1D, Device, DeviceVector, StandardReadable
|
|
6
|
+
from ophyd_async.epics.core import epics_signal_r, epics_signal_rw
|
|
7
|
+
|
|
8
|
+
CS_LETTERS = "ABCUVWXYZ"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PmacTrajectoryIO(StandardReadable):
|
|
12
|
+
"""Device that moves a PMAC Motor record."""
|
|
13
|
+
|
|
14
|
+
def __init__(self, prefix: str, name: str = "") -> None:
|
|
15
|
+
self.time_array = epics_signal_rw(
|
|
16
|
+
Array1D[np.float64], prefix + ":ProfileTimeArray"
|
|
17
|
+
)
|
|
18
|
+
self.user_array = epics_signal_rw(Array1D[np.int32], prefix + ":UserArray")
|
|
19
|
+
# 1 indexed CS axes so we can index into them from the compound motor input link
|
|
20
|
+
self.positions = DeviceVector(
|
|
21
|
+
{
|
|
22
|
+
i + 1: epics_signal_rw(
|
|
23
|
+
Array1D[np.float64], f"{prefix}:{letter}:Positions"
|
|
24
|
+
)
|
|
25
|
+
for i, letter in enumerate(CS_LETTERS)
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
self.use_axis = DeviceVector(
|
|
29
|
+
{
|
|
30
|
+
i + 1: epics_signal_rw(bool, f"{prefix}:{letter}:UseAxis")
|
|
31
|
+
for i, letter in enumerate(CS_LETTERS)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
self.velocities = DeviceVector(
|
|
35
|
+
{
|
|
36
|
+
i + 1: epics_signal_rw(
|
|
37
|
+
Array1D[np.float64], f"{prefix}:{letter}:Velocities"
|
|
38
|
+
)
|
|
39
|
+
for i, letter in enumerate(CS_LETTERS)
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
self.points_to_build = epics_signal_rw(int, prefix + ":ProfilePointsToBuild")
|
|
43
|
+
self.build_profile = epics_signal_rw(bool, prefix + ":ProfileBuild")
|
|
44
|
+
self.execute_profile = epics_signal_rw(bool, prefix + ":ProfileExecute")
|
|
45
|
+
self.scan_percent = epics_signal_r(float, prefix + ":TscanPercent_RBV")
|
|
46
|
+
self.abort_profile = epics_signal_rw(bool, prefix + ":ProfileAbort")
|
|
47
|
+
self.profile_cs_name = epics_signal_rw(str, prefix + ":ProfileCsName")
|
|
48
|
+
self.calculate_velocities = epics_signal_rw(bool, prefix + ":ProfileCalcVel")
|
|
49
|
+
|
|
50
|
+
super().__init__(name=name)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class PmacAxisIO(Device):
|
|
54
|
+
"""A Device that (direct) moves a PMAC Coordinate System Motor.
|
|
55
|
+
|
|
56
|
+
Note that this does not go through a motor record.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
def __init__(self, prefix: str, name: str = "") -> None:
|
|
60
|
+
self.cs_axis_letter = epics_signal_r(str, f"{prefix}:CsAxis_RBV")
|
|
61
|
+
self.cs_port = epics_signal_r(str, f"{prefix}:CsPort_RBV")
|
|
62
|
+
super().__init__(name=name)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class PmacCoordIO(Device):
|
|
66
|
+
"""A Device that represents a Pmac Coordinate System."""
|
|
67
|
+
|
|
68
|
+
def __init__(self, prefix: str, name: str = "") -> None:
|
|
69
|
+
self.defer_moves = epics_signal_r(bool, f"{prefix}:DeferMoves")
|
|
70
|
+
self.cs_axis_setpoint = DeviceVector(
|
|
71
|
+
{
|
|
72
|
+
i + 1: epics_signal_rw(
|
|
73
|
+
Array1D[np.float64], f"{prefix}:M{i + 1}:DirectDemand"
|
|
74
|
+
)
|
|
75
|
+
for i in range(len(CS_LETTERS))
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
super().__init__(name=name)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class PmacIO(Device):
|
|
82
|
+
"""Device that represents a pmac controller."""
|
|
83
|
+
|
|
84
|
+
def __init__(
|
|
85
|
+
self,
|
|
86
|
+
prefix: str,
|
|
87
|
+
axis_nums: Sequence[int],
|
|
88
|
+
coord_nums: Sequence[int],
|
|
89
|
+
name: str = "",
|
|
90
|
+
) -> None:
|
|
91
|
+
self.axis = DeviceVector(
|
|
92
|
+
{axis: PmacAxisIO(f"{prefix}:M{axis}") for axis in axis_nums}
|
|
93
|
+
)
|
|
94
|
+
self.coord = DeviceVector(
|
|
95
|
+
{coord: PmacCoordIO(f"{prefix}:CS{coord}") for coord in coord_nums}
|
|
96
|
+
)
|
|
97
|
+
# Trajectory PVs have the same prefix as the pmac device
|
|
98
|
+
self.trajectory = PmacTrajectoryIO(prefix)
|
|
99
|
+
|
|
100
|
+
super().__init__(name=name)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from ._eiger import EigerDetector
|
|
1
|
+
from ._eiger import EigerDetector
|
|
2
2
|
from ._eiger_controller import EigerController
|
|
3
3
|
from ._eiger_io import EigerDetectorIO, EigerDriverIO, EigerMonitorIO, EigerStreamIO
|
|
4
4
|
|
|
@@ -6,7 +6,6 @@ __all__ = [
|
|
|
6
6
|
"EigerDetector",
|
|
7
7
|
"EigerController",
|
|
8
8
|
"EigerDriverIO",
|
|
9
|
-
"EigerTriggerInfo",
|
|
10
9
|
"EigerDetectorIO",
|
|
11
10
|
"EigerMonitorIO",
|
|
12
11
|
"EigerStreamIO",
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
|
|
3
1
|
from ophyd_async.core import (
|
|
4
2
|
AsyncStatus,
|
|
5
3
|
PathProvider,
|
|
@@ -12,10 +10,6 @@ from ._eiger_controller import EigerController
|
|
|
12
10
|
from ._eiger_io import EigerDriverIO
|
|
13
11
|
|
|
14
12
|
|
|
15
|
-
class EigerTriggerInfo(TriggerInfo):
|
|
16
|
-
energy_ev: float = Field(gt=0)
|
|
17
|
-
|
|
18
|
-
|
|
19
13
|
class EigerDetector(StandardDetector):
|
|
20
14
|
"""Ophyd-async implementation of an Eiger Detector."""
|
|
21
15
|
|
|
@@ -28,10 +22,11 @@ class EigerDetector(StandardDetector):
|
|
|
28
22
|
path_provider: PathProvider,
|
|
29
23
|
drv_suffix="-EA-EIGER-01:",
|
|
30
24
|
hdf_suffix="-EA-EIGER-01:OD:",
|
|
25
|
+
odin_nodes: int = 4,
|
|
31
26
|
name="",
|
|
32
27
|
):
|
|
33
28
|
self.drv = EigerDriverIO(prefix + drv_suffix)
|
|
34
|
-
self.odin = Odin(prefix + hdf_suffix)
|
|
29
|
+
self.odin = Odin(prefix + hdf_suffix, nodes=odin_nodes)
|
|
35
30
|
|
|
36
31
|
super().__init__(
|
|
37
32
|
EigerController(self.drv),
|
|
@@ -44,6 +39,5 @@ class EigerDetector(StandardDetector):
|
|
|
44
39
|
)
|
|
45
40
|
|
|
46
41
|
@AsyncStatus.wrap
|
|
47
|
-
async def prepare(self, value:
|
|
48
|
-
await self._controller.set_energy(value.energy_ev)
|
|
42
|
+
async def prepare(self, value: TriggerInfo) -> None:
|
|
49
43
|
await super().prepare(value)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
|
|
3
|
-
from pydantic import
|
|
3
|
+
from pydantic import Field
|
|
4
4
|
|
|
5
|
-
from ophyd_async.core import FlyerController, wait_for_value
|
|
5
|
+
from ophyd_async.core import ConfinedModel, FlyerController, wait_for_value
|
|
6
6
|
|
|
7
7
|
from ._block import (
|
|
8
8
|
PandaBitMux,
|
|
@@ -14,7 +14,7 @@ from ._block import (
|
|
|
14
14
|
from ._table import SeqTable
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class SeqTableInfo(
|
|
17
|
+
class SeqTableInfo(ConfinedModel):
|
|
18
18
|
"""Info for the PandA `SeqTable` for flyscanning."""
|
|
19
19
|
|
|
20
20
|
sequence_table: SeqTable = Field(strict=True)
|
|
@@ -51,7 +51,7 @@ class StaticSeqTableTriggerLogic(FlyerController[SeqTableInfo]):
|
|
|
51
51
|
await wait_for_value(self.seq.active, False, timeout=1)
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
class PcompInfo(
|
|
54
|
+
class PcompInfo(ConfinedModel):
|
|
55
55
|
"""Info for the PandA `PcompBlock` for flyscanning."""
|
|
56
56
|
|
|
57
57
|
start_postion: int = Field(description="start position in counts")
|
|
@@ -33,12 +33,12 @@ class PandaHDFWriter(DetectorWriter):
|
|
|
33
33
|
|
|
34
34
|
# Triggered on PCAP arm
|
|
35
35
|
async def open(self, name: str, exposures_per_event: int = 1) -> dict[str, DataKey]:
|
|
36
|
+
self._composer = None
|
|
36
37
|
"""Retrieve and get descriptor of all PandA signals marked for capture."""
|
|
37
38
|
self._exposures_per_event = exposures_per_event
|
|
38
39
|
# Ensure flushes are immediate
|
|
39
40
|
await self.panda_data_block.flush_period.set(0)
|
|
40
41
|
|
|
41
|
-
self._composer = None
|
|
42
42
|
info = self._path_provider(device_name=name)
|
|
43
43
|
|
|
44
44
|
# Set create dir depth first to guarantee that callback when setting
|
|
@@ -64,7 +64,15 @@ class PandaHDFWriter(DetectorWriter):
|
|
|
64
64
|
# Wait for it to start, stashing the status that tells us when it finishes
|
|
65
65
|
await self.panda_data_block.capture.set(True)
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
describe = await self._describe(name)
|
|
68
|
+
|
|
69
|
+
self._composer = HDFDocumentComposer(
|
|
70
|
+
Path(await self.panda_data_block.hdf_directory.get_value())
|
|
71
|
+
/ Path(await self.panda_data_block.hdf_file_name.get_value()),
|
|
72
|
+
self._datasets,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return describe
|
|
68
76
|
|
|
69
77
|
async def _describe(self, name: str) -> dict[str, DataKey]:
|
|
70
78
|
"""Return a describe based on the datasets PV."""
|
|
@@ -145,17 +153,11 @@ class PandaHDFWriter(DetectorWriter):
|
|
|
145
153
|
self, name: str, indices_written: int
|
|
146
154
|
) -> AsyncIterator[StreamAsset]:
|
|
147
155
|
# TODO: fail if we get dropped frames
|
|
148
|
-
if
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
self._datasets,
|
|
154
|
-
)
|
|
155
|
-
for doc in self._composer.stream_resources():
|
|
156
|
-
yield "stream_resource", doc
|
|
157
|
-
for doc in self._composer.stream_data(indices_written):
|
|
158
|
-
yield "stream_datum", doc
|
|
156
|
+
if self._composer is None:
|
|
157
|
+
msg = f"open() not called on {self}"
|
|
158
|
+
raise RuntimeError(msg)
|
|
159
|
+
for doc in self._composer.make_stream_docs(indices_written):
|
|
160
|
+
yield doc
|
|
159
161
|
|
|
160
162
|
# Could put this function as default for StandardDetector
|
|
161
163
|
async def close(self):
|
ophyd_async/sim/__init__.py
CHANGED
|
@@ -8,14 +8,13 @@ from ._mirror_vertical import (
|
|
|
8
8
|
TwoJackTransform,
|
|
9
9
|
VerticalMirror,
|
|
10
10
|
)
|
|
11
|
-
from ._motor import
|
|
11
|
+
from ._motor import SimMotor
|
|
12
12
|
from ._pattern_generator import PatternGenerator
|
|
13
13
|
from ._point_detector import SimPointDetector
|
|
14
14
|
from ._stage import SimStage
|
|
15
15
|
|
|
16
16
|
__all__ = [
|
|
17
17
|
"SimMotor",
|
|
18
|
-
"FlySimMotorInfo",
|
|
19
18
|
"SimStage",
|
|
20
19
|
"PatternGenerator",
|
|
21
20
|
"SimPointDetector",
|
|
@@ -52,7 +52,7 @@ class BlobDetectorWriter(DetectorWriter):
|
|
|
52
52
|
chunk_shape=(1024,),
|
|
53
53
|
),
|
|
54
54
|
]
|
|
55
|
-
self.composer =
|
|
55
|
+
self.composer = HDFDocumentComposer(self.path, self.datasets)
|
|
56
56
|
describe = {
|
|
57
57
|
ds.data_key: DataKey(
|
|
58
58
|
source="sim://pattern-generator-hdf-file",
|
|
@@ -85,17 +85,11 @@ class BlobDetectorWriter(DetectorWriter):
|
|
|
85
85
|
self, name: str, indices_written: int
|
|
86
86
|
) -> AsyncIterator[StreamAsset]:
|
|
87
87
|
# When we have written something to the file
|
|
88
|
-
if
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
raise RuntimeError(f"open() not called on {self}")
|
|
94
|
-
self.composer = HDFDocumentComposer(self.path, self.datasets)
|
|
95
|
-
for doc in self.composer.stream_resources():
|
|
96
|
-
yield "stream_resource", doc
|
|
97
|
-
for doc in self.composer.stream_data(indices_written):
|
|
98
|
-
yield "stream_datum", doc
|
|
88
|
+
if self.composer is None:
|
|
89
|
+
msg = f"open() not called on {self}"
|
|
90
|
+
raise RuntimeError(msg)
|
|
91
|
+
for doc in self.composer.make_stream_docs(indices_written):
|
|
92
|
+
yield doc
|
|
99
93
|
|
|
100
94
|
async def close(self) -> None:
|
|
101
95
|
self.pattern_generator.close_file()
|
|
@@ -3,7 +3,7 @@ from typing import TypedDict
|
|
|
3
3
|
|
|
4
4
|
from bluesky.protocols import Movable
|
|
5
5
|
|
|
6
|
-
from ophyd_async.core import AsyncStatus, DerivedSignalFactory, Device
|
|
6
|
+
from ophyd_async.core import AsyncStatus, DerivedSignalFactory, Device
|
|
7
7
|
|
|
8
8
|
from ._mirror_vertical import TwoJackDerived, TwoJackTransform
|
|
9
9
|
from ._motor import SimMotor
|
|
@@ -20,7 +20,8 @@ class HorizontalMirror(Device, Movable):
|
|
|
20
20
|
self.x1 = SimMotor()
|
|
21
21
|
self.x2 = SimMotor()
|
|
22
22
|
# Parameter
|
|
23
|
-
|
|
23
|
+
# This could also be set as 'soft_signal_rw(float, initial_value=1)'
|
|
24
|
+
self.x1_x2_distance = 1.0
|
|
24
25
|
# Derived signals
|
|
25
26
|
self._factory = DerivedSignalFactory(
|
|
26
27
|
TwoJackTransform,
|
|
@@ -51,6 +51,7 @@ class VerticalMirror(Device, Movable[TwoJackDerived]):
|
|
|
51
51
|
self.y1 = SimMotor()
|
|
52
52
|
self.y2 = SimMotor()
|
|
53
53
|
# Parameter
|
|
54
|
+
# This could also be set as '1.0', if constant.
|
|
54
55
|
self.y1_y2_distance = soft_signal_rw(float, initial_value=1)
|
|
55
56
|
# Derived signals
|
|
56
57
|
self._factory = DerivedSignalFactory(
|
ophyd_async/sim/_motor.py
CHANGED
|
@@ -4,14 +4,15 @@ import time
|
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
from bluesky.protocols import Locatable, Location, Reading, Stoppable, Subscribable
|
|
7
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
8
7
|
|
|
9
8
|
from ophyd_async.core import (
|
|
10
9
|
AsyncStatus,
|
|
11
10
|
Callback,
|
|
11
|
+
FlyMotorInfo,
|
|
12
12
|
StandardReadable,
|
|
13
13
|
WatchableAsyncStatus,
|
|
14
14
|
WatcherUpdate,
|
|
15
|
+
error_if_none,
|
|
15
16
|
observe_value,
|
|
16
17
|
soft_signal_r_and_setter,
|
|
17
18
|
soft_signal_rw,
|
|
@@ -19,37 +20,6 @@ from ophyd_async.core import (
|
|
|
19
20
|
from ophyd_async.core import StandardReadableFormat as Format
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
class FlySimMotorInfo(BaseModel):
|
|
23
|
-
"""Minimal set of information required to fly a [](#SimMotor)."""
|
|
24
|
-
|
|
25
|
-
model_config = ConfigDict(frozen=True)
|
|
26
|
-
|
|
27
|
-
cv_start: float
|
|
28
|
-
"""Absolute position of the motor once it finishes accelerating to desired
|
|
29
|
-
velocity, in motor EGUs"""
|
|
30
|
-
|
|
31
|
-
cv_end: float
|
|
32
|
-
"""Absolute position of the motor once it begins decelerating from desired
|
|
33
|
-
velocity, in EGUs"""
|
|
34
|
-
|
|
35
|
-
cv_time: float = Field(gt=0)
|
|
36
|
-
"""Time taken for the motor to get from start_position to end_position, excluding
|
|
37
|
-
run-up and run-down, in seconds."""
|
|
38
|
-
|
|
39
|
-
@property
|
|
40
|
-
def velocity(self) -> float:
|
|
41
|
-
"""Calculate the velocity of the constant velocity phase."""
|
|
42
|
-
return (self.cv_end - self.cv_start) / self.cv_time
|
|
43
|
-
|
|
44
|
-
def start_position(self, acceleration_time: float) -> float:
|
|
45
|
-
"""Calculate the start position with run-up distance added on."""
|
|
46
|
-
return self.cv_start - acceleration_time * self.velocity / 2
|
|
47
|
-
|
|
48
|
-
def end_position(self, acceleration_time: float) -> float:
|
|
49
|
-
"""Calculate the end position with run-down distance added on."""
|
|
50
|
-
return self.cv_end + acceleration_time * self.velocity / 2
|
|
51
|
-
|
|
52
|
-
|
|
53
23
|
class SimMotor(StandardReadable, Stoppable, Subscribable[float], Locatable[float]):
|
|
54
24
|
"""For usage when simulating a motor."""
|
|
55
25
|
|
|
@@ -74,7 +44,7 @@ class SimMotor(StandardReadable, Stoppable, Subscribable[float], Locatable[float
|
|
|
74
44
|
self._set_success = True
|
|
75
45
|
self._move_status: AsyncStatus | None = None
|
|
76
46
|
# Stored in prepare
|
|
77
|
-
self._fly_info:
|
|
47
|
+
self._fly_info: FlyMotorInfo | None = None
|
|
78
48
|
# Set on kickoff(), complete when motor reaches end position
|
|
79
49
|
self._fly_status: WatchableAsyncStatus | None = None
|
|
80
50
|
|
|
@@ -86,12 +56,14 @@ class SimMotor(StandardReadable, Stoppable, Subscribable[float], Locatable[float
|
|
|
86
56
|
self.user_readback.set_name(name)
|
|
87
57
|
|
|
88
58
|
@AsyncStatus.wrap
|
|
89
|
-
async def prepare(self, value:
|
|
59
|
+
async def prepare(self, value: FlyMotorInfo):
|
|
90
60
|
"""Calculate run-up and move there, setting fly velocity when there."""
|
|
91
61
|
self._fly_info = value
|
|
92
62
|
# Move to start as fast as we can
|
|
93
63
|
await self.velocity.set(0)
|
|
94
|
-
await self.set(
|
|
64
|
+
await self.set(
|
|
65
|
+
value.ramp_up_start_pos(await self.acceleration_time.get_value())
|
|
66
|
+
)
|
|
95
67
|
# Set the velocity for the actual move
|
|
96
68
|
await self.velocity.set(value.velocity)
|
|
97
69
|
|
|
@@ -111,20 +83,18 @@ class SimMotor(StandardReadable, Stoppable, Subscribable[float], Locatable[float
|
|
|
111
83
|
@AsyncStatus.wrap
|
|
112
84
|
async def kickoff(self):
|
|
113
85
|
"""Begin moving motor from prepared position to final position."""
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
86
|
+
fly_info = error_if_none(
|
|
87
|
+
self._fly_info, "Motor must be prepared before attempting to kickoff"
|
|
88
|
+
)
|
|
117
89
|
acceleration_time = await self.acceleration_time.get_value()
|
|
118
|
-
self._fly_status = self.set(
|
|
90
|
+
self._fly_status = self.set(fly_info.ramp_down_end_pos(acceleration_time))
|
|
119
91
|
# Wait for the acceleration time to ensure we are at velocity
|
|
120
92
|
await asyncio.sleep(acceleration_time)
|
|
121
93
|
|
|
122
94
|
def complete(self) -> WatchableAsyncStatus:
|
|
123
95
|
"""Mark as complete once motor reaches completed position."""
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
raise RuntimeError(msg)
|
|
127
|
-
return self._fly_status
|
|
96
|
+
fly_status = error_if_none(self._fly_status, "kickoff not called")
|
|
97
|
+
return fly_status
|
|
128
98
|
|
|
129
99
|
async def _move(self, old_position: float, new_position: float, velocity: float):
|
|
130
100
|
if old_position == new_position:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ophyd-async
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11
|
|
4
4
|
Summary: Asynchronous Bluesky hardware abstraction code, compatible with control systems like EPICS and Tango
|
|
5
5
|
Author-email: Tom Cobb <tom.cobb@diamond.ac.uk>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -70,7 +70,7 @@ Requires-Dist: inflection; extra == "dev"
|
|
|
70
70
|
Requires-Dist: import-linter; extra == "dev"
|
|
71
71
|
Requires-Dist: myst-parser; extra == "dev"
|
|
72
72
|
Requires-Dist: numpydoc; extra == "dev"
|
|
73
|
-
Requires-Dist: ophyd; extra == "dev"
|
|
73
|
+
Requires-Dist: ophyd>=1.10.7; extra == "dev"
|
|
74
74
|
Requires-Dist: pickleshare; extra == "dev"
|
|
75
75
|
Requires-Dist: pipdeptree; extra == "dev"
|
|
76
76
|
Requires-Dist: pre-commit; extra == "dev"
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
ophyd_async/__init__.py,sha256=dcAA3qsj1nNIMe5l-v2tlduZ_ypwBmyuHe45Lsq4k4w,206
|
|
2
2
|
ophyd_async/__main__.py,sha256=n_U4O9bgm97OuboUB_9eK7eFiwy8BZSgXJ0OzbE0DqU,481
|
|
3
3
|
ophyd_async/_docs_parser.py,sha256=gPYrigfSbYCF7QoSf2UvE-cpQu4snSssl7ZWN-kKDzI,352
|
|
4
|
-
ophyd_async/_version.py,sha256=
|
|
4
|
+
ophyd_async/_version.py,sha256=JQGWKvS8mTtWQI0a0XtjLQOyFpNGX620dVCNBNQBiDE,508
|
|
5
5
|
ophyd_async/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
ophyd_async/core/__init__.py,sha256=
|
|
7
|
-
ophyd_async/core/_derived_signal.py,sha256=
|
|
8
|
-
ophyd_async/core/_derived_signal_backend.py,sha256=
|
|
9
|
-
ophyd_async/core/_detector.py,sha256=
|
|
10
|
-
ophyd_async/core/_device.py,sha256=
|
|
6
|
+
ophyd_async/core/__init__.py,sha256=RtYk6FdJxc7lxoSReRV1D7weTRYFu9ylhNNd3DyN904,4752
|
|
7
|
+
ophyd_async/core/_derived_signal.py,sha256=TuZza_j3J1Bw4QSqBYB9Ta2FyQP5BycO3nSHVtJ890Q,13015
|
|
8
|
+
ophyd_async/core/_derived_signal_backend.py,sha256=PYyyont_nUR9LBC9eqVwueHCMwLJfQ_F7R_14sivBTU,12510
|
|
9
|
+
ophyd_async/core/_detector.py,sha256=x1o-eSkvemQ-fTk47440owkTmYhuckA2ILNOCoJlHCY,15201
|
|
10
|
+
ophyd_async/core/_device.py,sha256=lSm8FBul9NTn9VO0rsAlV9pctJyUsMdU2ztEf5CqH5M,14716
|
|
11
11
|
ophyd_async/core/_device_filler.py,sha256=MDz8eQQ-eEAwo-UEMxfqPfpcBuMG01tLCGR6utwVnmE,14825
|
|
12
|
-
ophyd_async/core/_flyer.py,sha256=
|
|
13
|
-
ophyd_async/core/_hdf_dataset.py,sha256=
|
|
12
|
+
ophyd_async/core/_flyer.py,sha256=Rvoi2AzPwbz-dnt3WlpfJTodgZDiK5cusbutfkbr_8A,3453
|
|
13
|
+
ophyd_async/core/_hdf_dataset.py,sha256=qh4QMJAXuOUQUciLXdMTX9yPnmWp5l-ugGCrJWUXQDQ,2954
|
|
14
14
|
ophyd_async/core/_log.py,sha256=DxKR4Nz3SgTaTzKBZWqt-w48yT8WUAr_3Qr223TEWRw,3587
|
|
15
15
|
ophyd_async/core/_mock_signal_backend.py,sha256=SPdCbVWss6-iL9C3t9u0IvR_Ln9JeDypVd18WlivdjE,3156
|
|
16
16
|
ophyd_async/core/_protocol.py,sha256=wQ_snxhTprHqEjQb1HgFwBljwolMY6A8C3xgV1PXwdU,4051
|
|
17
17
|
ophyd_async/core/_providers.py,sha256=1XuLUw9sT1pKMfH_PsDEpIi1gulla7NfPSp3IR3KfEA,7545
|
|
18
18
|
ophyd_async/core/_readable.py,sha256=iBo1YwA5bsAbzLbznvmSnzKDWUuGkLh850Br3BXsgeU,11707
|
|
19
19
|
ophyd_async/core/_settings.py,sha256=_ZccbXKP7j5rG6-bMKk7aaLr8hChdRDAPY_YSR71XXM,4213
|
|
20
|
-
ophyd_async/core/_signal.py,sha256=
|
|
20
|
+
ophyd_async/core/_signal.py,sha256=XXbcitQ6pmQnZUjTfsAvkWXIMS-ybGTRImYBbHAaPR0,27837
|
|
21
21
|
ophyd_async/core/_signal_backend.py,sha256=PvwTbbSVEGqM-2s5BNRrKGwM_MiYL71qMxYAgyZ7wRM,6930
|
|
22
22
|
ophyd_async/core/_soft_signal_backend.py,sha256=zrE7H2ojHY6oQBucLkFgukszrkdvbIZuavLjEUqc_xM,6227
|
|
23
23
|
ophyd_async/core/_status.py,sha256=h4TtWFM7wFtpxxyAYYSITgcVzArYZdYBHbya6qIX5t0,6553
|
|
24
|
-
ophyd_async/core/_table.py,sha256=
|
|
25
|
-
ophyd_async/core/_utils.py,sha256=
|
|
26
|
-
ophyd_async/core/_yaml_settings.py,sha256=
|
|
24
|
+
ophyd_async/core/_table.py,sha256=ai-_W-_WMZcy9f69BDYRv9vjVl-AVeOPN_uHYoGCSsc,6905
|
|
25
|
+
ophyd_async/core/_utils.py,sha256=fePvt3g7eQ6CRQcMVkMeqxcbvYZboZ2sf1fVVZL-26M,12450
|
|
26
|
+
ophyd_async/core/_yaml_settings.py,sha256=Qojhku9l5kPSkTnEylCRWTe0gpw6S_XP5av5dPpqFgQ,2089
|
|
27
27
|
ophyd_async/epics/__init__.py,sha256=ou4yEaH9VZHz70e8oM614-arLMQvUfQyXhRJsnEpWn8,60
|
|
28
|
-
ophyd_async/epics/motor.py,sha256=
|
|
28
|
+
ophyd_async/epics/motor.py,sha256=pdXaXo4kpJAEZGXXtBxbNdnfPppqyplpP0jFsdyWVkA,8473
|
|
29
29
|
ophyd_async/epics/signal.py,sha256=0A-supp9ajr63O6aD7F9oG0-Q26YmRjk-ZGh57-jo1Y,239
|
|
30
|
-
ophyd_async/epics/adandor/__init__.py,sha256=
|
|
30
|
+
ophyd_async/epics/adandor/__init__.py,sha256=dlitllrAdhvh16PAcVMUSSEytTDNMu6_HuYk8KD1EoY,343
|
|
31
31
|
ophyd_async/epics/adandor/_andor.py,sha256=SxAIP9OLefUqKcxrxhjNzil5D8-59Ps0vADdR6scO44,1281
|
|
32
|
-
ophyd_async/epics/adandor/_andor_controller.py,sha256=
|
|
33
|
-
ophyd_async/epics/adandor/_andor_io.py,sha256=
|
|
32
|
+
ophyd_async/epics/adandor/_andor_controller.py,sha256=i0AwWdk9tqB802C9d5gTgYugZ1UOcJCQLk130gVQNeo,1779
|
|
33
|
+
ophyd_async/epics/adandor/_andor_io.py,sha256=DOrni8vcncQ3lW1JOpXo_jwMCLx1qsggbg6FXlsl5Ew,819
|
|
34
34
|
ophyd_async/epics/adaravis/__init__.py,sha256=ZQaJVQiwcQn9hUZADrYgBE1sDfFEwjhVBJRPth1_LBo,395
|
|
35
35
|
ophyd_async/epics/adaravis/_aravis.py,sha256=Ju2wuebz9_ovl-Kza39s5VQ1pV-Omt_BaIWKqP4kcGA,1315
|
|
36
36
|
ophyd_async/epics/adaravis/_aravis_controller.py,sha256=WiFR7_FAAu6_88zG-yzGLsR9YcO4L6xR73Wnjw9n0i4,1908
|
|
@@ -40,7 +40,7 @@ ophyd_async/epics/adcore/_core_detector.py,sha256=mRDaHgXCTZF-MIVsU1csoQx9jObutY
|
|
|
40
40
|
ophyd_async/epics/adcore/_core_io.py,sha256=jm4gQUSq727xnPriuH6jFHqlDBZceKxr_XyBNj5F65U,7392
|
|
41
41
|
ophyd_async/epics/adcore/_core_logic.py,sha256=IH7iOSVIsVj4e97ClhdBFpmdMkb8TznSaLkd3ohEhUs,8884
|
|
42
42
|
ophyd_async/epics/adcore/_core_writer.py,sha256=S58plRmbNzig-r7gubKjDVDni_nf4CASaV1OJvudbHw,8019
|
|
43
|
-
ophyd_async/epics/adcore/_hdf_writer.py,sha256=
|
|
43
|
+
ophyd_async/epics/adcore/_hdf_writer.py,sha256=FYM84XYFVH6m2lM3CmZiyW1Eb-chUWLyjHUz3YhH9EQ,5743
|
|
44
44
|
ophyd_async/epics/adcore/_jpeg_writer.py,sha256=7XC4Twx_MaCBjeol27UA-hStOCQEjkEAb3ToVMPUlZ8,670
|
|
45
45
|
ophyd_async/epics/adcore/_single_trigger.py,sha256=tFGLT1b_rZzAvbqWP-hyCccxJMRY26T5IER-VAqKXmc,1275
|
|
46
46
|
ophyd_async/epics/adcore/_tiff_writer.py,sha256=Na30osfkgrq4VQhUzDcuS52Gy7FS08CzbgEmKwljTmk,671
|
|
@@ -80,7 +80,9 @@ ophyd_async/epics/demo/motor.db,sha256=3xb6WTXo4crrvk-M8Y16G9pUidp27vD5vIKKBpLTU
|
|
|
80
80
|
ophyd_async/epics/demo/point_detector.db,sha256=8kBa3XKpmfXCxetT4tq5_RFXa_XqS1Z2ZNzsa2AtLds,1366
|
|
81
81
|
ophyd_async/epics/demo/point_detector_channel.db,sha256=FZ9H6HjqplhcF2jgimv_dT1nn-CBlfjs7Y--iCfHp5Y,632
|
|
82
82
|
ophyd_async/epics/eiger/__init__.py,sha256=7kRqVzwoD8PVtp7Nj9iQWlgbLeoWE_8oiq-B0kixwTE,93
|
|
83
|
-
ophyd_async/epics/eiger/_odin_io.py,sha256=
|
|
83
|
+
ophyd_async/epics/eiger/_odin_io.py,sha256=vbIvMONlCyjI78tpyQGMIvWRX1Q2fASRRgln63N2lDY,5704
|
|
84
|
+
ophyd_async/epics/pmac/__init__.py,sha256=RWqo5nYE2MMBdwvMxdeVG213MN38b9VPlpDHQWul8QQ,143
|
|
85
|
+
ophyd_async/epics/pmac/_pmac_io.py,sha256=yMQpZ0Osh4l8VRd2aqWQE9ebJDfh5FwM_0pp1pe8-C0,3564
|
|
84
86
|
ophyd_async/epics/testing/__init__.py,sha256=aTIv4D2DYrpnGco5RQF8QuLG1SfFkIlTyM2uYEKXltA,522
|
|
85
87
|
ophyd_async/epics/testing/_example_ioc.py,sha256=uUmfMXV_Pd2SMFyb0y_4uTc6gkGRUqU1cJ-XQC2ROW8,3915
|
|
86
88
|
ophyd_async/epics/testing/_utils.py,sha256=6sqJ0BCwubSkK-WOJbmpKNqZKG0AmCoevzaMGaRmuJs,1702
|
|
@@ -88,8 +90,8 @@ ophyd_async/epics/testing/test_records.db,sha256=SgWQPZgtmc__JiLkH2VPwe5KZOua6ZC
|
|
|
88
90
|
ophyd_async/epics/testing/test_records_pva.db,sha256=HJAJSvLtPWG5B5dKv8OZ0_hPJxRFrDoYp6ROcF2lqyA,4202
|
|
89
91
|
ophyd_async/fastcs/__init__.py,sha256=qlIM9-pjJ8yWfnzTM9-T9cw7zQLKjeeNROQTni5Dr6M,80
|
|
90
92
|
ophyd_async/fastcs/core.py,sha256=pL_srtTrfuoBHUjDFpxES92owFq9M4Jve0Skk1oeuFA,517
|
|
91
|
-
ophyd_async/fastcs/eiger/__init__.py,sha256=
|
|
92
|
-
ophyd_async/fastcs/eiger/_eiger.py,sha256=
|
|
93
|
+
ophyd_async/fastcs/eiger/__init__.py,sha256=RxwOFjERKy5tUD_IDGCGuMh716FaZgCq7R9elPixBwo,312
|
|
94
|
+
ophyd_async/fastcs/eiger/_eiger.py,sha256=nTK48deELmZn9x4Pd8QlyH6qYpbThbUTiXTwjfY6eB8,1106
|
|
93
95
|
ophyd_async/fastcs/eiger/_eiger_controller.py,sha256=Cucj-1M-1CaxSJxHZmHs3f_OXwtTIspcqUFhRNGzn_E,2361
|
|
94
96
|
ophyd_async/fastcs/eiger/_eiger_io.py,sha256=KS1ppYt6PJvPpHiR2AaDaPAhkhYwC2ei8VuZnBBiBs8,1216
|
|
95
97
|
ophyd_async/fastcs/odin/__init__.py,sha256=da1PTClDMl-IBkrSvq6JC1lnS-K_BASzCvxVhNxN5Ls,13
|
|
@@ -98,8 +100,8 @@ ophyd_async/fastcs/panda/_block.py,sha256=SM7NaWCRwLz2Pl4wgjZMrDgx3ZLdGPTw6nU0bA
|
|
|
98
100
|
ophyd_async/fastcs/panda/_control.py,sha256=xtW3dH_MLQoycgP-4vJtYx1M9alHjWo13iu9UFTgwzY,1306
|
|
99
101
|
ophyd_async/fastcs/panda/_hdf_panda.py,sha256=tL_OWHxlMQcMZGq9sxHLSeag6hP9MRIbTPn1W0u0iNI,1237
|
|
100
102
|
ophyd_async/fastcs/panda/_table.py,sha256=maKGoKypEuYqTSVWGgDO6GMEKOtlDm9Dn5YiYdBzu6c,2486
|
|
101
|
-
ophyd_async/fastcs/panda/_trigger.py,sha256=
|
|
102
|
-
ophyd_async/fastcs/panda/_writer.py,sha256=
|
|
103
|
+
ophyd_async/fastcs/panda/_trigger.py,sha256=X3FV51zNq3aADeSj-mwghf_NH72_25BreTPvjkOiQTE,3400
|
|
104
|
+
ophyd_async/fastcs/panda/_writer.py,sha256=9cXDrfzj_e8LyGoG7kvgmftt8D_TS6r0fnlO8uR1fHw,6298
|
|
103
105
|
ophyd_async/plan_stubs/__init__.py,sha256=2ngpkB4wwqlx1dn9JPSHjQdbyWLmY6n-3XVh3RDE8-g,939
|
|
104
106
|
ophyd_async/plan_stubs/_ensure_connected.py,sha256=YR6VRj7koccJ4x35NV-Ugl4ZbxgAoGN9PjVIjhv0gpw,894
|
|
105
107
|
ophyd_async/plan_stubs/_fly.py,sha256=2xFae3b3bCux_1wmwKIF1tJx1vjg2JJfJ8iQ1aUExAs,6234
|
|
@@ -108,14 +110,14 @@ ophyd_async/plan_stubs/_panda.py,sha256=5_Mf9kGzNjXpf_YscpCUE8tgq284nOHWCG7o_LNF
|
|
|
108
110
|
ophyd_async/plan_stubs/_settings.py,sha256=e3dGVSUV-Htay_9fKXyQTAQLdjunetGI3OBYp_oC_FY,5574
|
|
109
111
|
ophyd_async/plan_stubs/_utils.py,sha256=zClRo5ve8RGia7wQnby41W-Zprj-slOA5da1LfYnuhw,45
|
|
110
112
|
ophyd_async/plan_stubs/_wait_for_awaitable.py,sha256=PGct_dGezKrLhm0W_GD83dwevSccG_vsmj0WSlMNVWc,364
|
|
111
|
-
ophyd_async/sim/__init__.py,sha256=
|
|
113
|
+
ophyd_async/sim/__init__.py,sha256=TC86iJGt4u5UtRJniNEaUJbYB2C03kmjZF-jr2zPExY,709
|
|
112
114
|
ophyd_async/sim/__main__.py,sha256=mx6natJxnvUBTQXbS4R5OGH_MZVgYiXQkoh3JBJ8NxU,1693
|
|
113
115
|
ophyd_async/sim/_blob_detector.py,sha256=bJa-G2JF6pPLJx4YIEvFTG07DvQ18ZNSYbtde6qnWPY,1033
|
|
114
116
|
ophyd_async/sim/_blob_detector_controller.py,sha256=y1aSNQJUPnsT2qnj2sk254Mp18anmgQy7ctHlYQZ_B0,1788
|
|
115
|
-
ophyd_async/sim/_blob_detector_writer.py,sha256
|
|
116
|
-
ophyd_async/sim/_mirror_horizontal.py,sha256=
|
|
117
|
-
ophyd_async/sim/_mirror_vertical.py,sha256=
|
|
118
|
-
ophyd_async/sim/_motor.py,sha256=
|
|
117
|
+
ophyd_async/sim/_blob_detector_writer.py,sha256=-Qj0uSSNgqtLNe9wwsczbWKnSXLKDXISlwX1EHR_-UY,3327
|
|
118
|
+
ophyd_async/sim/_mirror_horizontal.py,sha256=Jsqa8Snjy1jQDboZtAQFJjGor5uKk8FBC7OCe-GoZDw,1478
|
|
119
|
+
ophyd_async/sim/_mirror_vertical.py,sha256=HUD44mYT0jQ0GKiQKxD7k_7y6o6OdE6TztgdPUJIK_g,2085
|
|
120
|
+
ophyd_async/sim/_motor.py,sha256=7s2jBNwWm4CI6I6l_LEpe7z61QdWy82JdZBKSFOnYe4,8994
|
|
119
121
|
ophyd_async/sim/_pattern_generator.py,sha256=FjPEWiBQh_7tYP_8WPhbVXnTGPPOaV6By7Skz7YNIrY,3722
|
|
120
122
|
ophyd_async/sim/_point_detector.py,sha256=nXgL_1aJZciNBw8Zr2wMYaMbzzAEKXV3yV8FQz2nS_4,2940
|
|
121
123
|
ophyd_async/sim/_stage.py,sha256=qaeyZbUVL1v2pTHJiZxq-y6BKpA1l_DAKyzAQppQx70,772
|
|
@@ -143,8 +145,8 @@ ophyd_async/testing/_one_of_everything.py,sha256=Di0hPoKwrDOSsx50-2UdSHM2EbIKrPG
|
|
|
143
145
|
ophyd_async/testing/_single_derived.py,sha256=5-HOTzgePcZ354NK_ssVpyIbJoJmKyjVQCxSwQXUC-4,2730
|
|
144
146
|
ophyd_async/testing/_utils.py,sha256=zClRo5ve8RGia7wQnby41W-Zprj-slOA5da1LfYnuhw,45
|
|
145
147
|
ophyd_async/testing/_wait_for_pending.py,sha256=YZAR48n-CW0GsPey3zFRzMJ4byDAr3HvMIoawjmTrHw,732
|
|
146
|
-
ophyd_async-0.
|
|
147
|
-
ophyd_async-0.
|
|
148
|
-
ophyd_async-0.
|
|
149
|
-
ophyd_async-0.
|
|
150
|
-
ophyd_async-0.
|
|
148
|
+
ophyd_async-0.11.dist-info/licenses/LICENSE,sha256=pU5shZcsvWgz701EbT7yjFZ8rMvZcWgRH54CRt8ld_c,1517
|
|
149
|
+
ophyd_async-0.11.dist-info/METADATA,sha256=0H2kxSQoFHWEs8JMhMkrrQRw49Bh0wV4ulAnW5pZ6Ks,7077
|
|
150
|
+
ophyd_async-0.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
151
|
+
ophyd_async-0.11.dist-info/top_level.txt,sha256=-hjorMsv5Rmjo3qrgqhjpal1N6kW5vMxZO3lD4iEaXs,12
|
|
152
|
+
ophyd_async-0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|