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).

Examples

>>> rx = ci.Reaction('226RA(n,2n)')
>>> print(rx.library.name)
ENDF/B-VII.1
>>> rx = ci.Reaction('226RA(n,x)225RA')
>>> print(rx.library.name)
TENDL-2015
>>> rx = ci.Reaction('115IN(n,inl)')
>>> print(rx.library.name)
IRDFF-II
Attributes:
targetstr

The target nucleus. Some libraries support 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.

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)

Interpolated cross section

interpolate_unc(energy)

Uncertainty in interpolated cross section

plot([energy, label, title])

Plot the cross section

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))
208.3608978993537
>>> print(rx.average(eng, phi, unc=True))
(208.3608978993537, 4.979629859187442)
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

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

Interpolated cross section

Linear interpolation of the reaction cross section along the input energy grid.

Parameters:
energyarray_like

Incident particle energy, in MeV.

Returns:
cross_sectionnp.ndarray

Interpolated cross section, in mb.

Examples

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

Uncertainty in interpolated cross section

Linear interpolation of the uncertainty in the reaction cross section along the input energy grid, for libraries where uncertainties are provided.

Parameters:
energyarray_like

Incident particle energy, in MeV.

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')