# ENSDF File Support – pyne.ensdf¶

Pyne should nominally contain support for reading and writing Evaluated Nuclear Structure Data Files (ENSDF). Currently it can parse most of the level and decay datasets. This data can be accessed via the pyne.data module.

All functionality may be found in the ensdf module:

from pyne import ensdf


## ENSDF API¶

pyne.ensdf.decays(filename, decaylist=None)[source]

This splits an ENSDF file into datasets. It then passes the dataset to the appropriate parser. Currently only a subset of decay datasets are supported. The output is a list of objects containing information pertaining to a particular decay.

Parameters
filenamestr or file

Name of ENSDF formatted file or a file-like object containing ENSDF formatted data

decaylistlist of tuples

This is a list object which all newly processed decays will be added to. If it’s None a new one will be created.

Returns
decaylistlist of tuples

list of objects containing information pertaining to a particular decay. This information is in the following format:

int

nuc_id of the parent

int

nuc_id of the daughter

int

PyNE reaction id

float

half-life in seconds

float

half-life error in seconds

float

branching ratio (percent)

float

Conversion factor for gamma intensity to photons per 100 decays of the parent

float

Error in conversion factor for gamma intensity

float

Conversion factor for electron capture/beta intensity to electron captures/betas per 100 decays of the parent

float

Error in conversion factor for electron capture/beta intensity

list
a list containing information about each gamma ray:
• starting level of gamma transition in stats_id form

• final level of gamma transition in state_id form

• original parent

• energy in keV

• uncertainty in energy

• intensity (multiply by conversion factor for percentage)

• uncertainty in intensity

• electron conversion intensity

• uncertainty in electron conversion intensity

• total transition intensity

• total transition intensity error

• k electron conversion intensity

• l electron conversion intensity

• m electron conversion intensity

list
a list containing information about each alpha:
• parent nuclide id in state_id form

• child nuclide id in state_id form

• alpha energy

• alpha intensity in percent of total alphas

list

a list containing information about each beta minus from the parent decay:

• parent nuclide id in state_id form

• child nuclide id in state_id form

• beta endpoint energy

• beta average energy

• beta intensity (multiply by conversion factor for percentage)

list

a list containing information about each beta plus and electron capture from the parent decay:

• parent nuclide id in state_id form

• child nuclide id in state_id form

• beta plus endpoint energy

• beta plus average energy

• beta intensity (multiply by conversion factor for percentage)

• electron capture intensity (multiply by conversion factor for percentage)

• k electron conversion intensity

• l electron conversion intensity

• m electron conversion intensity

pyne.ensdf.levels(filename, levellist=None)[source]

This takes an ENSDF filename or file object and parses the ADOPTED LEVELS records to assign level numbers by energy. It also parses the different reported decay types and branching ratios.

Parameters
filenamestr or file

Name of ENSDF formatted file or a file-like object containing ENSDF formatted data

levellistlist of tuples

This is a list object which all newly processed levels will be added to. If it’s None a new one will be created.

Returns
levellistlist of tuples

This is a list of all the level data. Each level has base entry with a reaction id of 0 and additional entries for any listed decays. The format of each row is: nuc_id : int

The state_id of the level

rx_idint

The id of the decay “reaction” in PyNE reaction id form.

half_lifefloat

Half life of the state in s

levelfloat

energy of the level in keV

branch_ratiofloat

if rx_id != 0 this is the percent of decays in that channel

metastableint

metastable id number of the level (if given)

specialstring

single character denoting levels with unknown relation to ground state