Skip to main content

NEREA (Neutron Energy-integrated Reactor Experiment Analysis) is a Python package designed for the analysis and evaluation of spectral indices and reaction rates from fission fragment spectra. The package provides a comprehensive set of tools for handling, processing, and analyzing nuclear data, specifically focusing on fission fragment spectra, effective mass, and reaction rates.

Project description

codecov CI PyPI version

here

NEREA

NEREA (Neutron Energy-integrated Reactor Experiment Analysis) is a Python package designed for the analysis and evaluation of spectral indices and reaction rates from fission fragment spectra. The package provides a comprehensive set of tools for handling, processing, and analyzing nuclear data, specifically focusing on fission fragment spectra, effective mass, and reaction rates. The documentation of NEREA can be found here.

Main features

  • Pulse Height Spectrum Analysis: Tools to handle and analyze pulse height spectrum data.
  • Effective Mass Calculation: Methods to compute effective mass from integral data (i.e., fission chamber calibration).
  • Reaction Rate Computation: Functions to calculate reaction rates per unit power and mass using pulse height spectra and effective masses.
  • Spectral Index Calculation: Tools to compute spectral indices by comparing reaction rates.
  • Control Rod Calibration: Tools to compute the control rod calibration curve and measure reactivity worth.
  • Fission Traverse Processing: Tools to process fission traverse experiments.
  • C/E Calculation: Compute C/E values from simulated and experimental data.

🔧 Installation

User installation via TestPypi

python -m pip install --extra-index-url https://test.pypi.org/simple/ nerea

To install NEREA with pip:

pip install nerea

Or from Test PyPI:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nerea

Otherwise, clone the repository and use pip to install the dependencies:

git clone https://github.com/GrimFe/NEREA.git
cd nerea
pip install .

Use NEREA with no installation

To import NEREA (without installation)

import sys
sys.path.insert(0, r"path/to/nerea")
import nerea

🗺️ Structure

A schematic of the main structure of NEREA: here Some of the main features of NEREA are:

  • DATA - dedicated to the interface with detector raw data and preprocessing:
    • EffectiveMass or EM
    • PulseHeightSpectrum or PHS
    • PulseHeightSpectra or FFSa
    • CountRate or RR
    • CountRates or RRs
  • Experiemntal - objects created out of the DATA and related processing:
    • NormalizedPulseHeightSpectrum or NPHS
    • SpectralIndex or SI
    • Traverse or Traverse
    • ControlRod or CR.
  • CALCULATED - objects crated from model outputs:
    • CalculatedSpectralIndex or CSI
    • CalculatedTraverse or CT
  • C/E - comparison of calculations to experiments:
    • CoverE or CE
    • CoverC or CC
    • EoverE or EE
  • Useful functions are stored in

💡 Examples and Concept

NEREA comes with examples in the docstrings and test that can serve a similar purpose.

NEREA outputs are normally formatted as pd.DataFrame by the _make_df() function. A standard workflow for spectral index processing is outlined in the following (slightly simplified with respect to some options), for control rod calibration and fission traverse measurement we refer you to docstrings and tests. Any keyword argument to customize your processing beyond default options can be passed at any stage of the Normalized PHS processing. The SpectralIndex.processing() can take numerator and denominator kwargs.

 ```python
import nerea
import pandas as pd

# FISSION CHAMBER CALIBRATION
# Composition and monitor for first detector
composition1 = pd.DataFrame({"value": 100, "uncertainty": 0}, index=["U235"])
pm_cal1 = nerea.CountRate.from_ascii("PM1.txt", detector=1, deposit_id="U235")
em1 = (
    nerea.PulseHeightSpectrum.from_formatted_TKA("cal1.TKA").calibrate(
        nerea.constants.KNBS,
        composition1,
        monitor=pm_cal1,
        one_group_xs=nerea.Xs(nerea.constants.XS_FAST)
    )
)

# Composition and monitor for second detector
composition2 = pd.DataFrame({"value": 100, "uncertainty": 0}, index=["U238"])
pm_cal2 = nerea.CountRate.from_ascii("PM2.txt", detector=2, deposit_id="U235")
em2 = (
    nerea.PulseHeightSpectrum.from_formatted_TKA("cal2.TKA").calibrate(
        nerea.constants.KNBS,
        composition2,
        monitor=pm_cal2,
        one_group_xs=nerea.Xs(nerea.constants.XS_FAST)
    )
)

# SPECTRAL INDEX PROCESSING
# Measured spectra
phs1 = nerea.PulseHeightSpectrum.from_formatted_TKA("meas1.TKA")
phs2 = nerea.PulseHeightSpectrum.from_formatted_TKA("meas2.TKA")

# Count rates for measurements
pm1 = nerea.CountRate.from_ascii("M1.txt", detector=1, deposit_id="U235")
pm2 = nerea.CountRate.from_ascii("M2.txt", detector=1, deposit_id="U235")

# Compute spectral index
si = nerea.SpectralIndex(
    nerea.NormalizedPulseHeightSpectrum(phs1, em1, pm1),
    nerea.NormalizedPulseHeightSpectrum(phs2, em2, pm2)
)

# C/E calculation
# Calculated spectral index from model detectors
c = nerea.CalculatedSpectralIndex.from_detectors("model_det0.m", ["d1", "d2"])

# C/E - 1 [%] calculation
ce = nerea.CoverE(c, si).process(minus_one_percent=True)

# ce is a pandas.DataFrame with columns 'value' and 'uncertainty'

``` 

🤝 Acknowledgments

NEREA was conceived and developed as a part of the PhD thesis on Neutron Data Benchmarking at the VENUS-F zero power reactor for MYRRHA in the framework of a collaboration between SCK CEN and ULB, supported financially by Association Vinçotte Nuclear (AVN).

The authors thank Agnese Carlotti for designing the logo of NEREA.

📋 Reference

The NEREA package

Spectral Indices (first use)

🌍 Publications

This is a not complete list of publications featuring NEREA.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nerea-0.1.1.tar.gz (73.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nerea-0.1.1-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

Details for the file nerea-0.1.1.tar.gz.

File metadata

  • Download URL: nerea-0.1.1.tar.gz
  • Upload date:
  • Size: 73.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for nerea-0.1.1.tar.gz
Algorithm Hash digest
SHA256 22086e7d5bf1e1030326fcc751fd01ba82469f38f19dfc1da73eda9b89436119
MD5 4a1cdaf44ae6a45cac1d7819ff105e58
BLAKE2b-256 a282642996b4b470b968e36cc8bf5ba8a7f325c9b6bc29d299ae6219ae151419

See more details on using hashes here.

File details

Details for the file nerea-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nerea-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 55.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for nerea-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3933fb228fd7da72c0391ff0f72f5824426b28b4b4320e6e506b72185aa67ca
MD5 b31af303d0bf218afdffbd831f3fe0a6
BLAKE2b-256 fbe105f8391136bd31953490a6f3552b552d62838096ed53a652eefa43381c54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page