beamio
Read, write, and convert acquired or modelled radiotherapy beam measurements using a shared NumPy-based data model.
Supported formats
| Format | Read | Write | Automatic detection |
|---|---|---|---|
IBA myQA Accept 6 ASCII (.asc) |
Yes | Yes | Yes |
RayStation 2025+ measured-curves CSV (.csv, semicolon-delimited) |
Yes | Yes | No; use Raystation directly |
PTW BEAMSCAN/Mephysto (.mcc) and SNC SunSCAN 3D (.snctxt) are planned
and are not implemented in this release.
Installation
Requires Python 3.12 or newer. NumPy is installed automatically.
python -m pip install beamio
Read and convert beam data
from beamio.rfa import BeamDataFactory, IBAAccept6
from beamio.tps.raystation import Raystation
# Detect and parse an IBA Accept ASCII file.
beam = BeamDataFactory.from_file("measurements.asc")
# Or select the reader explicitly:
# beam = IBAAccept6("measurements.asc").parse()
for measurement in beam.measurements:
print(measurement.type, measurement.energy, measurement.field_size)
print(measurement.positions, measurement.doses)
# Conversion copies measurements and metadata; save writes the target format.
converted = beam.convert(Raystation)
converted.save("measured_curves.csv")
# RayStation CSV files use the explicit reader.
curves = Raystation("measured_curves.csv").parse()
BeamData provides parse(), save(), and convert(). Each Measurement
contains NumPy positions and doses arrays, a MeasurementType, a
RadiationType, energy, SSD, field size, scan endpoints, and a metadata
dictionary. The shared spatial fields use millimetres. Dose values retain the
input scale; conversion does not normalize or calibrate them.
Conversion transfers the shared model and copies metadata, but format-specific writers may use defaults or omit unsupported metadata. In particular, the RayStation writer generates its default file header (including an export time) rather than preserving the input header. IBA parsing removes non-finite sample pairs, sorts and deduplicates positions, and rounds start coordinates to 0.2 mm with values within 0.2 mm of zero set to zero. IBA output rounds coordinates to 0.1 mm. These operations mean that a save is not a byte-for-byte round trip.
Development
python -m venv .venv
Activate the environment with .venv\Scripts\Activate.ps1 in PowerShell or
source .venv/bin/activate on macOS/Linux, then run:
python -m pip install -e ".[dev]"
python -m pytest
python -m build
python -m twine check --strict dist/*
python tools/check_dist.py
The tests generate synthetic measurements in temporary directories. CI tests
the installed wheel on Linux, Windows, and macOS and rebuilds the wheel from the
source distribution. Tests follow the source areas they exercise, with complete
conversions under tests/integration.
beamio uses Conventional Commits and Python Semantic Release. Changes
merged to main pass CI before automatic versioning, release-note generation,
GitHub releases, and PyPI publishing. pyproject.toml is the version source;
beamio.__version__ reads the installed distribution metadata.
Documentation
- Architecture and shared data model
- Format support and conversion behavior
- Development and contribution workflow
- Testing guide
- Versioning, TestPyPI, and releasing
- Release notes
License
GNU General Public License version 2 only (GPL-2.0-only); see
LICENSE.
Metadata
Release files for beamio 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beamio-0.1.0.tar.gz | 40.8 kB | With provenance | Details for beamio-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beamio-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for beamio-0.1.0-py3-none-any.whl |
Total release size: 64.7 kB
Release files / beamio-0.1.0.tar.gz
| Download URL | beamio-0.1.0.tar.gz |
|---|---|
| Size | 40.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40b3f2eeffa4c654a6fc301f66a8057bc0b22cc2586b24710193b7e0fcf090a6
|
|
BLAKE2b-256 checksum How to use checksums |
9b357be2785ae62b9e9d649ac08cf45a16f795f9f6df196efaf2903923ad7181
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / beamio-0.1.0-py3-none-any.whl
| Download URL | beamio-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24ec2ead2eb6b7b1fd55f36d9fd3a09aab53060cac42b97f69528f23abb41685
|
|
BLAKE2b-256 checksum How to use checksums |
02f4c09f6d502264c21dcb3eb780d90f7558a78aac852506353cdbb4ba5664bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for beamio 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for beamio-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.