effective_pixel_scale now raises a clear ValueError for image shapes too small for its finite-difference indexing, instead of an IndexError. ModalFitter.fit()'s geometry dict now reuses CAMERA_FIELD_NAMES from geometry.py instead of a duplicated hardcoded tuple. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
he11lib
Mode purity reconstruction of a free-space-propagating gyrotron RF beam from a set of thermal (flux) images taken at different distances from the output window.
Decomposes the beam into Laguerre-Gauss (LG) modes referenced to a known waist size/location/wavelength, accounting for camera geometry, sensor noise, target thermal-diffusion blur, and unknown beam centering/pointing.
See docs/api.md for the full API reference and
examples/full_pipeline_example.py for a runnable end-to-end
demonstration, and
docs/superpowers/specs/2026-07-02-gyrotron-mode-purity-design.md for the
full design.
Install (editable, for development)
pip install -e ".[dev]"
Run tests
pytest
License
GPL-3.0-or-later. See LICENSE.
AI-assisted development disclosure
The initial implementation of this library (design, code, tests, and documentation) was produced with AI assistance:
- Model: Claude Sonnet 5 (
claude-sonnet-5) - Agent/harness: Claude Code CLI, version 2.1.92
All output was reviewed and directed by a human collaborator throughout development.