This is a pyobs module for selecting between named positions (e.g. instrument ports) on a Zaber linear motor.
Clone the repository:
git clone https://github.com/pyobs/pyobs-zaber.git
cd pyobs-zaber
Install it with uv:
uv sync
Alternatively, with plain venv/pip:
python3 -m venv .venv
source .venv/bin/activate
pip install .
The ZaberModeSelector class takes a dictionary of named modes mapped to motor positions, plus a required zaber block (may be empty to use all driver defaults) with parameters for the underlying Zaber driver:
modes:
Dictionary of available modes in the form {name: position}.
zaber:
Keyword arguments passed to the underlying ZaberDriver:
port:
USB port of the motor (default: /dev/ttyUSB1).
speed:
Velocity of the selector movement (default: 10000).
acceleration:
Acceleration of the selector movement (default: 800).
initial_mode:
Mode to move to when the module opens (default: not set, i.e. the motor stays where it is).
A basic module configuration would look like this:
class: pyobs_zaber.ZaberModeSelector
name: Mode selector
modes:
Photometry: 0
Spectroscopy: 50000
initial_mode: Photometry
zaber:
port: /dev/ttyUSB0
- pyobs-core for the core functionality.
- zaber-motion for communicating with the motor.