Metadata-Version: 2.4
Name: feather-xrol
Version: 0.1.1
Summary: Bluesky and Ophyd integration for Attocube interferometer and Hexapod
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bluesky
Requires-Dist: ophyd
Requires-Dist: pyepics
Requires-Dist: tiled
Requires-Dist: python-dotenv
Requires-Dist: matplotlib
Dynamic: license-file

# Project Feather 
contact: awojdyla@lbl.gov 
![Starlings in flight](/assets/starlings_flach.jpg)

Project Feather aims at expending the use of [bluesky data collection framework](https://blueskyproject.io/bluesky/main/index.html) beyond synchrotron beamlines

We want to use Tiled to collect data from optical experiments, or to store metrology data so that it can easily be accessed.

Eventually, you might even be able to start a container that has everything you need.

## Overview

Ophyd/Bluesky device integration for ALS X-Ray Optics Lab (XROL) hardware: the ALS Hexapod (via EPICS) and the Attocube IDS3010 interferometer (via direct network connection).

It exists so that hexapod and interferometer readings can be driven and recorded through the same [Bluesky](https://blueskyproject.io/bluesky/main/index.html) `RunEngine` as any other beamline-style experiment — no bespoke scripts, and data comes out in a format [Tiled](https://blueskyproject.io/tiled/) can catalog directly.

## Requirements

- Python >= 3.9
- Network access to the target hardware:
  - **Hexapod**: an EPICS IOC serving the `ALS:XROL-HEX0*` PVs (Channel Access, UDP/TCP port 5064/5065)
  - **Attocube**: TCP access to the IDS3010 controller (default example IP: `192.168.10.81`)

## Installation

`feather-xrol` is published on [PyPI](https://pypi.org/project/feather-xrol/):

```bash
pip install feather-xrol
```

This pulls in `feather-xrol`'s dependencies (`bluesky`, `ophyd`, `pyepics`, `tiled`, `python-dotenv`, `matplotlib`), as declared in `pyproject.toml`.

## Usage

The package exposes two Ophyd devices: `ALSHexapod` and `AttocubeAxis`. Both plug into a standard Bluesky `RunEngine`.

```python
from feather_xrol.hexapod import ALSHexapod
from bluesky import RunEngine
from bluesky.plans import scan

hexapod = ALSHexapod('ALS:XROL-HEX0', name='hexapod')
hexapod.wait_for_connection(timeout=10)  # requires the IOC to be reachable

RE = RunEngine({})
RE(scan([hexapod.x], hexapod.x, 0.0, 5.0, 10))
```

> If `wait_for_connection` times out, verify the IOC is running and that `EPICS_CA_ADDR_LIST` (and firewall rules) allow Channel Access traffic to it.

See `examples/hexapod_scan.py` for a complete scan and `examples/test_attocube.py` for the Attocube interferometer axis.

> On Ophyd `Device` subclasses, `name` is keyword-only — always pass it as `name=...` rather than positionally.

## License

BSD 3-Clause. See [LICENSE](LICENSE).
