I'm developing a semi-realistic idle game based around the fusion and fission of elements to generate energy or for sale. For this, I need a data sheet for the Table of Nuclides (http://www.nndc.bnl.gov/nudat2/) which includes, for each nuclide:

  • Atomic number (Z)
  • Atomic mass (A)
  • Half-life
  • Decay method (alpha, beta, etc.)
  • Binding energy (either straight, per nucleon, or I can use the liquid drop equation to approximate it)

I've checked the NNDC website, but I couldn't find a configurable data download. The closest is the Nuclear Wallet Cards, but it just doesn't have the fields I need and it has to be multiple downloads.

  • Did you follow the links at the bottom? E.g the Nuclear Wallet cards link says the data table as an ASCII file is available upon request
    – user4293
    Mar 3 '16 at 14:30

You're looking for the NuBase table here, but unfortunately that file doesn't have a header. The PDF of the journal article (linked on the same page) has the same data with more explanation.


If you grabbed this code before 18 July 2016 then the mass excess values are wrong. They're correct now.

Depending on one's level of experience with nuclear data, that table might be a bit hard to handle by itself (plus the entries are fixed width instead of delimited). I wrote a Python 2.7 script which takes the nubase.mas12 file at the link and writes data for ground state nuclei, whitespace delimited, into the file nubase.edit. Columns are

  • A
  • Z
  • Isotope name (3He, 133Cs, etc.)
  • Mass excess in keV (this is the total binding energy)
  • Mass excess uncertainty in keV
  • Half life in seconds ('stable' for stable nuclides, '-1' for unknown)
  • Half life uncertainty in seconds (as above)
  • Decay data

You'll have to parse the decay modes yourself. Two caveats: 1) This table includes both measured and projected mass values (binding energies), and my script doesn't distinguish between the two. 2) The half lives and uncertainties in my output table may only be upper or lower limits, not the values themselves. The original table is specific.

#!/usr/bin/env python
import re

times = {'ys':1e-24, 'zs':1e-21, 'as':1e-18, 'fs':1e-15, 'ps':1e-12, 'ns':1e-9, 'us':1e-6, 'ms':1e-3, 's':1, 'm': 60, 'h':3600, 'd':86400, 'y': 3.1556926e+7, 'ky': 3.1556926e+10, 'My': 3.1556926e+13, 'Gy': 3.1556926e+16, 'Ty': 3.1556926e+19, 'Py': 3.1556926e+22, 'Ey': 3.1556926e+25, 'Zy': 3.1556926e+28, 'Yy': 3.1556926e+31}

def deciMangler(inString):
    inString = re.sub('[^0-9\.\-]', '', inString)
    if inString == '':
        return(['', ''])
    if '.' in inString:
        inString = inString.split('.')
        inString[1] = '.' + inString[1]
        inString = [inString, ' ']

def reCombinator(inString):
    ID = inString[:18]
    M = deciMangler(inString[18:29])
    dM = deciMangler(inString[29:38])
    HL = inString[61:69].strip(' #<>~')
    HLorder = inString[69:71].strip()
    dHL = inString[72:79].strip(' #<>~')
    if dHL and not dHL[-1].isdigit():
        dHL = dHL[:-2]
    decay = inString[110:-1]
    if 'stbl' in HL:
        HL = 'stable'
        dHL = 'stable'
        output = '{0:<18}{1[0]:>6}{1[1]:<5}{2[0]:>4}{2[1]:<11}{3:<11}{4:<14}{5}'.format(ID, M, dM, HL, dHL, decay)
    elif 'p-unst' in HL or HL == '':
        HL = -1
        dHL = -1
        output = '{0:<18}{1[0]:>6}{1[1]:<5}{2[0]:>4}{2[1]:<10}{3:<11}{4:<15}{5}'.format(ID, M, dM, HL, dHL, decay)
    elif dHL=='':
        HL = float(HL)*times[HLorder]
        dHL = -1
        output = '{0:<18}{1[0]:>6}{1[1]:<5}{2[0]:>4}{2[1]:<11}{3:<10.3e}{4:<15}{5}'.format(ID, M, dM, HL, dHL, decay)
        HL = float(HL)*times[HLorder]
        dHL = float(dHL)*times[HLorder]
        output = '{0:<18}{1[0]:>6}{1[1]:<5}{2[0]:>4}{2[1]:<11}{3:<11.3e}{4:<14.3e}{5}'.format(ID, M, dM, HL, dHL, decay)

with open('nubase.mas12', 'r') as nuFile:
    with open('nubase.edit', 'w') as outFile:
        outFile.write('{0:>3}{1:>4}{2:>9}{3:>12}{4:>12}{5:>13}{6:>11}     {7}\n'.format('A', 'Z', 'Isotope', 'ME[keV]', 'Unc[keV]', 'HL[s]', 'Unc[s]', 'Decays'))
        for line in nuFile:
            if line[11:14] == '1 n':
                line = line[:11] + '1n ' + line[14:]
            if line.split()[1][-1] != '0':
                line = line[:7] + ' ' + line[8:]
                    print line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.