Metadata-Version: 2.5
Name: pyobs-zaber
Version: 2.0.6
Summary: pyobs model for Zaber motors
Project-URL: Homepage, https://www.pyobs.org
Project-URL: Documentation, https://docs.pyobs.org
Project-URL: Repository, https://github.com/pyobs/pyobs-zaber
Project-URL: Issues, https://github.com/pyobs/pyobs-zaber/issues
Author-email: Leon Meerwart <leon.meerwart@uni-goettingen.de>
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: pyobs-core<3,>=2.0.0
Requires-Dist: zaber-motion<5,>=4.7.0
Description-Content-Type: text/markdown

Zaber module for *pyobs*
========================

This is a [pyobs](https://www.pyobs.org) module for selecting between named positions (e.g. instrument ports)
on a [Zaber](https://www.zaber.com/) linear motor.


Install *pyobs-zaber*
-----------------------
Clone the repository:

    git clone https://github.com/pyobs/pyobs-zaber.git
    cd pyobs-zaber

Install it with [uv](https://docs.astral.sh/uv/):

    uv sync

Alternatively, with plain `venv`/`pip`:

    python3 -m venv .venv
    source .venv/bin/activate
    pip install .


Configuration
-------------
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


Dependencies
------------
* [pyobs-core](https://github.com/pyobs/pyobs-core) for the core functionality.
* [zaber-motion](https://pypi.org/project/zaber-motion/) for communicating with the motor.
