hextools is the data acquisition package for the 27-ID-1 HEX (High Energy
Engineering X-ray scattering) beamline at NSLS-II, Brookhaven National Laboratory.
- Devices — ophyd-async classes for the beamline's shutters, slits, monochromator, filters, motor stages, and detectors (Kinetix, Phantom, GeRM, Perkin Elmer, Vimba cameras, PandABox).
- Plans — bluesky plans for tomography, radiography, energy-dispersive (EDXD) and angle-dispersive (XRD) diffraction, and beamline setup (beam mode, energy, motor moves).
- Collection profile — an IPython startup script that builds the RunEngine, connects every device, and sends data to Tiled.
- HEX Data Acquisition GUI — a Qt application that generates a form for each plan and runs it either in-process or through the Bluesky Queue Server.
- Exporters — automatic export of acquired data from Tiled into beamline file formats.
The project is managed with Pixi, which solves and locks all dependencies, including the conda-only EPICS stack:
git clone https://github.com/NSLS2/hextools.git
cd hextools
pixi installPython 3.11–3.13 are supported and tested.
Start an IPython session with the collection profile loaded:
pixi run start # against real beamline hardware
pixi run start-mock # against simulated devicesStart the data acquisition GUI:
pixi run hex-gui # against real beamline hardware
pixi run hex-gui-mock # against simulated devicesThe GUI can also be launched directly, which exposes additional options:
pixi run -e dev python -m hextools.gui [--mock] [--profile NAME] [--queueserver-uri URI] [--history-file PATH]Queue Server components and the auto-exporter service have their own tasks:
pixi run qs-backend # start-re-manager
pixi run qs-server # bluesky-httpserver
pixi run auto-exporter # Tiled auto-export servicepixi install -e devCommon tasks:
pixi run tests # unit tests (excluding GUI)
pixi run gui-tests # GUI tests, run separately to avoid Qt teardown issues
pixi run all-tests # run all unit tests
pixi run tests-cov # run all unit tests with coverage
pixi run lint # pre-commit (ruff, formatting, import-linter)
pixi run type-check # pyrightBuild the documentation:
pixi run -e docs build-docs # output in docs/_build/html
pixi run -e docs build-docs true # live-reloading preview- Getting started — environments and installation
- Command line — running plans from IPython
- GUI — running plans from the Qt application
- Collection profile — what the startup script sets up
- Developer guide — repository layout and plan conventions
BSD 3-Clause. See LICENSE for details.