ENDF File Support – pyne.endf
¶
Module for parsing and manipulating data from ENDF evaluations. Currently, it only can read several MTs from File 1, but with time it will be expanded to include the entire ENDF format.
All the classes and functions in this module are based on document ENDF-102 titled “Data Formats and Procedures for the Evaluated Nuclear Data File ENDF-6”. The latest version from June 2009 can be found at http://www-nds.iaea.org/ndspub/documents/endf/endf102/endf102.pdf
For more information on the Evaluation class, contact Paul Romano <paul.k.romano@gmail.com>. For more information on the Library class, contact John Xia <john.danger.xia@gmail.com>.
-
class
pyne.endf.
AdlerAdler
(emin, emax, nro, naps)¶ Adler-Adler resolved resonance formalism data. This is identified by LRF=4 in the ENDF-6 format.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
- Attributes
- spinfloat
Spin of the target nucleus
- scattering_radius_indfloat
Scattering radius in units of 10^-12 cm
- LIfloat
Flag indicating the kind of parameters
- AT, BTndarray
Background constants for the total cross section
- AC, BCndarray
Background constants for the radiative cross section
- AF, BFndarray
Background constants for the fission cross section
- resonanceslist of AdlerResonance
List of resonances defined by Adler-Adler parameters
-
read
(self, ev)¶ Read Adler-Adler resonance data from an ENDF evaluation.
- Parameters
- evEvaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
class
pyne.endf.
ArbitraryTabulated
(energy, pdf)¶ Arbitrary tabulated function given in ENDF MF=5, LF=1 represented as
\[f(E \rightarrow E') = g(E \rightarrow E')\]- Attributes
- energyndarray
Array of incident neutron energies
- pdflist of Tab1
Tabulated outgoing energy distribution probability density functions
-
class
pyne.endf.
EnergyDistribution
¶ Energy distribution from ENDF MF=5.
- Attributes
- lfint
Flag specifying energy distribution.
-
class
pyne.endf.
Evaluation
(filename_or_handle, verbose=True)¶ ENDF material evaluation with multiple files/sections
The Evaluation class provides a means to parse data from an ENDF-6 format file and access it as stored internal Python objects. A summary of the parsing capabilities is as follows:
MF
MT
Description
Complete
1
451
Descriptive data and directory
Yes
1
452
Number of neutrons per fission
Yes
1
455
Delayed neutron data
Yes
1
456
Number of prompt neutrons per fission
Yes
1
458
Components of fission energy release
Yes
1
460
Delayed photon data
Yes
2
151
Resonance parameters
Yes
3
Reaction cross sections
Yes
4
Angular distributions
Yes
5
Energy distributions
Yes
6
Product energy-angle distributions
Yes
7
2
Thermal elastic scattering
Yes
7
4
Thermal inelastic scattering
Yes
8
454
Independent fission yields
Yes
8
457
Radioactive decay data
Yes
8
459
Cumulative fission yields
Yes
8
Radioactive nuclide production
Yes
9
Multiplicities of radioactive products
Yes
10
Production cross sections for radionuclides
Yes
12
Photon production yield data
Yes
13
Photon production cross sections
Yes
14
Photon angular distributions
Yes
15
Continuous photon energy spectra
Yes
23
Photon and electron cross sections
Yes
26
Secondary distributions for electro-atomic data
Yes
27
Atomic form factors
Yes
28
533
Atomic relaxation data
Yes
30
1
Directory and correspondance table
No
30
2
Covariance matrix
No
30
Sensitivities
No
31
Covariances of fission
No
32
Covariances of resonance parameters
No
33
Covariances of neutron cross sections
No
34
Covariances for angular distributions
No
35
Covariances for energy distributions
No
40
Covariances for radionuclide production
No
- Attributes
- atomic_relaxationdict
Dictionary containing atomic relaxation data from MF=28, MT=533. If the evaluation is not an atomic relaxation sublibrary, the dictionary is empty.
- decaydict
Dictionary containing decay data from MF=8. If the evaluation is not from a decay sublibrary, the dictionary is empty.
- fissiondict
Dictionary containing fission-related data, such as neutrons release from fission (MF=1, MT=452,455,456), components of energy release (MF=1, MT=458), delayed photons from fission (MF=1, MT=460), and cumulative/independent fission yields (MF=8, MT=454,459).
- infodict
Miscallaneous information about the evaluation.
- targetdict
Information about the target material, such as its mass, isomeric state, whether it’s stable, and whether it’s fissionable.
- projectiledict
Information about the projectile such as its mass.
- reaction_listlist of 4-tuples
List of sections in the evaluation. The entries of the tuples are the file (MF), section (MT), number of records (NC), and modification indicator (MOD).
- reactionscollections.OrderedDict
Dictionary whose keys are MT numbers and values are Reaction instances.
- resonancesdict
Resolved resonance data from MF=2, MT=151.
- thermal_elasticdict
Coherent and/or incoherent thermal elastic data from MF=7, MT=2.
- thermal_inelasticdict
Incoherent thermal inelastic data from MF=7, MT=4.
-
read
(self, reactions=None, skip_mf=[], skip_mt=[])¶ Reads reactions from the ENDF file of the Evaluation object. If no arguments are provided, this method will read all the reactions in the file. A single reaction can be read if provided.
- Parameters
- reactionstuple or list of tuple, optional
A single reaction in the following format: (MF, MT)
- skip_mflist of int, optional
Files (MF) which should not be read
- skip_mtlist of int, optional
Reactions (MT) which should not be read
-
class
pyne.endf.
Evaporation
(theta, u)¶ Evaporation spectrum given in ENDF MF=5, LF=9 represented as
\[f(E \rightarrow E') = \frac{E'}{I} e^{-E'/\theta(E)}\]- Attributes
- thetaTab1
Tabulated function of incident neutron energy
- ufloat
Constant introduced to define the proper upper limit for the final particle energy such that \(0 \le E' \le E - U\)
-
class
pyne.endf.
GeneralEvaporation
(theta, g, u)¶ General evaporation spectrum given in ENDF MF=5, LF=5 represented as
\[f(E \rightarrow E') = g(E'/\theta(E))\]- Attributes
- thetaTab1
Tabulated function of incident neutron energy \(E\)
- gTab1
Tabulated function of \(x = E'/\theta(E)\)
- ufloat
Constant introduced to define the proper upper limit for the final particle energy such that \(0 \le E' \le E - U\)
-
class
pyne.endf.
Library
(fh)¶ A class for a file which contains multiple ENDF evaluations.
-
get_rx
(self, nuc, mf, mt, lines=0)¶ Grab the data from one reaction type.
- Parameters
- nucint
id form of material to read from.
- mfint
ENDF file number (MF).
- mtint
ENDF reaction number (MT).
- linesint
Number of lines to read from this reaction, starting from the top. Default value is 0, which reads in the entire reaction.
- Returns
- dataNumPy array
Contains the reaction data in an Nx6 array.
-
get_xs
(self, nuc, mt, nuc_i=None)¶ Grab cross-section data.
- Parameters
- nuc: int
id of nuclide to read.
- mt: int
ENDF reaction number to read.
- nuc_i: int
id of isotope to read. Defaults to nuc.
- Returns
- tuple
Returns a tuple with xs data in tuple[0] and flags in tuple[1].
-
integrate_tab_range
(self, intscheme, e_int, xs, low=None, high=None)¶ Integrates across one tabulation range.
- Parameters
- intschemeint or float
The interpolation scheme used in this range.
- e_intarray
The energies at which we have xs data.
- xsarray
The xs data corresponding to e_int.
- low, highfloat
Lower and upper bounds within the tabulation range to start/stop at.
- Returns
- sigma_gfloat
The group xs.
-
load
(self)¶ Read the ENDF file into a NumPy array.
- Returns
- datanp.array, 1d, float64
Returns a 1d float64 NumPy array.
-
-
class
pyne.endf.
MadlandNix
(efl, efh, tm)¶ Energy-dependent fission neutron spectrum (Madland and Nix) given in ENDF MF=5, LF=12 represented as
\[f(E \rightarrow E') = \frac{1}{2} [ g(E', E_F(L)) + g(E', E_F(H))]\]where
\[\begin{split}g(E',E_F) = \frac{1}{3\sqrt{E_F T_M}} \left [ u_2^{3/2} E_1 (u_2) - u_1^{3/2} E_1 (u_1) + \gamma \left ( \frac{3}{2}, u_2 \right ) - \gamma \left ( \frac{3}{2}, u_1 \right ) \right ] \\ u_1 = \left ( \sqrt{E'} - \sqrt{E_F} \right )^2 / T_M \\ u_2 = \left ( \sqrt{E'} + \sqrt{E_F} \right )^2 / T_M.\end{split}\]- Attributes
- efl, efhfloat
Constants which represent the average kinetic energy per nucleon of the fission fragment (efl = light, efh = heavy)
- tmTab1
Parameter tabulated as a function of incident neutron energy
-
class
pyne.endf.
Maxwellian
(theta, u)¶ Simple Maxwellian fission spectrum given in ENDF MF=5, LF=7 represented as
\[f(E \rightarrow E') = \frac{\sqrt{E'}}{I} e^{-E'/\theta(E)}\]- Attributes
- thetaTab1
Tabulated function of incident neutron energy
- ufloat
Constant introduced to define the proper upper limit for the final particle energy such that \(0 \le E' \le E - U\)
-
class
pyne.endf.
MultiLevelBreitWigner
(emin, emax, nro, naps)¶ Multi-level Breit-Wigner resolved resonance formalism data. This is identified by LRF=2 in the ENDF-6 format.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
- Attributes
- spinfloat
Spin of the target nucleus
- scattering_radius_indfloat
Scattering radius in units of 10^-12 cm
- resonanceslist of Resonance
List of resolved resonances
- l_valuesndarray of int
Neutron orbital angular momentum values
- qndarray of float
Q-value to be added to incident particle’s center-of-mass energy to determine the channel energy for use in the penetrability factor. Given as a function of the l-value.
- competitivendarray of bool
Whether a competitive width is given for each l-value.
-
read
(self, ev)¶ Read multi-level Breit-Wigner resonance data from an ENDF evaluation.
- Parameters
- evEvaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
class
pyne.endf.
RMatrixLimited
(emin, emax, nro, naps)¶ R-Matrix Limited resolved resonance formalism data. This is identified by LRF=7 in the ENDF-6 format.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
- Attributes
- IFGint
Flag indicating whether channel widths in eV or reduced-width amplitudes in eV^1/2 are given
- KRMint
Flag to specify which formulae for the R-matrix are to be used
- particle_pairslist of dict
List of particle pairs. Each particle pair is represented by a dictionary that contains the mass, atomic number, spin, and parity of each particle as well as other characteristics.
- spin_groupslist of dict
List of spin groups. Each spin group is characterized by channels, resonance energies, and resonance widths.
-
read
(self, ev)¶ Read R-Matrix limited resonance data from an ENDF evaluation.
- Parameters
- evEvaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
class
pyne.endf.
Reaction
(mt)¶ Data for a single reaction including its cross section and secondary angle/energy distribution.
- Parameters
- mtint
The MT number from the ENDF file.
- Attributes
- angular_distributionAngularDistribution
Angular distribution represented as a tabulated function or as moments of a Legendre polynomial expansion from MF=4.
- complex_breakup_flagint
Complex breakup flag.
- xsTab1
Tabulated cross section as a function of incident energy from MF=3.
- energy_distributionlist of EnergyDistribution
List of partial energy distributions for the reaction from MF=5.
- fileslist of int
List of files (MF) that have been read for this reaction
- MTint
The MT number from the ENDF file.
- multiplicitiesdict
Multiplicities for production of radioactive nuclides as given in MF=9.
- product_distributionlist of dict
Secondary energy or correlated energy-angle distribution from MF=6.
- productiondict
Cross sections for production of radioactive nuclides as given in MF=10.
- Q_mass_differencefloat
Mass difference Q value in eV
- Q_reactionfloat
Reaction Q value in eV
- radionuclide_productionlist of dict
List of radioactive nuclides produced as given in MF=8.
- reference_frame{‘laboratory’, ‘center-of-mass’, ‘light-heavy’}
Indicates what reference frame is used for outgoing energies and angles. Only relevant for product energy-angle distributions read in MF=6.
- subshell_binding_energyfloat
Subshell binding energy in eV as given in MF=23. Only relevant for photoelectric subshell ionization reactions in a photo-atomic sublibrary.
- fluorescence_yieldfloat
Fluorescence yield (eV/photoionization) as given in MF=23. Only relevant for photoelectric subshell ionization reactions in a photo-atomic sublibrary.
- productslist of dict
Secondary photon and electron distributions for electro-atomic reactions as given in MF=26.
- scattering_factorTab1
Coherent or incoherent form factor as given in MF=27.
- anomalous_scattering_imaginaryTab1
Imaginary component of the anomalous scattering factor as given in MF=27.
- anomalous_scattering_realTab1
Real component of the anomalous scattering factor as given in MF=27.
-
class
pyne.endf.
ReichMoore
(emin, emax, nro, naps)¶ Reich-Moore resolved resonance formalism data. This is identified by LRF=3 in the ENDF-6 format.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
- Attributes
- resonancesdict
Dictionary whose keys are (l, J) pairs and values are instances are lists of Resonance instances.
- spinfloat
Spin of the target nucleus
- scattering_radius_indfloat
Energy-independent scattering radius in units of 10^-12 cm
- scattering_radiusTab1
Scattering radius in units of 10^-12 cm as a function of energy
- LADint
Indicate whether parameters can be used to compute angular distributions
- NLSCint
Number of l-values which must be used to converge the calculation
- aplndarray of float
l-dependent scattering radius
- l_valuesndarray of int
Neutron orbital angular momentum values
-
read
(self, ev)¶ Read Reich-Moore resonance data from an ENDF evaluation.
- Parameters
- evEvaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
class
pyne.endf.
ResonanceRange
(emin, emax, nro, naps)¶ Resolved resonance formalism data as given in MF=2, MT=151.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
- Attributes
- energy_minfloat
Minimum energy of the resolved resonance range in eV
- energy_maxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
-
class
pyne.endf.
ScatteringRadius
(emin, emax, nro, naps)¶ Energy range with no resonances and only a scattering radius.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
-
class
pyne.endf.
SingleLevelBreitWigner
(emin, emax, nro, naps)¶ Single-level Breit-Wigner resolved resonance formalism data. This is identified by LRF=1 in the ENDF-6 format.
- Parameters
- eminfloat
Minimum energy of the resolved resonance range in eV
- emaxfloat
Maximum energy of the resolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
-
class
pyne.endf.
Tab1
(x, y, nbt, interp)¶ A one-dimensional tabulated function.
- Parameters
- xarray_like
Independent variable
- yarray_like
Dependent variable
- nbtarray_like of int
Breakpoints for interpolation regions
- interparray_like of int
Interpolation scheme identification number, e.g., 3 means y is linear in ln(x).
-
classmethod
from_file
(fh)¶ Create Tab1 object using open file handle.
- Parameters
- fhfile
File open and positioned to the start of a TAB1 record.
-
integral
(self)¶ Integral of the tabulated function over its tabulated range.
- Returns
- ndarray
Array of same length as the tabulated data that represents partial integrals from the bottom of the range to each tabulated point.
-
class
pyne.endf.
Unresolved
(emin, emax, nro, naps)¶ Unresolved resonance parameters as identified by LRU=2 in MF=2.
- Parameters
- eminfloat
Minimum energy of the unresolved resonance range in eV
- emaxfloat
Maximum energy of the unresolved resonance range in eV
- nroint
Flag designating energy-dependence of scattering radius (NRO). A value of 0 indicates it is energy-independent, a value of 1 indicates it is energy-dependent.
- napsint
Flag controlling use of the channel and scattering radius (NAPS)
- Attributes
- scattering_radiusfloat
Scattering radius in units of 10^-12 cm
- LSSFint
Flag governing interpretation of file 3 cross sections
- spinfloat
Spin of the target nucleus
- l_valuesndarray of int
Neutron orbital angular momentum values
- parametersdict of dict
Dictionary whose keys are l-values and whose values are dictionaries containing unresolved resonance parameters
-
read
(self, ev)¶ Read unresolved resonance data from an ENDF evaluation.
- Parameters
- evEvaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
class
pyne.endf.
Watt
(a, b, u)¶ Energy-dependent Watt spectrum given in ENDF MF=5, LF=11 represented as
\[f(E \rightarrow E') = \frac{e^{-E'/a}}{I} \sinh \left ( \sqrt{bE'} \right )\]- Attributes
- a, bTab1
Energy-dependent parameters tabulated as function of incident neutron energy
- ufloat
Constant introduced to define the proper upper limit for the final particle energy such that \(0 \le E' \le E - U\)
-
pyne.endf.
at_end_of_tape
()¶ Indicate whether file is positioned at the end of an ENDF tape.
- Parameters
- ffile_like
File to check
- Returns
- bool
Whether the file is at the end of the ENDF tape
-
pyne.endf.
seek_file_end
()¶ Position the file at the end of the ENDF file (MF) currently being read.
- Parameters
- ffile_like
File to position
-
pyne.endf.
seek_material_end
()¶ Position the file at the end of the ENDF material (MAT) currently being read.
- Parameters
- ffile_like
File to position
-
pyne.endf.
seek_section_end
()¶ Position the file at the end of the ENDF section (MT) currently being read.
- Parameters
- ffile_like
File to position