Skip to content

GrimFe/NEREA

Repository files navigation

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.

About

NEREA (Neutron Energy-integrated Reactor Experiment Analysis)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages