Creates a table from arrays Z, N and M
>>> Z = [82, 82, 83]
>>> N = [126, 127, 130]
>>> M = [-21.34, -18.0, -14.45]
>>> Table.from_ZNM(Z, N, M, name='Custom Table')
Z N
82 126 -21.34
127 -18.00
83 130 -14.45
Name: Custom Table, dtype: float64
Imports a mass table from a file
Imports a mass table from a file
Export the contents to a file as comma separated values.
Export the last ten elements of AME2012 to a new file:
>>> Table('AME2012').tail(10).to_file('last_ten.txt')
Return the mass number A for all nuclei in the table as a numpy array.
Return the neutron number N for all nuclei in the table as a numpy array.
Return the proton number Z for all nuclei in the table as a numpy array.
Return the total number of nuclei in the table:
>>> Table('AME2012').count
2438
It is also possible to do:
>>> len(Table('AME2012'))
2438
Calculate error difference
>>> Table('DUZU').error(relative_to='AME2003')
Return a list of the names of all supported mass models
>>> Table.names()
['AME2003', 'AME2003all', 'AME2012', 'AME2012all', 'AME1995',
'AME1995all', 'DUZU', 'FRDM95', 'KTUY05', 'ETFSI12', 'HFB14',
'HFB26', 'TCSM12', 'TCSM13', 'BR2013', 'MAJA88', 'GK88', 'WS32010', 'WS32011',
'SVM13']
Calculate root mean squared error
>>> template = '{0:10}|{1:^6.2f}|{2:^6.2f}|{3:^6.2f}'
>>> print 'Model ', 'AME95 ', 'AME03 ', 'AME12 ' # Table header
... for name in Table.names:
... print template.format(name, Table(name).rmse(relative_to='AME1995'),
... Table(name).rmse(relative_to='AME2003'),
... Table(name).rmse(relative_to='AME2012'))
Model AME95 AME03 AME12
AME2003 | 0.13 | 0.00 | 0.13
AME2003all| 0.42 | 0.40 | 0.71
AME2012 | 0.16 | 0.13 | 0.00
AME2012all| 0.43 | 0.43 | 0.69
AME1995 | 0.00 | 0.13 | 0.16
AME1995all| 0.00 | 0.17 | 0.21
DUZU | 0.52 | 0.52 | 0.76
FRDM95 | 0.79 | 0.78 | 0.95
KTUY05 | 0.78 | 0.77 | 1.03
ETFSI12 | 0.84 | 0.84 | 1.04
HFB14 | 0.84 | 0.83 | 1.02
Return binding energies instead of mass excesses
Calculates the derivative of the neutron separation energies:
ds2n(Z,A) = s2n(Z,A) - s2n(Z,A+2)
Calculates the derivative of the neutron separation energies:
ds2n(Z,A) = s2n(Z,A) - s2n(Z,A+2)
Return Q_alpha
Return Q_beta
Return 1 neutron separation energy
Return 1 proton separation energy
Return 2 neutron separation energy
Return 2 proton separation energy
Access [] operator Examples:
>>> Table('DUZU')[82, 126:127]
DUZU
Z N
82 126 -22.29
127 -17.87
>>> Table('AME2012all')[118, :]
AME2012all
Z N
118 173 198.93
174 199.27
175 201.43
Return a selection of the Table at positions given by nuclei
Return binding energies at magic nuclei:
>>> magic_nuclei = [(20,28), (50,50), (50,82), (82,126)]
>>> Table('AME2012').binding_energy.at(magic_nuclei)
Z N
20 28 416.014215
50 50 825.325172
82 1102.876416
82 126 1636.486450
Selects even-odd nuclei from the table
Select nuclei not in table
table: Table, Table object from where nuclei should be removed
Find the new nuclei in AME2003 with Z,N >= 8:
>>> Table('AME2003').not_in(Table('AME1995'))[8:,8:].count
389
Selects odd-even nuclei from the table
Selects odd-odd nuclei from the table:
>>> Table('FRDM95').odd_odd
Out[13]:
Z N
9 9 1.21
11 0.10
13 3.08
15 9.32
...
Selects nuclei according to a condition on Z,N or M
name: string, optional name for the resulting Table
Select all nuclei with A > 160:
>>> A_gt_160 = lambda Z,N: Z + N > 160
>>> Table('AME2003').select(A_gt_160)