Metadata-Version: 2.1
Name: jaeger
Version: 1.0.1
Summary: Controllers for the SDSS-V FPS
Home-page: https://github.com/sdss/jaeger
License: BSD-3-Clause
Keywords: astronomy,software
Author: José Sánchez-Gallego
Author-email: gallegoj@uw.edu
Requires-Python: >=3.8,<3.11
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: astropy (>=5.0.0,<6.0.0)
Requires-Dist: click_default_group (>=1.2.2,<2.0.0)
Requires-Dist: numpy (>=1.21.0,<2.0.0)
Requires-Dist: pandas (>=1.3.4,<2.0.0)
Requires-Dist: progressbar2 (>=3.39.3,<4.0.0)
Requires-Dist: pydl (==1.0.0rc1)
Requires-Dist: sdss-clu (>=1.5.7,<2.0.0)
Requires-Dist: sdss-coordio (>=1.3.1,<2.0.0)
Requires-Dist: sdss-drift (>=0.4.1,<0.5.0)
Requires-Dist: sdss-kaiju (>=1.2.3,<2.0.0)
Requires-Dist: sdssdb (>=0.5.5,<0.6.0)
Requires-Dist: sdsstools (>=0.4.13,<0.5.0)
Requires-Dist: sep (>=1.2.0,<2.0.0)
Requires-Dist: simplification (==0.5.22)
Requires-Dist: tables (>=3.6.1,<4.0.0)
Requires-Dist: zc.lockfile (>=2.0,<3.0)
Project-URL: Documentation, https://sdss-jaeger.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/sdss/jaeger
Description-Content-Type: text/markdown

# jaeger

![Versions](https://img.shields.io/badge/python->3.8-blue)
[![Documentation Status](https://readthedocs.org/projects/jaeger/badge/?version=latest)](https://sdss-jaeger.readthedocs.io/en/latest/?badge=latest)
[![Build](https://img.shields.io/github/workflow/status/sdss/jaeger/Test)](https://github.com/sdss/jaeger/actions)
[![codecov](https://codecov.io/gh/sdss/jaeger/branch/main/graph/badge.svg)](https://codecov.io/gh/sdss/jaeger)

[jaeger](http://pacificrim.wikia.com/wiki/Jaeger>) provides high level control for the SDSS-V [Focal Plane System](https://wiki.sdss.org/display/FPS). Some of the features that jaeger provide are:

- Wraps the low level CAN commands for simpler use.
- Provides a framework that is independent of the CAN interface used (by using the [python-can](https://python-can.readthedocs.io/en/master/) library).
- Interfaces with [kaiju](https://github.com/sdss/kaiju) to provide anticollision path planning for trajectories.
- Implements status and position update loops.
- Provides implementations for commonly used tasks (e.g., go to position, send trajectory).
- Interfaces with the Instrument Electronics Box modbus PLC controller.
- Provides a TCP/IP interface to send commands and output keywords using the SDSS-standard formatting.

The code for jaeger is developed in [GitHub](https://github.com/sdss/jaeger) and can be installed using [sdss_install](https://github.com/sdss/sdss_install) or by running

```console
pip install --upgrade sdss-jaeger
```

To check out the development version do

```console
git clone https://github.com/sdss/jaeger.git
```

jaeger is developed as an [asyncio](https://docs.python.org/3/library/asyncio.html) library and a certain familiarity with asynchronous programming is required. The actor functionality (TCP/IP connection, command parser, inter-actor communication) is built on top of [CLU](https://github.com/sdss/clu).

## A simple jaeger program

```python
import asyncio
from jaeger import FPS, log

async def main():

    # Set logging level to DEBUG
    log.set_level(0)

    # Initialise the FPS instance.
    fps = FPS()
    await fps.initialise()

    # Print the status of positioner 4
    print(fps[4].status)

    # Send positioner 4 to alpha=90, beta=45
    await pos.goto(alpha=90, beta=45)

    # Cleanly finish all pending tasks and exit
    await fps.shutdown()

asyncio.run(main())
```

