Skip to content

Commit b62ba3f

Browse files
committed
Update README
Added references to the new years of data that we can now parse and fleshed out a bit more to demonstrate some basic usage.
1 parent 3d46c42 commit b62ba3f

File tree

1 file changed

+105
-1
lines changed

1 file changed

+105
-1
lines changed

README.md

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ All data should, however, be accurate.
1414

1515
## Mass tables
1616

17-
The data files released by the papers linked below are used to create the mass tables read by this code
17+
The data files released by the papers linked below are used to create the mass tables read by this code.
18+
There was no AME data published in 1997, but the 1995 AME matches the 1997 NUBASE according to section 4, "The tables" on P31 of [these proceedings](https://www.google.co.uk/books/edition/Atomic_Physics_at_Accelerators_Mass_Spec/3AbsCAAAQBAJ?hl=en).
19+
As a result the 1997 NUBASE data is referred to as being from 1995 for simplicity when merging data.
20+
- [AME1983](https://doi.org/10.1016/0375-9474(85)90283-0)
21+
- [AME1993](https://doi.org/10.1016/0375-9474(93)90024-R)
22+
- [AME1995](https://doi.org/10.1016/0375-9474(95)00445-9) + [NUBASE1997](https://doi.org/10.1016/S0375-9474(97)00482-X)
1823
- [AME2003](https://doi.org/10.1016/j.nuclphysa.2003.11.002) + [NUBASE2003](https://doi.org/10.1016/j.nuclphysa.2003.11.001)
1924
- [AME2012](https://doi.org/10.1088/1674-1137/36/12/002) + [NUBASE2012](https://doi.org/10.1088/1674-1137/36/12/001)
2025
- [AME2016](https://doi.org/10.1088/1674-1137/41/3/030002) + [NUBASE2016](https://doi.org/10.1088/1674-1137/41/3/030001)
@@ -30,3 +35,102 @@ The package is available on the Python Package Index so can be installed via pip
3035
pip install nuclearmasses
3136
```
3237

38+
Or you can clone the latest version from github
39+
```bash
40+
git clone https://github.com/php1ic/nuclearmasses
41+
```
42+
43+
## Usage
44+
45+
Once installed or cloned, the data is available as a single dataframe indexed on the mass table year
46+
```python
47+
>>> from nuclearmasses.mass_table import MassTable
48+
>>> df = MassTable().full_data
49+
```
50+
You can then interrogate, or extract, what ever information you want.
51+
For example, how has the mass excess and it's accuracy changed overtime for 190Re according to the AME
52+
```python
53+
>>> df[(df['A'] == 190) & (df['Symbol'] == 'Re')][['AMEMassExcess', 'AMEMassExcessError']]
54+
AMEMassExcess AMEMassExcessError
55+
TableYear
56+
1983 -35536.605 200.029
57+
1993 -35557.789 145.549
58+
1995 -35568.032 212.151
59+
2003 -35566.326 149.248
60+
2012 -35634.992 70.542
61+
2016 -35635.830 70.852
62+
2020 -35583.015 4.870
63+
```
64+
Or how do the mass excess of gold vary across the isotropic chain according to NUBASE in the most recent table for both experimentally measured and theoretical values
65+
```python
66+
>>> df.query("TableYear == 2020 and Symbol == 'Au'")[['A', 'NUBASEMassExcess', 'NUBASEMassExcessError', 'Experimental']]
67+
A NUBASEMassExcess NUBASEMassExcessError Experimental
68+
TableYear
69+
2020 168 2530.0 400.0 False
70+
2020 169 -1790.0 300.0 False
71+
2020 170 -3700.0 200.0 False
72+
2020 171 -7562.0 21.0 True
73+
2020 172 -9320.0 60.0 True
74+
2020 173 -12832.0 23.0 True
75+
2020 174 -14060.0 100.0 False
76+
2020 175 -17400.0 40.0 True
77+
2020 176 -18520.0 30.0 True
78+
2020 177 -21546.0 10.0 True
79+
2020 178 -22303.0 10.0 True
80+
2020 179 -24989.0 12.0 True
81+
2020 180 -25626.0 5.0 True
82+
2020 181 -27871.0 20.0 True
83+
2020 182 -28304.0 19.0 True
84+
2020 183 -30191.0 9.0 True
85+
2020 184 -30319.0 22.0 True
86+
2020 185 -31858.1 2.6 True
87+
2020 186 -31715.0 21.0 True
88+
2020 187 -33029.0 22.0 True
89+
2020 188 -32371.3 2.7 True
90+
2020 189 -33582.0 20.0 True
91+
2020 190 -32834.0 3.0 True
92+
2020 191 -33798.0 5.0 True
93+
2020 192 -32772.0 16.0 True
94+
2020 193 -33405.0 9.0 True
95+
2020 194 -32211.9 2.1 True
96+
2020 195 -32567.1 1.1 True
97+
2020 196 -31138.7 3.0 True
98+
2020 197 -31139.8 0.5 True
99+
2020 198 -29580.8 0.5 True
100+
2020 199 -29093.8 0.5 True
101+
2020 200 -27240.0 27.0 True
102+
2020 201 -26401.0 3.0 True
103+
2020 202 -24353.0 23.0 True
104+
2020 203 -23143.0 3.0 True
105+
2020 204 -20390.0 200.0 False
106+
2020 205 -18570.0 200.0 False
107+
2020 206 -14190.0 300.0 False
108+
2020 207 -10640.0 300.0 False
109+
2020 208 -5910.0 300.0 False
110+
2020 209 -2230.0 400.0 False
111+
2020 210 2680.0 400.0 False
112+
```
113+
114+
## Contributing
115+
116+
If you have ideas for additional functionality or find bugs please create an [issue](https://github.com/php1ic/nuclearmasses/issues) or better yet a [pull request](https://github.com/php1ic/nuclearmasses/pulls).
117+
118+
## Known issues
119+
- The half life from the NUBASE data is stored as the individual elements, a column with the value in seconds would be useful
120+
```python
121+
>>> df[(df['A'] == 14) & (df['Symbol'] == 'C')][['HalfLifeValue', 'HalfLifeUnit', 'HalfLifeError']]
122+
HalfLifeValue HalfLifeUnit HalfLifeError
123+
TableYear
124+
1983 NaN <NA> NaN
125+
1993 NaN <NA> NaN
126+
1995 5.73 ky 0.04
127+
2003 5.70 ky 0.03
128+
2012 5.70 ky 0.03
129+
2016 5.70 ky 0.03
130+
2020 5.70 ky 0.03
131+
```
132+
- The decay mode field from the NUBASE data is stored 'as-is' from the file.
133+
It looks like it can be split on the ';' character for isotopes where there is more than one mode.
134+
A dictionary of {decay mode: fraction} may be the best way to store all of this information.
135+
- Information from anything other than the ground state of an isotope is ignored when parsing the NUABSE file.
136+
The selection of what is and what is not included appears random to me which is why I simply ignored for the moment.

0 commit comments

Comments
 (0)