ALPHANSO: ALPHA Neutron SOurces
Open-source Python package for modeling ($\alpha$,n) neutron source terms.
Motivation
Legacy ($\alpha$,n) codes such as SOURCES-4C are written in FORTRAN 77 with nuclear data from the 1980s and have not been maintained since 2002. ALPHANSO provides a modern, open-source replacement built on up-to-date evaluated nuclear data libraries stored in the GNDS format. It covers all naturally occurring target nuclides and agrees well with experimental data.
Applications include reactor design, nuclear safeguards, radioactive waste management, nuclear astrophysics, and dark matter detection experiments.
Key Features
- Multiple Geometry Types: Beam, homogeneous, interface, and sandwich configurations
- Accurate Physics: Up-to-date nuclear data with customizable data sources
- Complete Output: Neutron yields and energy spectra, plus the alpha-induced prompt gamma source term (yields and discrete lines, validated against SaG4n/Geant4)
- Command-Line & Python API: Use via CLI or integrate into Python workflows
Installation
From PyPI
pip install alphanso
On first use, ALPHANSO automatically downloads ~1.1 GB of nuclear data files and caches them locally (e.g., ~/.local/share/alphanso/ on Linux). To pre-download the data:
alphanso download-data
From Source
git clone https://github.com/alphanso-org/alphanso.git
cd alphanso
pip install -e .
When installed from source, ALPHANSO uses the bundled alphanso/data/ directory directly (no download needed).
Custom Data Location
Set the ALPHANSO_DATA_DIR environment variable to override the data directory:
export ALPHANSO_DATA_DIR=/path/to/nuclear/data
Use alphanso data-info to check the current data paths and status.
Quick Start
Command-Line Interface
Run ALPHANSO with a YAML configuration file:
alphanso path/to/config.yaml
Or equivalently:
python3 -m alphanso path/to/config.yaml
Results are saved to alphanso_output/<config_name>/. You can specify a custom output directory as a second CLI argument: alphanso config.yaml my_output/.
Example YAML Configurations
Beam — monoenergetic alpha beam on a thick target:
name: "Be-9 Beam Calculation"
calc_type: "beam"
matdef:
Be-9: 1.0
beam_energy: 5.0
Homogeneous — uniform mixture of alpha emitters and targets:
name: "Homogeneous Source"
calc_type: "homogeneous"
matdef:
Pu-239: 0.3
Pu-238: 0.2
Be-9: 0.5
Interface — planar interface between source and target regions:
name: "Interface Geometry"
calc_type: "interface"
source_matdef:
Pu-238: 1.0
source_density: 19.8
target_matdef:
Be-9: 1.0
Sandwich — multi-layer geometry with intermediate layers:
name: "Multi-Layer Sandwich"
calc_type: "sandwich"
source_matdef:
Pu-238: 1.0
source_density: 19.8
target_matdef:
Be-9: 1.0
intermediate_layers:
- matdef: { C-13: 1.0 }
density: 2.26
thickness: 1.0e-4
- matdef: { Al-27: 1.0 }
density: 2.70
thickness: 1.0e-4
Python API
from alphanso.transport import Transport
config = {
"calc_type": "beam",
"matdef": {"Be-9": 1.0},
"beam_energy": 5.0
}
results = Transport.calculate(config)
print(f"Neutron yield: {results['an_yield']:.3e} n/alpha")
Transport.calculate() accepts optional keys in the config dict:
name(str): Label for identification in CLI outputoutput_dir(str): Directory to saveresults.yaml.save_data_files(bool, default:True): Whether to save output files whenoutput_diris specified. Set toFalseto skip file saving.
Running Tests
pytest
Calculation Types
ALPHANSO supports four calculation geometries, each designed for specific physical scenarios.
1. Beam Calculations (calc_type: "beam")
Monoenergetic or polyenergetic alpha beam incident on a thick target.
Required Parameters:
matdef(dict): Target material composition (ZAID or element names with mass fractions)beam_energy(float): Alpha beam energy in MeV (monoenergetic)beam_intensities(list, optional): List of [energy, intensity] pairs for polyenergetic beams (use instead ofbeam_energy)
Optional Parameters:
num_alpha_groups(int, default:15000): Number of alpha energy groupsmin_alpha_energy(float, default:1e-11): Minimum alpha energy in MeVmax_alpha_energy(float, default:15): Maximum alpha energy in MeVneutron_energy_bins(list or NumPy array, optional): Neutron energy bin edges in MeV. Three-element lists are shorthand[start, stop, num_points]for linearly spaced edges; lists of other lengths and all NumPy arrays specify explicit edges. Default: 101 edges spanning 0–15 MeV (100 bins).an_xs_data_dir(str): Path to ($\alpha$,n) cross-section data directorystopping_power_data_dir(str): Path to stopping power data directory
Results:
an_yield: Neutron production rate (n/$\alpha$)an_spectrum: Normalized neutron energy spectruman_spectrum_absolute: Absolute neutron spectrumneutron_energy_bins: Energy bins for spectrum (MeV)
2. Homogeneous Calculations (calc_type: "homogeneous")
Uniform mixture of alpha-emitting isotopes and target materials.
Required Parameters:
matdef(dict): Material composition including both alpha emitters and targets
Optional Parameters:
num_alpha_groups(int, default:15000): Number of alpha energy groupsmin_alpha_energy(float, default:1e-11): Minimum alpha energy in MeVmax_alpha_energy(float, default:15): Maximum alpha energy in MeVneutron_energy_bins(list or NumPy array, optional): Neutron energy bin edges in MeV. Three-element lists are shorthand[start, stop, num_points]for linearly spaced edges; lists of other lengths and all NumPy arrays specify explicit edges. Default: 101 edges spanning 0–15 MeV (100 bins).an_xs_data_dir(str): Path to cross-section datastopping_power_data_dir(str): Path to stopping power datadecay_data_dir(str): Path to decay/branching data
Results:
an_yield: Alpha-n neutron yield (n/s/g)sf_yield: Spontaneous fission neutron yield (n/s/g)combined_yield: Combined (alpha-n + SF) yield (n/s/g) - default outputan_spectrum: Normalized alpha-n neutron spectrumsf_spectrum: Normalized spontaneous fission neutron spectrumcombined_spectrum: Combined normalized neutron spectrumneutron_energy_bins: Energy bins (MeV)
3. Interface Calculations (calc_type: "interface")
Planar interface between an alpha-emitting source region and a target region.
Required Parameters:
source_matdef(dict): Alpha source material compositionsource_density(float): Source density in g/cm^3target_matdef(dict): Target material composition
Optional Parameters:
num_alpha_groups(int, default:15000): Number of alpha energy groupsmin_alpha_energy(float, default:1e-11): Minimum alpha energy in MeVmax_alpha_energy(float, default:15): Maximum alpha energy in MeVneutron_energy_bins(list or NumPy array, optional): Neutron energy bin edges in MeV. Three-element lists are shorthand[start, stop, num_points]for linearly spaced edges; lists of other lengths and all NumPy arrays specify explicit edges. Default: 101 edges spanning 0–15 MeV (100 bins).an_xs_data_dir(str): Cross-section data pathstopping_power_data_dir(str): Stopping power data pathdecay_data_dir(str): Decay data path
Results:
an_yield: Neutron yield per cm^2 of interface (n/s/cm^2)an_spectrum: Normalized spectruman_spectrum_absolute: Absolute spectrum (n/s/cm^2/MeV)neutron_energy_bins: Energy bins (MeV)
4. Sandwich Calculations (calc_type: "sandwich")
Multi-layer sandwich geometry with volumetric formulation. Alpha source (Region A) -> Intermediate layers (Region B1, B2, ..., Bn) -> Target (Region C).
Required Parameters:
source_matdef(dict): Alpha source material composition (Region A)source_density(float): Source density in g/cm^3target_matdef(dict): Target material composition (Region C)intermediate_layers(list of dicts): One or more intermediate layers, each containing:matdef(dict): Layer material compositiondensity(float): Layer density in g/cm^3thickness(float): Layer thickness in cm
Optional Parameters:
n_angular_bins(int, default:40): Angular bins for integrationnum_alpha_groups(int, default:15000): Number of alpha energy groupsmin_alpha_energy(float, default:1e-11): Minimum alpha energy in MeVmax_alpha_energy(float, default:15): Maximum alpha energy in MeVneutron_energy_bins(list or NumPy array, optional): Neutron energy bin edges in MeV. Three-element lists are shorthand[start, stop, num_points]for linearly spaced edges; lists of other lengths and all NumPy arrays specify explicit edges. Default: 101 edges spanning 0–15 MeV (100 bins).an_xs_data_dir(str): Cross-section data pathstopping_power_data_dir(str): Stopping power data pathdecay_data_dir(str): Decay data path
Results:
an_yield: Total neutron yield (n/s/cm^2)yield_target: Yield in target region (n/s/cm^2)yield_layers: Per-layer yield breakdown (list of n/s/cm^2)yield_ab_b: Yield at AB interface in first layer materialyield_bc_b: Yield at BC interface in last layer materialyield_bc_c: Yield at BC interface in target materialan_spectrum: Normalized total spectruman_spectrum_absolute: Absolute total spectrumspectrum_layers: Per-layer spectrum contributionsneutron_energy_bins: Energy bins (MeV)
Material Definition Format
Materials are defined using dictionaries with isotope/element identifiers as keys and mass fractions as values.
Supported Formats:
- Element-mass names:
"Be-9","C-13","Al-27","Pu-238" - Natural element symbols:
"C","O"(auto-expands to natural isotopes using abundance data) - ZAID integers:
4009(Be-9),6013(C-13),94238(Pu-238) - Natural element ZAIDs:
6000(natural C),8000(natural O) — AAA=000 convention
Note: ZAID keys in Python dicts must be integers, not strings. Using string keys like
"92235"will cause entries to be silently dropped.
Example:
matdef:
Pu-238: 0.90
Pu-239: 0.05
Pu-240: 0.05
Or in Python:
matdef = {94238: 0.90, 94239: 0.05, 94240: 0.05}
Mass fractions should sum to 1.0 for single-phase materials, but can exceed 1.0 for compounds.
Output Files
When using the CLI, results are saved to alphanso_output/<config_name>/ as results.yaml.
Custom Data Sources
ALPHANSO allows you to use custom nuclear data:
an_xs_data_dir: "/path/to/cross_sections"
stopping_power_data_dir: "/path/to/stopping_data"
decay_data_dir: "/path/to/decay_data"
Paths can be absolute or relative to the project root. If not specified, ALPHANSO uses built-in default data.
To integrate new data formats, extend the parsers in alphanso/parsers.py.
Nuclear Data Sources
ALPHANSO's bundled nuclear data is derived from the following evaluated libraries and databases, whose authors and maintainers we gratefully acknowledge:
- ($\alpha$,n) cross sections and secondary-neutron distributions — the JENDL-5 $\alpha$ sub-library and JENDL/AN-2005 (Japan Atomic Energy Agency), the TENDL TALYS-based evaluated library, and ENDF/B-VIII.0, stored in GNDS format.
- Alpha-induced gamma production — the
JENDLTENDL01charged-particle library (JENDL/AN-2005 for the light target nuclides combined with TENDL-2017), distributed with the SaG4n code by E. Mendoza et al., together with residual-nucleus level schemes from the Geant4 neutron data library (G4NDL). - Stopping powers — NIST ASTAR and SRIM.
- Decay and nuclear-structure data — ENDF/B-VIII.0 and RIPL-3 (IAEA).
The alpha-induced gamma source-term calculation uses the ($\alpha$,xn) data library and methodology of:
E. Mendoza, D. Cano-Ott, V. Pesudo, and R. Santorelli, "Neutron production induced by $\alpha$-decay with Geant4," Nuclear Instruments and Methods in Physics Research Section A 960, 163659 (2020). doi:10.1016/j.nima.2020.163659
Underlying evaluated libraries: TENDL (A. J. Koning et al., Nucl. Data Sheets 155, 1, 2019); JENDL-5 (O. Iwamoto et al., J. Nucl. Sci. Technol. 60, 1, 2023); Geant4 / G4NDL (S. Agostinelli et al., Nucl. Instrum. Methods A 506, 250, 2003).
Citation
If you use ALPHANSO in your research, please cite:
@article{rawal2026alphanso,
title = {ALPHANSO: Open-source modeling of ($\alpha$, n) neutron source terms},
author = {Divit Rawal and Anthony J. Nelson and William Zywiec and Daniel Siefman},
journal = {Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment},
year = {2026},
pages = {171713},
doi = {10.1016/j.nima.2026.171713},
url = {https://www.sciencedirect.com/science/article/pii/S0168900226004390?via%3Dihub}
}
Contributing
Contributions are welcome. To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes and push to your fork
- Open a pull request against
main
Please open an issue first for bug reports or feature requests.
License
This project is licensed under the BSD-3-Clause License. See the LICENSE file for details.
Authors
- Divit Rawal - divit.rawal@berkeley.edu
- Anthony J. Nelson - nelson254@llnl.gov
- William Zywiec - zywiec1@llnl.gov
- Daniel Siefman - daniel.siefman@berkeley.edu
Support
For questions, issues, or feature requests, please open an issue on GitHub or contact the authors.
Release files for alphanso 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alphanso-1.1.1.tar.gz | 160.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alphanso-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 323.9 kB
Release files / alphanso-1.1.1.tar.gz
| Download URL | alphanso-1.1.1.tar.gz |
|---|---|
| Size | 160.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca0b6700f89d967f363b3eef8489276d37119b9daf7692cf32030d773fb49ca7
|
|
BLAKE2b-256 checksum How to use checksums |
2fd1826daff59627475ab36b720f7a8bf157e3ce44590850ed795f2d669a7ddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / alphanso-1.1.1-py3-none-any.whl
| Download URL | alphanso-1.1.1-py3-none-any.whl |
|---|---|
| Size | 163.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
773e562953f3ab549c57253c976967ce9b5b11e4b3fbedef0b95c94d5768d8df
|
|
BLAKE2b-256 checksum How to use checksums |
d4bd966547be71a1a4a26707d5b3f8c60283778be9f3450ae340e33972ff05d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|