Note
Ophyd.v2 is included on a provisional basis until the v2.0 release and may change API on minor release numbers before then
ophyd.v2.epicsdemo.Mover#
- class ophyd.v2.epicsdemo.Mover(prefix: str, name='')#
Bases:
StandardReadable
,Movable
,Stoppable
A demo movable that moves based on velocity
Methods
Connect self and all child Devices.
Return an OrderedDict with exactly the same keys as the
read
method, here mapped to per-scan metadata about each field.Same API as
describe
, but corresponding to the keys inread_configuration
.Commandline only synchronous move of a Motor
Return an OrderedDict mapping string field name(s) to dictionaries of values and timestamps and optional per-point metadata.
Same API as
read
but for slow-changing fields related to configuration.Return a
Status
that is marked done when the device is done moving.Set
self.name=name
and eachself.child.name=name+"-child"
.- Parameters:
An optional hook for "setting up" the device for acquisition.
Safely stop a device that may or may not be in motion.
A hook for "cleaning up" the device after acquisition.
Attributes
Return the name of the Device
The parent Device if it exists
- set_name(name: str)#
Set
self.name=name
and eachself.child.name=name+"-child"
.- Parameters:
- name:
New name to set
- move(new_position: float, timeout: float | None = None)#
Commandline only synchronous move of a Motor
- set(new_position: float, timeout: float | None = None) AsyncStatus #
Return a
Status
that is marked done when the device is done moving.
- async stop(success=True)#
Safely stop a device that may or may not be in motion.
The argument
success
is a boolean. Whensuccess
is true, bluesky is stopping the device as planned and the device should stop “normally”. Whensuccess
is false, something has gone wrong and the device may wish to take defensive action to make itself safe.This can be a standard function or an
async
function.
- async connect(sim: bool = False)#
Connect self and all child Devices.
- Parameters:
- sim:
If True then connect in simulation mode.
- async describe() Dict[str, Descriptor] #
Return an OrderedDict with exactly the same keys as the
read
method, here mapped to per-scan metadata about each field.This can be a standard function or an
async
function.Example return value:
OrderedDict(('channel1', {'source': 'XF23-ID:SOME_PV_NAME', 'dtype': 'number', 'shape': []}), ('channel2', {'source': 'XF23-ID:SOME_PV_NAME', 'dtype': 'number', 'shape': []}))
- async describe_configuration() Dict[str, Descriptor] #
Same API as
describe
, but corresponding to the keys inread_configuration
.This can be a standard function or an
async
function.
- async read() Dict[str, Reading] #
Return an OrderedDict mapping string field name(s) to dictionaries of values and timestamps and optional per-point metadata.
This can be a standard function or an
async
function.Example return value:
OrderedDict(('channel1', {'value': 5, 'timestamp': 1472493713.271991}), ('channel2', {'value': 16, 'timestamp': 1472493713.539238}))
- async read_configuration() Dict[str, Reading] #
Same API as
read
but for slow-changing fields related to configuration. e.g., exposure time. These will typically be read only once per run.This can be a standard function or an
async
function.
- set_readable_signals(read: Sequence[SignalR] = (), config: Sequence[SignalR] = (), read_uncached: Sequence[SignalR] = ())#
- Parameters:
- read:
Signals to make up
read()
- conf:
Signals to make up
read_configuration()
- read_uncached:
Signals to make up
read()
that won’t be cached