Reaction

class curie.Reaction(reaction_name, library='best')[source]

Cross section data for nuclear reactions

Contains reaction cross sections as a function of incident energy, and some useful methods for manipulating cross section data, such as flux-averages, integrated cross-sections, and interpolation. All cross sections (and uncertainties) are in mb, and all energies are in MeV.

Parameters:
reaction_namestr

Name of the reaction, in nuclear reaction notation. E.g. ‘115IN(n,g)’, ‘235U(n,f)’, ‘139LA(p,x)134CE’, ‘Ra-226(n,2n)Ra-225’, ‘Al-27(n,a)’, etc.

librarystr, optional

Name of the library to use, or ‘best’ (default).

Attributes:
targetstr

The target nucleus. The IAEA monitor, IRDFF and TENDL residual-product libraries also carry natural elements, e.g. ‘natEl’.

incidentstr

Incident particle. E.g. ‘n’, ‘p’, ‘d’.

outgoingstr

Outgoing particle, or reaction shorthand. E.g. ‘2n’, ‘d’, ‘f’, ‘inl’, ‘x’. Will always be ‘x’ for (TENDL) residual product libraries.

productstr

The product isotope.

interp_configdict

Interpolation configuration, set as a property or through keyword arguments to interpolate/interpolate_unc. The one key is ‘interpolation’: ‘pchip-sqrt’ (default for the TENDL libraries) or ‘linear’ (default for ENDF, IRDFF and IAEA).

engnp.ndarray

Incident particle energy, in MeV.

xsnp.ndarray

Reaction cross section, in mb.

unc_xsnp.ndarray

Uncertainty in the cross section, in mb. If not provided by the library, default is zeros of same shape as xs.

namestr

Name of the reaction in nuclear reaction notation.

libraryci.Library

Nuclear reaction library. printing rx.library.name will give the name of the library.

TeXstr

LaTeX formatted reaction name.

Methods

average(energy, flux[, unc])

Flux averaged reaction cross section

integrate(energy, flux[, unc])

Reaction flux integral

interpolate(energy, **interp_config)

Interpolated cross section

interpolate_unc(energy, **interp_config)

Uncertainty in interpolated cross section

plot([energy, label, title])

Plot the cross section

Examples

>>> rx = ci.Reaction('226RA(n,2n)')
>>> print(rx.library.name)
ENDF/B-VIII.1
>>> rx = ci.Reaction('226RA(n,x)225RA')
>>> print(rx.library.name)
TENDL-2025
>>> rx = ci.Reaction('115IN(n,inl)')
>>> print(rx.library.name)
IRDFF-II
average(energy, flux, unc=False)[source]

Flux averaged reaction cross section

Calculates the flux-weighted average reaction cross section, using the input flux and energy grid.

Parameters:
energyarray_like

Incident particle energy, in MeV.

fluxarray_like

Incident particle flux as a function of the input energy grid.

uncbool, optional

If True, returns the both the flux average cross section and the uncertainty. If False, just the average cross section is returned. Default False.

Returns:
average_xsfloat or tuple

Flux-averaged reaction cross section if unc=False (default), or average and uncertainty, if unc=True.

Examples

>>> rx = ci.Reaction('Ni-58(n,p)')
>>> eng = np.linspace(1, 5, 20)
>>> phi = np.ones(20)
>>> print(rx.average(eng, phi))
210.3226525877...
>>> print(rx.average(eng, phi, unc=True))
(210.3226525877..., ...)
integrate(energy, flux, unc=False)[source]

Reaction flux integral

Integrate the product of the cross section and flux along the input energy grid.

Parameters:
energyarray_like

Incident particle energy, in MeV.

fluxarray_like

Incident particle flux as a function of the input energy grid.

uncbool, optional

If True, returns the both the flux integral and the uncertainty. If False, just the flux integral is returned. Default False.

Returns:
xs_integralfloat or tuple

Reaction flux integral if unc=False (default), or reaction flux integral and uncertainty, if unc=True.

Examples

>>> rx = ci.Reaction('Ni-58(n,p)')
>>> eng = np.linspace(1, 5, 20)
>>> phi = np.ones(20)
>>> print(rx.integrate(eng, phi))
885.5690635272...
>>> print(rx.integrate(eng, phi, unc=True))
(885.5690635272..., ...)
interpolate(energy, **interp_config)[source]

Interpolated cross section

Interpolation of the reaction cross section along the input energy grid. The scheme comes from interp_config (per-library defaults: ‘pchip-sqrt’ for the TENDL libraries — monotone PCHIP interpolation in sqrt(E)-sqrt(sigma) space, exact through the evaluated points with no overshoot at thresholds — and ‘linear’ for the pointwise-linearized ENDF, IRDFF and IAEA libraries). Energies outside the evaluated grid return 0 rather than an extrapolation.

Parameters:
energyarray_like

Incident particle energy, in MeV.

interp_configoptional keyword arguments

Updates to interp_config, applied before interpolating and kept for later calls, e.g. rx.interpolate(E, interpolation='linear').

Returns:
cross_sectionnp.ndarray

Interpolated cross section, in mb.

Examples

>>> rx = ci.Reaction('115IN(n,g)', 'IRDFF')
>>> print(rx.interpolate(0.5))
161.41646650941306
>>> print(rx.interpolate([0.5, 1.0, 5.0]))
[161.41646651 171.81486757 8.8822]
interpolate_unc(energy, **interp_config)[source]

Uncertainty in interpolated cross section

Interpolation of the uncertainty in the reaction cross section along the input energy grid, for libraries where uncertainties are provided, using the same interp_config scheme as interpolate.

Parameters:
energyarray_like

Incident particle energy, in MeV.

interp_configoptional keyword arguments

Updates to interp_config, applied before interpolating and kept for later calls.

Returns:
unc_cross_sectionnp.ndarray

Uncertainty in the interpolated cross section, in mb.

Examples

>>> rx = ci.Reaction('115IN(n,g)', 'IRDFF')
>>> print(rx.interpolate_unc(0.5))
3.9542683715745546
>>> print(rx.interpolate_unc([0.5, 1.0, 5.0]))
[3.95426837 5.88023936 0.4654]
plot(energy=None, label='reaction', title=False, **kwargs)[source]

Plot the cross section

Plots the energy differential cross section.

Parameters:
energyarray_like, optional

Energy grid along which to plot the cross section. If None, the energy grid provided by the library will be used.

labelstr, optional

Axes label. If label=’reaction’, the label will be the reaction name. If ‘library’, it will be the name of the cross section library. If ‘both’, then the reaction name and library will be given. If none of these options, pyplot will be called with ax.plot(..., label=label).

titlebool, optional

Display the reaction name as the plot title. Default, False.

Other Parameters:
**kwargs

Optional keyword arguments for plotting. See the plotting section of the curie API for a complete list of kwargs.

Examples

>>> rx = ci.Reaction('115IN(n,g)')
>>> rx.plot(scale='loglog')
>>> rx = ci.Reaction('35CL(n,p)')
>>> f, ax = rx.plot(return_plot=True)
>>> rx = ci.Reaction('35CL(n,el)')
>>> rx.plot(f=f, ax=ax, scale='loglog')