Automated ranging, species identification, and composition for time-of-flight (APT) mass spectra
Project description
Rangefinder
Automated ranging, species identification, and composition for time-of-flight
(atom probe tomography) mass spectra. Rangefinder goes from a raw event list
(.pos/.epos, or any array of m/z values) to ranged peaks, identified ionic
species, and isotope-resolved composition — with no user-supplied ranges, no
candidate element list, no interactive tuning, and no manual curation.
It is deterministic (operator variance is exactly zero), pure Python (NumPy/SciPy/pandas), and ships its own benchmark harness against the open-source APT ecosystem.
Install
python -m pip install rangefinder
For development:
git clone https://github.com/kylemcdonald/rangefinder.git
cd rangefinder
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
Quick start
from pathlib import Path
import rangefinder
from rangefinder.io.pos_loader import PosSampleData, PosSampleMetadata
from rangefinder.benchmark.truth import load_pos_arrays
sample_path = Path("your_sample.pos")
x, y, z, mz = load_pos_arrays(sample_path)
meta = PosSampleMetadata(path=sample_path, sample_name="s", sample_slug="s",
event_count=len(mz), file_size_bytes=len(mz) * 16,
verified_big_endian_float32=True,
verified_columns=("x_nm", "y_nm", "z_nm", "m_over_z_da"))
sample = PosSampleData(metadata=meta, x_nm=x, y_nm=y, z_nm=z, m_over_z_da=mz)
config = rangefinder.load_default_config()
artifacts = rangefinder.run_custom_pipeline(sample, Path("out"), config)
print(artifacts.elemental_composition)
Layout
src/rangefinder/— the package.analysis/— the Rangefinder pipeline (custom_pipeline) plus the comparator front-ends (naive, PyCCAPT, pyOpenMS) and shared assignment/composition stages.benchmark/— ground-truth registry, metrics, and detection-ablation harness.io/,references/,validation/,utils/— POS loading, isotope tables, the synthetic generator, config/paths helpers.bridge.py,bridge_runner.py— run foreign-toolchain comparators (APAV, ms_deisotope, APyT) in a separate environment.config/defaults.yaml— the bundled default pipeline configuration (rangefinder.default_config_path()).
scripts/— the benchmark and paper-table generators.paper/—rangefinder.texand its auto-generatedtables/.controls/— public CC-BY reference datasets (fetch large files withscripts/download_benchmark_controls.sh; reproducible raw data and generated synthetic controls are git-ignored, while provenance and range files are tracked).
Reproduce the benchmark and paper
scripts/download_benchmark_controls.sh # fetch public controls
scripts/bootstrap_env.sh # install comparator environments
python scripts/run_benchmark.py # all methods x all datasets
python scripts/run_detection_ablation.py # detection-stage ablation
python scripts/run_ablation.py # pipeline-stage ablation
python scripts/build_paper_tables.py # regenerate paper/tables/*.tex
tectonic paper/rangefinder.tex
Every number in the paper regenerates from these commands; table numbers are never hand-edited.
License
The software is released under the MIT License. The reference data
and range files under controls/ remain CC-BY-4.0 as documented in
controls/README.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rangefinder-0.1.0.tar.gz.
File metadata
- Download URL: rangefinder-0.1.0.tar.gz
- Upload date:
- Size: 100.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1a7292f4e7c181915fbd14dd6c5a08ba4f4501634eeb882f3cd7b7c39cb37b
|
|
| MD5 |
d358d6870bbd26f0199ffaefcf5af9db
|
|
| BLAKE2b-256 |
e8c31e621570fc1a7e9ca0325a103832052966418f95a7ffdd89f09b5d5da34a
|
Provenance
The following attestation bundles were made for rangefinder-0.1.0.tar.gz:
Publisher:
release.yml on kylemcdonald/rangefinder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rangefinder-0.1.0.tar.gz -
Subject digest:
dc1a7292f4e7c181915fbd14dd6c5a08ba4f4501634eeb882f3cd7b7c39cb37b - Sigstore transparency entry: 2215006934
- Sigstore integration time:
-
Permalink:
kylemcdonald/rangefinder@e0955d1e74bec3c9111a90586fe1971d901068db -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kylemcdonald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0955d1e74bec3c9111a90586fe1971d901068db -
Trigger Event:
release
-
Statement type:
File details
Details for the file rangefinder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rangefinder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 106.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f0ea60af44b7da31a4ed24bb44a053bfc27779642b53d823373aae4ea5a5e27
|
|
| MD5 |
30a8e191ac4e61b0d4c40662e7a732b3
|
|
| BLAKE2b-256 |
7569b100705dcde7b73acac65c9ccb083be9bdfbf9b715476a8aec6f94bf8ce2
|
Provenance
The following attestation bundles were made for rangefinder-0.1.0-py3-none-any.whl:
Publisher:
release.yml on kylemcdonald/rangefinder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rangefinder-0.1.0-py3-none-any.whl -
Subject digest:
1f0ea60af44b7da31a4ed24bb44a053bfc27779642b53d823373aae4ea5a5e27 - Sigstore transparency entry: 2215006945
- Sigstore integration time:
-
Permalink:
kylemcdonald/rangefinder@e0955d1e74bec3c9111a90586fe1971d901068db -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kylemcdonald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0955d1e74bec3c9111a90586fe1971d901068db -
Trigger Event:
release
-
Statement type: