class DummyStage(BaseStage): (source)
Constructor: DummyStage(thing_server_interface, step_time, **kwargs)
A dummy stage for testing purposes.
This stage should work similarly to a Sangaboard stage, but without any hardware attached.
| Method | __enter__ |
Register the stage position and start move thread running. |
| Method | __exit__ |
Stop the move thread. |
| Method | __init__ |
Initialise the Dummy stage, setting the step_time to adjust the speed. |
| Method | set |
Make the current position zero in all axes. |
| Instance Variable | axis |
Used to convert coordinates between the program frame and the hardware frame. |
| Instance Variable | instantaneous |
Undocumented |
| Instance Variable | moving |
Whether the stage is in motion. |
| Instance Variable | step |
Undocumented |
| Method | _check |
Check for new move request to the move_loop. |
| Method | _estimate |
Calculate the expected duration of a move with the given displacement. |
| Method | _hardware |
Make an absolute move. Keyword arguments should be axis names. |
| Method | _hardware |
Make a relative move. Keyword arguments should be axis names. |
| Method | _hardware |
Start a relative move. |
| Method | _hardware |
Undocumented |
| Method | _hardware |
Read position from the stage and set internal attribute _hardware_position. |
| Method | _move |
Run the move loop. This should be run in a thread on enter. |
| Method | _poll |
Determine if the stage is still moving. |
| Method | _set |
Set the instantaneous position based on the completed fraction of an ongoing move. |
| Instance Variable | _abort |
Undocumented |
| Instance Variable | _hardware |
Undocumented |
| Instance Variable | _inst |
Undocumented |
| Instance Variable | _move |
Undocumented |
| Instance Variable | _move |
Undocumented |
| Instance Variable | _movement |
Undocumented |
| Instance Variable | _movement |
Undocumented |
Inherited from BaseStage:
| Method | get |
Return a tuple containing (x, y, z) position. |
| Method | invert |
Invert the direction setting of the given axis. |
| Method | jog |
Make a relative move that may be interrupted by a future jog. |
| Method | move |
Make an absolute move. Keyword arguments should be axis names. |
| Method | move |
Make a relative move. Keyword arguments should be axis names. |
| Method | move |
Move to the location specified by an (x, y, z) tuple. |
| Method | update |
Update the position property from the stage. |
| Class Variable | backlash |
The number of steps to elimate backlash. The sign sets the direction. |
| Property | axis |
The names of the stage's axes, in order. |
| Property | position |
Current position of the stage. |
| Property | thing |
Summary metadata describing the current state of the stage. |
| Method | _apply |
Undocumented |
| Method | _get |
Get the next JogCommand from the jog queue. |
| Method | _jog |
Execute jog commands in a background thread. |
| Method | _move |
Make a movement with backlash correction. |
| Method | _send |
Send a jog command to the background jog thread. |
| Class Variable | _axis |
Undocumented |
| Instance Variable | _backlash |
Undocumented |
| Instance Variable | _hardware |
Undocumented |
| Instance Variable | _jog |
Undocumented |
| Instance Variable | _jog |
Undocumented |
| Instance Variable | _jog |
Undocumented |
type[ BaseException], _exc_value: BaseException | None, _traceback: TracebackType | None):
(source)
¶
Stop the move thread.
lt.ThingServerInterface, step_time: float = 0.001, **kwargs: Any):
(source)
¶
Initialise the Dummy stage, setting the step_time to adjust the speed.
| Parameters | |
thinglt.ThingServerInterface | Undocumented |
stepfloat | The time in seconds per "motor" step. The default of 0.001 works well for the live simulation. For unit testing it is very slow so the speed can be increased. Increasing it too far is problematic if also doing computationally heavy tasks like simulated image blurring. |
**kwargs:Any | Undocumented |
Make the current position zero in all axes.
This action does not move the stage, but resets the position to zero. It is intended for use after manually or automatically recentring the stage.
Start a relative move.
This starts the stage moving, but does not wait for the move to complete. It sets self.moving to True: resetting it is the responsibility of the calling code.
Read position from the stage and set internal attribute _hardware_position.
_hardware_position should only be set in this function.
Run the move loop. This should be run in a thread on enter.
This controls all movement of the dummy stage.