fix: typos

This commit is contained in:
2026-03-22 19:13:19 +01:00
parent de32f504e3
commit 7a81b4676e
18 changed files with 29 additions and 30 deletions
@@ -6,7 +6,7 @@
# This module contains:
# - Classes like `StatsPlugin_V{X}{Y}` that are design to be counterparts to
# AreaDetector verion X.Y.
# AreaDetector version X.Y.
#
# isort: skip_file
+2 -2
View File
@@ -98,7 +98,7 @@ ROI_RANGE = range(0, 8)
class EpicsMCARecord(_EpicsMCARecord):
"""EpicsMCARecord with addtional fields"""
"""EpicsMCARecord with additional fields"""
# Calibration values
calo = Cpt(EpicsSignal, ".CALO", kind=Kind.config)
@@ -130,7 +130,7 @@ class EpicsDXPFalcon(Device):
preset_triggers = Cpt(EpicsSignalWithRBV, "PresetTriggers")
preset_real_time = Cpt(EpicsSignalWithRBV, "PresetReal")
# Couting statistics
# Counting statistics
elapsed_live_time = Cpt(EpicsSignalRO, "ElapsedLiveTime", lazy=True)
elapsed_real_time = Cpt(EpicsSignalRO, "ElapsedRealTime", lazy=True)
elapsed_trigger_live = Cpt(EpicsSignalRO, "ElapsedTriggerLiveTime", lazy=True)
+1 -1
View File
@@ -1,5 +1,5 @@
# PandaBox Integration
Short Doumentation of the PandaBox Device Integration in Ophyd Devices
Short Documentation of the PandaBox Device Integration in Ophyd Devices
## Overview
+1 -1
View File
@@ -746,7 +746,7 @@ class PandaBox(PSIDeviceBase):
"""
Convert the data from a FrameData object into a dictionary with expected OPHYD
read format, e.g. signal {signal_name: {"value": [...]}}. Please be aware that if
this method is overriden by child classes, you need to make sure that the key names
this method is overridden by child classes, you need to make sure that the key names
in the FrameData is converted to the expected names in the data signal. This includes
replacing dots in the original PandaBox keys with underscores using "block_name_mapping"
from the utils, and using the key mapping provided through the signal_alias mapping.
@@ -384,7 +384,7 @@ class BECDeviceBase(Device):
"""
Hook for beamline specific logic during class initialization.
Please to not set any of the class's signals during intialisation, but
Please do not set any of the class's signals during initialisation, but
instead use the wait_for_connection.
"""
self.custom_prepare.on_init()
@@ -411,7 +411,7 @@ class BECDeviceBase(Device):
Stage is idempotent, if staged twice it should raise (we let ophyd.Device handle the raise here).
Other that that, we reset the stopped property in case the device was stopped before, and
pull the latest scan metadata from BEC. Ater that, we allow for beamline specific logic to
pull the latest scan metadata from BEC. After that, we allow for beamline specific logic to
be implemented through the custom_prepare.on_stage method.
Returns:
@@ -456,7 +456,7 @@ class BECDeviceBase(Device):
softwareTrigger needs to be set to True, which will indicate to BEC that the device
should be triggered from the software during the scan.
Custom logic should be implemented non-blocking, i.e. be fast, or implemented asynchroniously.
Custom logic should be implemented non-blocking, i.e. be fast, or implemented asynchronously.
Returns:
DeviceStatus: DeviceStatus object that BEC will use to check if the trigger was successful.
@@ -11,8 +11,8 @@ from ophyd_devices.utils.bec_utils import ConfigSignal
logger = bec_logger.logger
class OphtyRotationBaseError(Exception):
"""Exception specific for implmenetation of rotation stages."""
class OphydRotationBaseError(Exception):
"""Exception specific for implementation of rotation stages."""
class OphydRotationBase(BECRotationProtocol, ABC):
@@ -98,7 +98,7 @@ class EpicsRotationBase(OphydRotationBase, EpicsMotor):
self.set_current_position(new_val)
except Exception as exc:
error_msg = f"Failed to set new position {new_val} from {cur_val} on device {self.name} with error {exc}"
raise OphtyRotationBaseError(error_msg) from exc
raise OphydRotationBaseError(error_msg) from exc
return
logger.info(
f"Did not apply mod360 for device {self.name} with has_mod={self.has_mod360} and allow_mod={self.allow_mod360.get()}"
@@ -1,7 +1,7 @@
"""This module provides a range of protocols that describe the expected
interface for different types of devices.
The protocols below can be used as teamplates for functionality to be implemeted
The protocols below can be used as templates for functionality to be implemented
by different type of devices. They further facilitate runtime checks on devices
and provide a minimum set of properties required for a device to be loadable by BEC.
@@ -100,7 +100,7 @@ class BECBaseProtocol(Protocol):
"""
def clear_sub(self, cb: callable, event_type: str = None):
"""Clear subscription, given the origianl callback fucntion
"""Clear subscription, given the original callback function
Args:
cb (callable) : Callback
@@ -263,7 +263,7 @@ class BECDeviceProtocol(BECBaseProtocol, Protocol):
"""Staged property to indicate if the device is staged."""
def stage(self) -> list[object]:
"""Stage method to prepare the device for an upcoming acquistion.
"""Stage method to prepare the device for an upcoming acquisition.
This prepares a device for an upcoming acquisition, i.e. it is the first
method for which the scan parameters are known and the device can be configured.
@@ -286,7 +286,7 @@ class BECDeviceProtocol(BECBaseProtocol, Protocol):
"""Unstage method to cleanup after the acquisition.
It can also be used to implement checks whether the acquisition was successful,
inform BEC that the file has been succesfully written, or raise upon receiving
inform BEC that the file has been successfully written, or raise upon receiving
feedback that the scan did not finish successful.
Unstaging is not idempotent. If called twice it should simply resolve.
+1 -1
View File
@@ -68,7 +68,7 @@ class SimCamera(PSIDeviceBase, SimCameraControl):
Parameters
----------
name (string) : Name of the device. This is the only required argmuent, passed on to all signals of the device.
name (string) : Name of the device. This is the only required argument, passed on to all signals of the device.
precision (integer) : Precision of the readback in digits, written to .describe(). Default is 3 digits.
sim_init (dict) : Dictionary to initiate parameters of the simulation, check simulation type defaults for more details.
parent : Parent device, optional, is used internally if this signal/device is part of a larger device.
+1 -1
View File
@@ -92,7 +92,7 @@ class SimulatedDataBase(ABC):
- execute_simulation_method: execute a method from the simulated data class or reroute execution to device proxy class
- select_model: select the active simulation model
- params: get the parameters for the active simulation mdoel
- params: get the parameters for the active simulation model
- sim_models: get the available simulation models
- update_sim_state: update the simulated state of the device
"""
+2 -2
View File
@@ -17,7 +17,7 @@ logger = bec_logger.logger
class SimFlyer(Device, FlyerInterface):
"""A simulated device mimicing any 2D Flyer device (position, temperature, rotation).
"""A simulated device mimicking any 2D Flyer device (position, temperature, rotation).
The corresponding simulation class is sim_cls=SimulatedPositioner, more details on defaults within the simulation class.
@@ -25,7 +25,7 @@ class SimFlyer(Device, FlyerInterface):
Parameters
----------
name (string) : Name of the device. This is the only required argmuent, passed on to all signals of the device.
name (string) : Name of the device. This is the only required argument, passed on to all signals of the device.
precision (integer) : Precision of the readback in digits, written to .describe(). Default is 3 digits.
parent : Parent device, optional, is used internally if this signal/device is part of a larger device.
kind : A member the Kind IntEnum (or equivalent integer), optional. Default is Kind.normal. See Kind for options.
@@ -54,8 +54,7 @@ class DeviceProxy(BECDeviceBase, ABC):
def _compute(self, device_name: str, *args, **kwargs) -> any:
"""
The purpose of this method is to compute the readback value for the signal of the device
that this proxy is attached to. This method is meant to be overriden by the user.
P
that this proxy is attached to. This method is meant to be overridden by the user.
Args:
device_name (str): Name of the device.
@@ -13,7 +13,7 @@ from ophyd_devices.sim.sim_frameworks.device_proxy import DeviceProxy
class H5ImageReplayProxy(DeviceProxy):
"""This Proxy class can be used to replay images from an h5 file.
If the number of requested images is larger than the number of available iamges,
If the number of requested images is larger than the number of available images,
the images will be replayed from the beginning.
An example for the configuration of this is device is in ophyd_devices.configs.ophyd_devices_simulation.yaml
@@ -7,7 +7,7 @@ from ophyd_devices.sim.sim_frameworks.device_proxy import DeviceProxy
class SlitProxy(DeviceProxy):
"""
Simulation framework to immitate the behaviour of slits.
Simulation framework to imitate the behaviour of slits.
This device is a proxy that is meant to override the behaviour of a SimCamera.
You may use this to simulate the effect of slits on the camera image.
+1 -1
View File
@@ -27,7 +27,7 @@ class SimMonitor(ReadOnlySignal):
Parameters
----------
name (string) : Name of the device. This is the only required argmuent,
name (string) : Name of the device. This is the only required argument,
passed on to all signals of the device.
precision (integer) : Precision of the readback in digits, written to .describe().
Default is 3 digits.
+3 -3
View File
@@ -21,16 +21,16 @@ logger = bec_logger.logger
class SimPositioner(Device, PositionerBase):
"""
A simulated device mimicing any 1D Axis device (position, temperature, rotation).
A simulated device mimicking any 1D Axis device (position, temperature, rotation).
>>> motor = SimPositioner(name="motor")
Parameters
----------
name (string) : Name of the device. This is the only required argmuent, passed on to all signals of the device.\
name (string) : Name of the device. This is the only required argument, passed on to all signals of the device.\
Optional parameters:
----------
delay (int) : If 0, execution of move will be instant. If 1, exectution will depend on motor velocity. Default is 1.
delay (int) : If 0, execution of move will be instant. If 1, execution will depend on motor velocity. Default is 1.
update_frequency (int) : Frequency in Hz of the update of the simulated state during a move. Default is 2 Hz.
precision (integer) : Precision of the readback in digits, written to .describe(). Default is 3 digits.
limits (tuple) : Tuple of the low and high limits of the positioner. Overrides low/high_limit_travel is specified. Default is None.
+1 -1
View File
@@ -22,7 +22,7 @@ class SetableSignal(Signal):
The signal will store the value in sim_state of the SimulatedData class of the parent device.
It will also return the value from sim_state when get is called. Compared to the ReadOnlySignal,
this signal can be written to.
The setable signal inherits from the Signal class of ophyd, thus the class attribute needs to be
The settable signal inherits from the Signal class of ophyd, thus the class attribute needs to be
initiated as a Component (class from ophyd).
>>> signal = SetableSignal(name="signal", parent=parent, value=0)
+1 -1
View File
@@ -58,7 +58,7 @@ class SimWaveform(Device):
Parameters
----------
name (string) : Name of the device. This is the only required argmuent, passed on to all signals of the device.
name (string) : Name of the device. This is the only required argument, passed on to all signals of the device.
precision (integer) : Precision of the readback in digits, written to .describe(). Default is 3 digits.
sim_init (dict) : Dictionary to initiate parameters of the simulation, check simulation type defaults for more details.
parent : Parent device, optional, is used internally if this signal/device is part of a larger device.
+1 -1
View File
@@ -87,7 +87,7 @@ class SocketSignal(abc.ABC, Signal):
for reading from and writing to a socket, as well as handling callbacks and subscriptions in a way
that prevents recursive calls. Children should implement the `_socket_get` and `_socket_set` methods
to define the specific logic for interacting with the socket. `get` and `put` methods should not be
overriden by children to ensure proper callback handling.
overridden by children to ensure proper callback handling.
Args:
name (str): The name of the signal.