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
¶ Adler-Adler resolved resonance formalism data. This is identified by LRF=4 in the ENDF-6 format.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
Attributes
spin (float) Spin of the target nucleus scattering_radius_ind (float) Scattering radius in units of 10^-12 cm LI (float) Flag indicating the kind of parameters AT, BT (ndarray) Background constants for the total cross section AC, BC (ndarray) Background constants for the radiative cross section AF, BF (ndarray) Background constants for the fission cross section resonances (list of AdlerResonance) List of resonances defined by Adler-Adler parameters -
read
()¶ Read Adler-Adler resonance data from an ENDF evaluation.
Parameters: ev : Evaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
-
class
pyne.endf.
ArbitraryTabulated
¶ Arbitrary tabulated function given in ENDF MF=5, LF=1 represented as
Attributes
energy (ndarray) Array of incident neutron energies pdf (list of Tab1) Tabulated outgoing energy distribution probability density functions
-
class
pyne.endf.
EnergyDistribution
¶ Energy distribution from ENDF MF=5.
Attributes
lf (int) Flag specifying energy distribution.
-
class
pyne.endf.
Evaluation
¶ 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_relaxation (dict) Dictionary containing atomic relaxation data from MF=28, MT=533. If the evaluation is not an atomic relaxation sublibrary, the dictionary is empty. decay (dict) Dictionary containing decay data from MF=8. If the evaluation is not from a decay sublibrary, the dictionary is empty. fission (dict) 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). info (dict) Miscallaneous information about the evaluation. target (dict) Information about the target material, such as its mass, isomeric state, whether it’s stable, and whether it’s fissionable. projectile (dict) Information about the projectile such as its mass. reaction_list (list 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). reactions (collections.OrderedDict) Dictionary whose keys are MT numbers and values are Reaction instances. resonances (dict) Resolved resonance data from MF=2, MT=151. thermal_elastic (dict) Coherent and/or incoherent thermal elastic data from MF=7, MT=2. thermal_inelastic (dict) Incoherent thermal inelastic data from MF=7, MT=4. -
read
()¶ 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: reactions : tuple or list of tuple, optional
A single reaction in the following format: (MF, MT)
skip_mf : list of int, optional
Files (MF) which should not be read
skip_mt : list of int, optional
Reactions (MT) which should not be read
-
-
class
pyne.endf.
Evaporation
¶ Evaporation spectrum given in ENDF MF=5, LF=9 represented as
Attributes
theta (Tab1) Tabulated function of incident neutron energy u (float) Constant introduced to define the proper upper limit for the final particle energy such that
-
class
pyne.endf.
GeneralEvaporation
¶ General evaporation spectrum given in ENDF MF=5, LF=5 represented as
Attributes
theta (Tab1) Tabulated function of incident neutron energy g (Tab1) Tabulated function of u (float) Constant introduced to define the proper upper limit for the final particle energy such that
-
class
pyne.endf.
Library
¶ A class for a file which contains multiple ENDF evaluations.
-
get_rx
(nuc, mf, mt, lines=0)¶ Grab the data from one reaction type.
Parameters: nuc : int
id form of material to read from.
mf : int
ENDF file number (MF).
mt : int
ENDF reaction number (MT).
lines : int
Number of lines to read from this reaction, starting from the top. Default value is 0, which reads in the entire reaction.
Returns: data : NumPy array
Contains the reaction data in an Nx6 array.
-
get_xs
(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
(intscheme, e_int, xs, low=None, high=None)¶ Integrates across one tabulation range.
Parameters: intscheme : int or float
The interpolation scheme used in this range.
e_int : array
The energies at which we have xs data.
xs : array
The xs data corresponding to e_int.
low, high : float
Lower and upper bounds within the tabulation range to start/stop at.
Returns: sigma_g : float
The group xs.
-
load
()¶ Read the ENDF file into a NumPy array.
Returns: data : np.array, 1d, float64
Returns a 1d float64 NumPy array.
-
-
class
pyne.endf.
MadlandNix
¶ Energy-dependent fission neutron spectrum (Madland and Nix) given in ENDF MF=5, LF=12 represented as
where
Attributes
efl, efh (float) Constants which represent the average kinetic energy per nucleon of the fission fragment (efl = light, efh = heavy) tm (Tab1) Parameter tabulated as a function of incident neutron energy
-
class
pyne.endf.
Maxwellian
¶ Simple Maxwellian fission spectrum given in ENDF MF=5, LF=7 represented as
Attributes
theta (Tab1) Tabulated function of incident neutron energy u (float) Constant introduced to define the proper upper limit for the final particle energy such that
-
class
pyne.endf.
MultiLevelBreitWigner
¶ Multi-level Breit-Wigner resolved resonance formalism data. This is identified by LRF=2 in the ENDF-6 format.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
Attributes
spin (float) Spin of the target nucleus scattering_radius_ind (float) Scattering radius in units of 10^-12 cm resonances (list of Resonance) List of resolved resonances l_values (ndarray of int) Neutron orbital angular momentum values q (ndarray 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. competitive (ndarray of bool) Whether a competitive width is given for each l-value. -
read
()¶ Read multi-level Breit-Wigner resonance data from an ENDF evaluation.
Parameters: ev : Evaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
-
class
pyne.endf.
RMatrixLimited
¶ R-Matrix Limited resolved resonance formalism data. This is identified by LRF=7 in the ENDF-6 format.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
Attributes
IFG (int) Flag indicating whether channel widths in eV or reduced-width amplitudes in eV^1/2 are given KRM (int) Flag to specify which formulae for the R-matrix are to be used particle_pairs (list 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_groups (list of dict) List of spin groups. Each spin group is characterized by channels, resonance energies, and resonance widths. -
read
()¶ Read R-Matrix limited resonance data from an ENDF evaluation.
Parameters: ev : Evaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
-
class
pyne.endf.
Reaction
¶ Data for a single reaction including its cross section and secondary angle/energy distribution.
Parameters: mt : int
The MT number from the ENDF file.
Attributes
angular_distribution (AngularDistribution) Angular distribution represented as a tabulated function or as moments of a Legendre polynomial expansion from MF=4. complex_breakup_flag (int) Complex breakup flag. xs (Tab1) Tabulated cross section as a function of incident energy from MF=3. energy_distribution (list of EnergyDistribution) List of partial energy distributions for the reaction from MF=5. files (list of int) List of files (MF) that have been read for this reaction MT (int) The MT number from the ENDF file. multiplicities (dict) Multiplicities for production of radioactive nuclides as given in MF=9. product_distribution (list of dict) Secondary energy or correlated energy-angle distribution from MF=6. production (dict) Cross sections for production of radioactive nuclides as given in MF=10. Q_mass_difference (float) Mass difference Q value in eV Q_reaction (float) Reaction Q value in eV radionuclide_production (list 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_energy (float) Subshell binding energy in eV as given in MF=23. Only relevant for photoelectric subshell ionization reactions in a photo-atomic sublibrary. fluorescence_yield (float) Fluorescence yield (eV/photoionization) as given in MF=23. Only relevant for photoelectric subshell ionization reactions in a photo-atomic sublibrary. products (list of dict) Secondary photon and electron distributions for electro-atomic reactions as given in MF=26. scattering_factor (Tab1) Coherent or incoherent form factor as given in MF=27. anomalous_scattering_imaginary (Tab1) Imaginary component of the anomalous scattering factor as given in MF=27. anomalous_scattering_real (Tab1) Real component of the anomalous scattering factor as given in MF=27.
-
class
pyne.endf.
ReichMoore
¶ Reich-Moore resolved resonance formalism data. This is identified by LRF=3 in the ENDF-6 format.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
Attributes
resonances (dict) Dictionary whose keys are (l, J) pairs and values are instances are lists of Resonance instances. spin (float) Spin of the target nucleus scattering_radius_ind (float) Energy-independent scattering radius in units of 10^-12 cm scattering_radius (Tab1) Scattering radius in units of 10^-12 cm as a function of energy LAD (int) Indicate whether parameters can be used to compute angular distributions NLSC (int) Number of l-values which must be used to converge the calculation apl (ndarray of float) l-dependent scattering radius l_values (ndarray of int) Neutron orbital angular momentum values -
read
()¶ Read Reich-Moore resonance data from an ENDF evaluation.
Parameters: ev : Evaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
-
class
pyne.endf.
ResonanceRange
¶ Resolved resonance formalism data as given in MF=2, MT=151.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
Attributes
energy_min (float) Minimum energy of the resolved resonance range in eV energy_max (float) Maximum energy of the resolved resonance range in eV nro (int) 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. naps (int) Flag controlling use of the channel and scattering radius (NAPS)
-
class
pyne.endf.
ScatteringRadius
¶ Energy range with no resonances and only a scattering radius.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
-
class
pyne.endf.
SingleLevelBreitWigner
¶ Single-level Breit-Wigner resolved resonance formalism data. This is identified by LRF=1 in the ENDF-6 format.
Parameters: emin : float
Minimum energy of the resolved resonance range in eV
emax : float
Maximum energy of the resolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
-
class
pyne.endf.
Tab1
¶ A one-dimensional tabulated function.
Parameters: x : array_like
Independent variable
y : array_like
Dependent variable
nbt : array_like of int
Breakpoints for interpolation regions
interp : array_like of int
Interpolation scheme identification number, e.g., 3 means y is linear in ln(x).
-
classmethod
from_file
()¶ Create Tab1 object using open file handle.
Parameters: fh : file
File open and positioned to the start of a TAB1 record.
-
integral
()¶ 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.
-
classmethod
-
class
pyne.endf.
Unresolved
¶ Unresolved resonance parameters as identified by LRU=2 in MF=2.
Parameters: emin : float
Minimum energy of the unresolved resonance range in eV
emax : float
Maximum energy of the unresolved resonance range in eV
nro : int
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.
naps : int
Flag controlling use of the channel and scattering radius (NAPS)
Attributes
scattering_radius (float) Scattering radius in units of 10^-12 cm LSSF (int) Flag governing interpretation of file 3 cross sections spin (float) Spin of the target nucleus l_values (ndarray of int) Neutron orbital angular momentum values parameters (dict of dict) Dictionary whose keys are l-values and whose values are dictionaries containing unresolved resonance parameters -
read
()¶ Read unresolved resonance data from an ENDF evaluation.
Parameters: ev : Evaluation
ENDF evaluation positioned at the start of a resonance range subsection
-
-
class
pyne.endf.
Watt
¶ Energy-dependent Watt spectrum given in ENDF MF=5, LF=11 represented as
Attributes
a, b (Tab1) Energy-dependent parameters tabulated as function of incident neutron energy u (float) Constant introduced to define the proper upper limit for the final particle energy such that
-
pyne.endf.
at_end_of_tape
()¶ Indicate whether file is positioned at the end of an ENDF tape.
Parameters: f : file_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: f : file_like
File to position
-
pyne.endf.
seek_material_end
()¶ Position the file at the end of the ENDF material (MAT) currently being read.
Parameters: f : file_like
File to position
-
pyne.endf.
seek_section_end
()¶ Position the file at the end of the ENDF section (MT) currently being read.
Parameters: f : file_like
File to position