pseudo_motor
borealis.pseudo_motor
PseudoMotor(alias, motors, geometries, position_law)
Bases: ControllerComponent
Class for a basic pseudo-motor, meaning a collection of Motor objects plus 0 or 1 detector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alias
|
str
|
Name of the pseudo-motor |
required |
motors
|
list[Motor, PseudoMotor]
|
List of Motor or PseudoMotor objects. |
required |
geometries
|
list[Callable[float, float]
|
List of conversion functions (e.g. lambda (x: ax + b), one for each motor. |
required |
position_law
|
Callable[[list], float]
|
Function that takes as input the list of (pseudo)-motors as it was given at instantiation and returns a single float. |
required |
Source code in borealis/pseudo_motor.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
__str__()
Custom str method for PseudoMotor class.
Source code in borealis/pseudo_motor.py
54 55 56 | |
check_soft_limits(target_user)
Check if dial value is within the limits (inclusive).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_user
|
float
|
Target position in user unit. |
required |
Raises:
| Type | Description |
|---|---|
SoftLimitError when dial is outside the allowed range.
|
|
Source code in borealis/pseudo_motor.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
scan(start, stop, step, acq_time=0)
Perform a scan, if acq_time > 0 will also do an acquisition on all sensors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
float
|
Start of interval. The interval includes this value. |
required |
stop
|
float
|
End of interval. The interval does not include this value. |
required |
step
|
float
|
Spacing between values. For any output |
required |
acq_time
|
float
|
|
0
|
Source code in borealis/pseudo_motor.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
where()
Print pseudo-motor position.
Returns:
| Type | Description |
|---|---|
str
|
|
Source code in borealis/pseudo_motor.py
82 83 84 85 86 87 88 89 90 91 92 93 | |