Isotope Spectrum Builder
Generate detector-aware gamma-ray spectra by combining:
- Signal events from Geant4 simulations
- Background events from resampling a real measured background spectrum
Live demo: https://spectrum-builder.streamlit.app
Features
- Detector selection: NaI(Tl), CZT, HPGe (shown only if datasets exist)
- Isotope selection (auto-populated from datasets)
- Binning: 1024 / 2048 / 4096
- Optional custom energy range ([E_{min}, E_{max}]) in keV
- Sampling with replacement (supports more events than in the dataset)
- Normalization:
- raw counts
- counts per second (cps)
- unit-area (Σ = 1)
- Exports:
- CSV spectrum
- PNG image with embedded attribution and isotope name
Installation (local)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
streamlit run app.py
## Installation from PyPI
Spectrum Builder can be installed directly from PyPI:
```bash
pip install spectrum-builder
Then run the web application with
spectrum-builder-app
The batch scripts can be accessed using
-spectrum-builder-batch
-spectrum-builder-sweep
Metadata
Release files for spectrum-builder 1.0.5
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 | |
|---|---|---|---|---|
| spectrum_builder-1.0.5.tar.gz | 76.4 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spectrum_builder-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 153.0 MB
Release files / spectrum_builder-1.0.5.tar.gz
| Download URL | spectrum_builder-1.0.5.tar.gz |
|---|---|
| Size | 76.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbf846054d84f0f27cc4f2026360370a401c4cc26a2a363c8b9a80721e45bc62
|
|
BLAKE2b-256 checksum How to use checksums |
218b6d6805fc28b2cf8280673fc67cd633a3b7a65d41a6296720c271f037b648
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / spectrum_builder-1.0.5-py3-none-any.whl
| Download URL | spectrum_builder-1.0.5-py3-none-any.whl |
|---|---|
| Size | 76.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
133ed1b58264aecba57049d19e813e46be33e10abdd84d31bc5085cbc53c11e0
|
|
BLAKE2b-256 checksum How to use checksums |
3df12e1c855daa534a7d1283b7eccc32a21de27e2977089a5e0c60f07051c08e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for spectrum-builder 1.0.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.