Nuclear Chart plotter¶
Created on 05 November 2019
Updated to AME20 on 03 October 2024
@author: Jonas Karthein
@contact: karthein@tamu.edu
@license: MIT license
References¶
[1]: W.J.Huang, Chinese Physics C45, 030002, March 2021.
[2]: Linguistics Pro Font (= Utopia Font incl. math symbols)
Application¶
The code was used for the dissertation of Jonas Karthein and for several scientific presentations.
Introduction¶
The following code was written to provide publication-ready plots of the nuclear chart, based on the Atomic Mass Evaluation 2020 [1].
Required software and libraries¶
The following code was written in Python 3.11. The required libraries are listed below with a rough description for their task in the code. It doesn't claim to be a full description of the library.
- pandas (data storage and calculation)
- numpy (calculation)
- matplotlib (plotting)
- jupyter (Python notebook environment)
All packages can be fetched using pip:
!pip3 install pandas numpy matplotlib jupyter
import pandas as pd
import numpy as np
from scipy.constants import physical_constants
m_p = physical_constants['proton mass energy equivalent in MeV'][0]
m_n = physical_constants['neutron mass energy equivalent in MeV'][0]
# loading the AME20 mass evaluation table
ame_df = pd.read_fwf('bin/ame20.txt',
skiprows=36,
names=['new_el', 'N_Z', 'N', 'Z', 'A', 'el', 'o', 'ME_keV',
'ME_unc_keV', 'BE_keV',
'BE_unc_keV', 'B', 'Q_keV',
'Q_unc_keV', 'mass_micro_u',
'mass_unc_micro_u'],
widths=[1,3,5,5,5,4,4,15,13,14,9,3,13,11,17,11])
# marking the extrapolated values, removing the '#' and '*' symbols and converting all values into floats
ame_df['extrapol'] = (ame_df.ME_keV.str[-1] == '#')
ame_df = ame_df.replace('#', '.0', regex=True)
ame_df = ame_df.replace('*', np.nan)
ame_df[['ME_keV','ME_unc_keV','BE_keV','BE_unc_keV','Q_keV',
'Q_unc_keV','mass_micro_u','mass_unc_micro_u']] = ame_df[['ME_keV','ME_unc_keV','BE_keV',
'BE_unc_keV','Q_keV','Q_unc_keV',
'mass_micro_u','mass_unc_micro_u'
]].apply(pd.to_numeric)
ame_df['mass_prec'] = np.log(abs(np.log(ame_df.mass_unc_micro_u[(ame_df.extrapol == False)] /
ame_df.mass_micro_u[(ame_df.extrapol == False)])))
# loading the NUBASE20 table including information about isomers
nubase_df = pd.read_fwf('bin/nubase20.txt',
skiprows=25,
names=['A', 'Z_+', 'el', 'state', 'ME_keV',
'ME_unc_keV', 'Ex_keV',
'Ex_unc_keV', 'Ex_origin', 't_1_2', 't_1_2_unit', 't_1_2_unc', 'JP', 'T',
'ensdf', 'ref', 'yr', 'decay'],
widths=[4,7,5,2,14,10,11,10,6,9,3,7,8,6,3,9,5,77], dtype={'ME_keV': str})
# adding necessary info like the proton Number Z, neutron Number N, and the year of discovery for plotting
nubase_df['extrapol'] = (nubase_df.ME_keV.str[-1] == '#')
nubase_df = nubase_df.replace('#', '.0', regex=True)
nubase_df['Z'] = nubase_df['Z_+'].astype(str).str[:-1].replace('', '0').astype(int)
nubase_df['N'] = nubase_df.A - nubase_df.Z
nubase_df.yr = nubase_df.yr.fillna(9999).astype(int) # not discovered yet -> year = 9999
nubase_df = nubase_df.set_index('el')
nubase_df[['ME_keV','ME_unc_keV','Ex_keV','Ex_unc_keV']] = nubase_df[['ME_keV','ME_unc_keV','Ex_keV',
'Ex_unc_keV']].apply(pd.to_numeric, errors='coerce')
nubase_df['mass_prec'] = nubase_df.ME_unc_keV / (nubase_df.Z*m_p*1000 + nubase_df.N*m_n*1000 - nubase_df.ME_keV)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.extrapol == False)&(nubase_df.t_1_2_unit.str[0:3].isin(['min','s', 'ms', 'us', 'ns', 'as']))].mass_prec.nsmallest(10)
# read spectroscopy measurements (angeli 2013)
df_angeli = pd.read_csv('bin/df_radii_angeli_2013.csv', delimiter=',')
# read FRIB yields
frib_yields = pd.read_csv('bin/FRIB_rates.csv', delimiter=',')
# read ISOLDE yields
import xml.etree.ElementTree as ET
import re
isolde_yields = {}
for child in ET.parse('bin/Isolde-nuclide-chart-bigger.xml').getroot():
el = child.attrib['id']
yields = child[2].text
isolde_yields[re.findall('\d+', el)[0]+re.findall('[A-Za-z]+', el)[0]] = yields
nubase_df['isolde_yields'] = pd.Series(isolde_yields)
nubase_df['isolde_yields_log'] = np.log(nubase_df.isolde_yields.astype(float))
# read atomic ionization energies
E_ion_df = pd.read_csv('bin/ionization-energy-atoms.tsv', delimiter='\t')
nubase_df
/opt/homebrew/lib/python3.11/site-packages/pandas/core/arraylike.py:399: RuntimeWarning: divide by zero encountered in log result = getattr(ufunc, method)(*inputs, **kwargs)
A | Z_+ | state | ME_keV | ME_unc_keV | Ex_keV | Ex_unc_keV | Ex_origin | t_1_2 | t_1_2_unit | ... | ensdf | ref | yr | decay | extrapol | Z | N | mass_prec | isolde_yields | isolde_yields_log | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
el | |||||||||||||||||||||
1 n | 1 | 0 | NaN | 8071.318100 | 0.000400 | NaN | NaN | NaN | 609.8 | s | ... | 6.0 | NaN | 1932 | B-=100 | False | 0 | 1 | 4.294176e-10 | NaN | NaN |
1H | 1 | 10 | NaN | 7288.971064 | 0.000013 | NaN | NaN | NaN | stbl | NaN | ... | 6.0 | NaN | 1920 | IS=99.9855 78 | False | 1 | 0 | 1.396373e-11 | NaN | NaN |
2H | 2 | 10 | NaN | 13135.722895 | 0.000015 | NaN | NaN | NaN | stbl | NaN | ... | 3.0 | NaN | 1932 | IS=0.0145 78 | False | 1 | 1 | 8.044182e-12 | NaN | NaN |
3H | 3 | 10 | NaN | 14949.810900 | 0.000080 | NaN | NaN | NaN | 12.32 | y | ... | 0.0 | NaN | 1934 | B-=100 | False | 1 | 2 | 2.854642e-11 | NaN | NaN |
3He | 3 | 20 | NaN | 14931.218880 | 0.000060 | NaN | NaN | NaN | stbl | NaN | ... | 98.0 | NaN | 1934 | IS=0.0002 2 | False | 2 | 1 | 2.141956e-11 | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
293Ts | 293 | 1170 | NaN | 194430.000000 | 780.000000 | NaN | NaN | NaN | 25 | ms | ... | 10.0 | NaN | 2010 | A=100 | True | 117 | 176 | 2.836911e-06 | NaN | NaN |
293Og | 293 | 1180 | NaN | 198800.000000 | 710.000000 | NaN | NaN | RN | 1.0 | ms | ... | 0.0 | NaN | 2010 | A ? | True | 118 | 175 | 2.582370e-06 | NaN | NaN |
294Ts | 294 | 1170 | NaN | 196400.000000 | 590.000000 | NaN | NaN | NaN | 70 | ms | ... | 19.0 | NaN | 2010 | A=100 | True | 117 | 177 | 2.138576e-06 | NaN | NaN |
294Og | 294 | 1180 | NaN | 199320.000000 | 550.000000 | NaN | NaN | NaN | 0.7 | ms | ... | 5.0 | NaN | 2004 | A~100; SF ? | True | 118 | 176 | 1.993618e-06 | NaN | NaN |
295Og | 295 | 1180 | NaN | 201370.000000 | 660.000000 | NaN | NaN | NaN | 680 | ms | ... | NaN | NaN | 2006 | A~100 | True | 118 | 177 | 2.384240e-06 | NaN | NaN |
5844 rows Ć 23 columns
ame_df.to_csv('bin/ame20.tsv', sep='\t')
ame_df.to_csv('bin/ame20.csv', sep=',')
nubase_df.to_csv('bin/nubase20.tsv', sep='\t')
nubase_df.to_csv('bin/nubase20.csv', sep=',')
FRIB yields and laser spectroscopy¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,5.49))
# stable, frib, cris+mrtof, cris, measured
frib_yields.plot(x='N', y='Z', ax=ax, label='FRIB design yield', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', markeredgewidth=0.1, markeredgecolor='k', zorder=1)
frib_yields[frib_yields.pps_full>100].plot(x='N', y='Z', ax=ax, label='Accessible by CRIS + MRToF', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k', zorder=2)
frib_yields[frib_yields.pps_full>10000].plot(x='N', y='Z', ax=ax, label='Accessible by CRIS', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D935', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
df_angeli.plot(x='N', y='Z', ax=ax, label='Measured by laser spectroscopy', lw=0, marker='o', markersize=2.7, markerfacecolor='#FFCC00', markeredgewidth=0.1, markeredgecolor='k', zorder=4)
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='Stable isotopes', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=30)
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=frib_yields[frib_yields.Z == magic_nrs[i]].N.min()-5, xmax=frib_yields[frib_yields.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=frib_yields[frib_yields.N == magic_nrs[i]].Z.min()-5, ymax=frib_yields[frib_yields.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=frib_yields[frib_yields.Z == magic_nrs[i]].N.min()-5, xmax=frib_yields[frib_yields.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=frib_yields[frib_yields.N == magic_nrs[i]].Z.min()-5, ymax=frib_yields[frib_yields.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=frib_yields[frib_yields.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=22, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=22, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, 164)
ax.set_ylim(-1, 100)
plt.tick_params(labelsize=16)
lg1 = ax.legend(loc=4, markerscale=3,fontsize=14, edgecolor='None', facecolor='None')
# plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
# plt.gca().add_artist(lg1)
# lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white')
# plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-frib-cris-mrtof.pdf',bbox_inches='tight',pad_inches=0.02)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
Ionization Energies Atoms¶
%config InlineBackend.figure_format ='retina'
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# E_ion_df['dIE'] = E_ion_df['IonizationEnergy (eV)'] - E_ion_df['IonizationEnergy (eV)'].shift(1)
magic_nrs = [2,10,18,36,54,86]
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(12,6))
axin = ax.inset_axes([0.6,0.6,0.4,0.4])
E_ion_df.plot(x='At.Num.', y='IonizationEnergy (eV)', yerr='Uncertainty (eV)',
ax=ax, zorder=50, label='_', lw=0.7, c='k', marker='o',
markersize=3, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
E_ion_df.plot(x='At.Num.', y='IonizationEnergy (eV)', yerr='Uncertainty (eV)',
ax=axin, zorder=50, label='_', lw=2, c='k', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
for n in magic_nrs:
ax.axvline(x=n, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
plt.text(x=n+1, y=E_ion_df[E_ion_df['At.Num.'] == n]['IonizationEnergy (eV)']-0.3,
s=E_ion_df[E_ion_df['At.Num.'] == n]['El.name'].to_numpy()[0],
fontweight='bold', fontsize=15)
E_ion_df[E_ion_df['At.Num.'] == n].plot(x='At.Num.', y='IonizationEnergy (eV)', yerr='Uncertainty (eV)',
ax=ax, zorder=51, label='_', lw=0, c='#FF2d55', marker='o',
markersize=5, markerfacecolor='#FF2d55', markeredgewidth=0.5,
markeredgecolor='k',ecolor='k')
if n==54:
axin.axvline(x=n, color='#00A2FF',linestyle='--', linewidth=2, zorder=1, label='magic $N$')
axin.text(x=n+0.2, y=E_ion_df[E_ion_df['At.Num.'] == n]['IonizationEnergy (eV)']-0.5,
s=E_ion_df[E_ion_df['At.Num.'] == n]['El.name'].to_numpy()[0],
fontweight='bold', fontsize=15)
E_ion_df[E_ion_df['At.Num.'] == n].plot(x='At.Num.', y='IonizationEnergy (eV)', yerr='Uncertainty (eV)',
ax=axin, zorder=51, label='x', lw=0, c='#FF2d55', marker='o',
markersize=10, markerfacecolor='#FF2d55', markeredgewidth=1,
markeredgecolor='k',ecolor='k')
# standardized figure parameters
ax.set_xlabel('Proton Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Electron Binding Energy (eV)', fontsize=24, fontweight='bold')
ax.set_xticks(magic_nrs)
ax.set_xlim(0,E_ion_df['At.Num.'].max()+1)
ax.set_ylim(3,27)
axin.set_xlim(50.5,55.5)
axin.set_ylim(2.75,14.75)
axin.set_xticks([54])
axin.set_yticks([5,10])
axin.set_xlabel('')
plt.tick_params(labelsize=16)
axin.tick_params(labelsize=16)
# handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
# handles1 = [handles[0],handles[-1]]
# lg1 = ax.legend(handles=handles1,loc=4, markerscale=6,fontsize=16, ncol=1, edgecolor='white')
# plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
# plt.gca().add_artist(lg1)
ax.get_legend().remove()
axin.get_legend().remove()
plt.savefig('ElectronBindingEnergy.pdf',bbox_inches='tight',pad_inches=0,transparent=True)
plt.show()
General chart -- year of discovery¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
# only measured values of ground states
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\beta^-$', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\beta^+$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='EC', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D935', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\alpha$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC00', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='n', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='SF', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='measured', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='p', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
# displaying extrapolated values of ground states
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#00A2FF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FFCC00', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#16E7CF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D55', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(labelsize=16)
handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[2],handles[3],handles[4],handles[6],handles[5],handles[8]]
handles2 = [handles[0],handles[7],handles[9]]
lg1 = ax.legend(handles=handles1,loc=4,title = 'Decay', markerscale=6,fontsize=16, ncol=2, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white')
plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
ISOLDE yields¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
from mpl_toolkits.axes_grid1.inset_locator import InsetPosition
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:bold',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
plt.tick_params(labelsize=16)
# measured masses
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='measured', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
# extrapolated masses
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k', zorder=3)
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# plot yield with a colormap in a logarithmic fashion
sc = ax.scatter(x=nubase_df.N.tolist(), y=nubase_df.Z.tolist(), c=nubase_df.isolde_yields_log.tolist(),
s=7, marker='s', edgecolors='k', linewidths=.2, cmap='rainbow',zorder=6)
# inserting the color map
ax2 = f.add_axes([0.78, 0.18, 0.03, 0.4])
cbar = plt.colorbar(sc, cax=ax2, ticks=[np.log(6e-04),np.log(4e+00),np.log(4e+04),np.log(4e+08),np.log(2e+12)])
ax2.set_ylabel('ISOLDE yield / $\mu$C', fontsize=20, fontweight='bold', labelpad=-80)
cbar.ax.set_yticklabels(['$10^{-4}$','$10^{0}$','$10^{4}$','$10^{8}$','$10^{12}$'])
plt.tick_params(axis='both', which='major', labelsize=16)
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
ax.set_xticks(magic_nrs)
ax.set_yticks(magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
lg = ax.legend(fontsize=16, markerscale=6, loc=2, ncol=1, edgecolor='white')
plt.setp(lg.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-isolde-yield.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
Isotopes measured/published at ISOLTRAP since 2017¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
plt.tick_params(labelsize=16)
# loglog-plot of mass uncertainty
sc_m_unc = ax.scatter(x=ame_df.N.tolist(), y=ame_df.Z.tolist(), c=ame_df.mass_prec.tolist(),
s=7, marker='s', edgecolors='k', linewidths=.2, cmap='rainbow',zorder=3)
# plotting the stable and extrapolated isotopes
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='x', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.5, markeredgecolor='k', zorder=3)
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='measured', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k', zorder=0)
ame_df[ame_df.extrapol == True].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k',zorder=2)
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# lists of measured or published masses since 2017 at the ISOLTRAP setup at CERN/ISOLDE
masses_2017__ = ['39K', '85Rb', '133Cs', # offline source
'88Sr', '88Rb', # 2017-05 ArKr
'127Cd', '129Cd', '130Cd', '131Cd', '132Cd', # 2017-07 Cd
'131Cs', # 2017-07 Cs
'48Ar', '98Kr', '99Kr', # 2017-08 ArKr
'49Sc', '50Sc', '51Sc', '99In', '100In', '101In', # 2018-04 ScIn
'70As', '71As', '71Br', '72Br', '73Br', '81Br'] # 2018-05 Br
publications_2017__ = ['27Na', '97Rb', '99Rb', '100Rb', '100Sr', '103Sr', '129Cd', # R. Wolf - Nucl.Instrum. Meth. B 376, 275-280 (2016)
'132Cs', '146Cs', '147Cs', '148Cs', # D. Atanasov - J. Phys. G 44, 064008 (2017)
'185Au', '197At', '219At', '180Au', '188Au', '190Au', # V. Manea - Phys. Rev. C 95, 054322 (2017)
'100Sr', '101Sr', '102Sr', '100Rb', '101Rb', '102Rb', # A. de Roubin - Phys. Rev. C 96, 014310 (2017)
'202Pb', '202Tl', '203Tl', # A. Welker - Eur. Phys. J. A 53, 153 (2017)
'75Cu', '76Cu', '77Cu', '78Cu', '79Cu', # A. Welker - Phys. Rev. Lett. 119, 192502 (2017)
'195Po', '196Po', '197Po', '199Po', '203Po', '208Po', # N. Althubiti - Phys. Rev. C 96, 044325 (2017)
'58Cr', '59Cr', '60Cr', '61Cr', '62Cr', '63Cr', # M. Mougeot - Phys. Rev. Lett. 120, 232501 (2018)
'177Hg', '178Hg', '179Hg', '180Hg', '181Hg', '182Hg', '183Hg', '184Hg', '185Hg', # B. Marsh - Nature Physics 14, 1163 (2018)
'131Cs', '131Xe', # J. Karthein - Hyperfine Interact (2019) 240: 61
'52Cr', '53Cr', '54Cr', '55Cr', '56Cr', '57Cr', '55Mn', '56Fe', '59Fe', '59Co', '75Ga', '77Ga', '78Ga', '79Ga', '140Ce', '140Nd', '156Dy', '160Yb', '168Lu', '178Yb', # W.J. Huang - Eur. Phys. J. A (2019) 55: 96.
'33Mg', '34Mg', '34Si', '34Al', # P. Ascher - Phys. Rev. C 100, 014304 (2019)
'21Na', '21Ne', '23Mg', '23Na'] # J. Karthein - Phys. Rev. C 100, 015502 (2019)
# plotting those measured masses
ax.plot([i[0] for i in [nubase_df.N[nubase_df.index == i].tolist() for i in masses_2017__+publications_2017__]],
[i[0] for i in [nubase_df.Z[nubase_df.index == i].tolist() for i in masses_2017__+publications_2017__]],
marker='+', c='#FF2D55', lw=0, ms=3, mew=1, zorder=50, label='ISOLTRAP\nsince 2017')
# inserting the color map
ax2 = f.add_axes([0.78, 0.18, 0.03, 0.4])
cbar = plt.colorbar(sc_m_unc, cax=ax2, ticks=[np.log(abs(np.log(3e-11))),np.log(abs(np.log(1e-8))),
np.log(abs(np.log(1e-6))),np.log(abs(np.log(3e-5)))])
ax2.set_ylabel('Precision $\delta$m/m', fontsize=20, fontweight='bold', labelpad=-80)
cbar.ax.set_yticklabels(['$10^{-10}$','$10^{-8}$','$10^{-6}$','$10^{-4}$'])
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
ax.set_xticks(magic_nrs)
ax.set_yticks(magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(axis='both', which='major', labelsize=16)
lg = ax.legend(fontsize=16, markerscale=6, loc=2, ncol=1, edgecolor='white')
plt.setp(lg.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-ISOLTRAP-2017--.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
Nuclear chart: mass precision¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
# only measured values of ground states
limit = 100
limit2 = 10
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\beta^-$', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\beta^+$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='EC', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D935', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\alpha$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC00', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='n', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='SF', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 10$ keV)', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='p', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
# displaying [limit2]<x<[limit] keV uncertainty
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF70', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D93570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC0070', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF70', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF70', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 100$ keV)', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
f.text(x=0.16,y=0.77,s='70%', fontweight='bold', fontsize=8)
# displaying x<[limit] keV uncertainty
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF40', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5540', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC0040', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF40', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E540', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5540', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
f.text(x=0.16,y=0.715,s='40%', fontweight='bold', fontsize=8)
# displaying extrapolated values of ground states
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#00A2FF25', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D5525', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FFCC0025', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#16E7CF25', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D5525', markeredgewidth=0.1, markeredgecolor='k')
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(labelsize=16)
handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[2],handles[3],handles[4],handles[6],handles[5],handles[8]]
handles2 = [handles[0],handles[7],handles[9],handles[10]]
lg1 = ax.legend(handles=handles1,loc=4,title = 'Decay', markerscale=6,fontsize=16, ncol=2, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white')
plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-precision.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
Nuclear chart: mass precision (exp) + ISOLTRAP¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
# only measured values of ground states
limit = 100
limit2 = 10
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\beta^-$', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\beta^+$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='EC', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D935', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\alpha$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC00', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='n', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='SF', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 10$ keV)', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='p', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
# displaying [limit2]<x<[limit] keV uncertainty
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF70', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D93570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC0070', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF70', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF70', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 100$ keV)', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
f.text(x=0.16,y=0.77,s='70%', fontweight='bold', fontsize=8)
# displaying x<[limit] keV uncertainty
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF40', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5540', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC0040', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF40', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E540', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5540', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
f.text(x=0.16,y=0.715,s='40%', fontweight='bold', fontsize=8)
# # displaying extrapolated values of ground states
# nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#00A2FF25', markeredgewidth=0.1, markeredgecolor='k')
# nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D5525', markeredgewidth=0.1, markeredgecolor='k')
# nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FFCC0025', markeredgewidth=0.1, markeredgecolor='k')
# nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#16E7CF25', markeredgewidth=0.1, markeredgecolor='k')
# nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k')
# nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D5525', markeredgewidth=0.1, markeredgecolor='k')
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# lists of measured or published masses since 2017 at the ISOLTRAP setup at CERN/ISOLDE
masses_2017__ = ['39K', '85Rb', '133Cs', # offline source
'88Sr', '88Rb', # 2017-05 ArKr
'127Cd', '129Cd', '130Cd', '131Cd', '132Cd', # 2017-07 Cd
'131Cs', # 2017-07 Cs
'48Ar', '98Kr', '99Kr', # 2017-08 ArKr
'49Sc', '50Sc', '51Sc', '99In', '100In', '101In', # 2018-04 ScIn
'70As', '71As', '71Br', '72Br', '73Br', '81Br'] # 2018-05 Br
publications_2017__ = ['27Na', '97Rb', '99Rb', '100Rb', '100Sr', '103Sr', '129Cd', # R. Wolf - Nucl.Instrum. Meth. B 376, 275-280 (2016)
'132Cs', '146Cs', '147Cs', '148Cs', # D. Atanasov - J. Phys. G 44, 064008 (2017)
'185Au', '197At', '219At', '180Au', '188Au', '190Au', # V. Manea - Phys. Rev. C 95, 054322 (2017)
'100Sr', '101Sr', '102Sr', '100Rb', '101Rb', '102Rb', # A. de Roubin - Phys. Rev. C 96, 014310 (2017)
'202Pb', '202Tl', '203Tl', # A. Welker - Eur. Phys. J. A 53, 153 (2017)
'75Cu', '76Cu', '77Cu', '78Cu', '79Cu', # A. Welker - Phys. Rev. Lett. 119, 192502 (2017)
'195Po', '196Po', '197Po', '199Po', '203Po', '208Po', # N. Althubiti - Phys. Rev. C 96, 044325 (2017)
'58Cr', '59Cr', '60Cr', '61Cr', '62Cr', '63Cr', # M. Mougeot - Phys. Rev. Lett. 120, 232501 (2018)
'177Hg', '178Hg', '179Hg', '180Hg', '181Hg', '182Hg', '183Hg', '184Hg', '185Hg', # B. Marsh - Nature Physics 14, 1163 (2018)
'131Cs', '131Xe', # J. Karthein - Hyperfine Interact (2019) 240: 61
'52Cr', '53Cr', '54Cr', '55Cr', '56Cr', '57Cr', '55Mn', '56Fe', '59Fe', '59Co', '75Ga', '77Ga', '78Ga', '79Ga', '140Ce', '140Nd', '156Dy', '160Yb', '168Lu', '178Yb', # W.J. Huang - Eur. Phys. J. A (2019) 55: 96.
'33Mg', '34Mg', '34Si', '34Al', # P. Ascher - Phys. Rev. C 100, 014304 (2019)
'21Na', '21Ne', '23Mg', '23Na'] # J. Karthein - Phys. Rev. C 100, 015502 (2019)
# plotting those measured masses
ax.plot([i[0] for i in [nubase_df.N[nubase_df.index == i].tolist() for i in masses_2017__+publications_2017__]],
[i[0] for i in [nubase_df.Z[nubase_df.index == i].tolist() for i in masses_2017__+publications_2017__]],
marker='P', c='yellow', lw=0, zorder=50, label='ISOLTRAP\nsince 2017',
markersize=4, markerfacecolor='yellow', markeredgewidth=0.1, markeredgecolor='k')
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(labelsize=16)
handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[2],handles[3],handles[4],handles[6],handles[5],handles[8]]
handles2 = [handles[0],handles[7],handles[9],handles[10]]#,handles[11]]
lg1 = ax.legend(handles=handles1,loc=4,title = 'Decay', markerscale=6,fontsize=16, ncol=2, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white', framealpha=0)
plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-precision-ISOLTRAP17.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
print('Measured isotopes',len(nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.extrapol == False)]))
print('Extrapolated isotopes',len(nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.extrapol == True)]))
print('Measured isomers',len(nubase_df[(nubase_df['Z_+'].astype(str).str[-1] != '0')&(nubase_df.extrapol == False)]))
Measured isotopes 2555 Extrapolated isotopes 1003 Measured isomers 1894
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
# colors: 0=turquoise, 1=green, 2=yellow, 3=red, 4=blue, 5=purple, 6=gray, 7=black, 8=dark blue, 9=dark green, 10=mint, 11 = black
col = ['#6FF1E9', '#61D935', '#FFCC00', '#FF2D55', '#00A2FF', '#C177DA', '#C0C0C0', '#000000', '#3b75af', '#4EA772', '#73B5A5', '#000000']
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
# only measured values of ground states
limit = 100
limit2 = 10
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\beta^-$', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\beta^+$', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='EC', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\alpha$', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='n', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='SF', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 10$ keV)', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='p', lw=0, marker='s', markersize=2.7, markerfacecolor=col[6], alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# lists of measured or published masses since 2017 at the ISOLTRAP setup at CERN/ISOLDE
indiums = ['{}In'.format(i) for i in range(52,83,2)]
# # plotting those measured masses
# ax.plot([i[0] for i in [nubase_df.N[nubase_df.index == i].tolist() for i in indiums]],
# [i[0] for i in [nubase_df.Z[nubase_df.index == i].tolist() for i in indiums]],
# marker='P', c='yellow', lw=0, zorder=50, label='ISOLTRAP\nsince 2017',
# markersize=4, markerfacecolor='yellow', markeredgewidth=0.1, markeredgecolor='k')
# spheres indicating the nuclear deformation
# add spheres at bottom
ax_sph1 = f.add_axes([0.2, 0.3, 0.05, 0.1],projection='3d')
ax_sph2 = f.add_axes([0.3, 0.3, 0.05, 0.1],projection='3d')
ax_sph3 = f.add_axes([0.4, 0.3, 0.05, 0.1],projection='3d')
for i in [ax_sph1, ax_sph2, ax_sph3]:
i.axis('off')
i.set_facecolor('#00000000')
i.set_zlim(-1,1)
r = 0.05; u, v = np.mgrid[0:2 * np.pi:30j, 0:np.pi:20j]
ax_sph1.plot_surface(np.cos(u) * np.sin(v), np.sin(u) * np.sin(v), np.cos(v)*1.2, cmap=plt.cm.Blues)
ax_sph2.plot_surface(np.cos(u) * np.sin(v), np.sin(u) * np.sin(v), np.cos(v)*2, cmap=plt.cm.Blues, alpha=0.4)
ax_sph2.plot_surface(np.cos(u) * np.sin(v), np.sin(u) * np.sin(v), np.cos(v)*1.2, cmap=plt.cm.Blues)
ax_sph3.plot_surface(np.cos(u) * np.sin(v), np.sin(u) * np.sin(v), np.cos(v)*1.2, cmap=plt.cm.Blues)
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(labelsize=16)
# handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
# handles1 = [handles[1],handles[2],handles[3],handles[4],handles[6],handles[5],handles[8]]
# handles2 = [handles[0],handles[7],handles[9],handles[10]]#,handles[11]]
# lg1 = ax.legend(handles=handles1,loc=4,title = 'Decay', markerscale=6,fontsize=16, ncol=2, edgecolor='white')
# plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
# plt.gca().add_artist(lg1)
# lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white', framealpha=0)
# plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
ax.get_legend().remove()
plt.savefig('nuclear-chart-indium.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
Nuclear char: mass precision & r-process path¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
# plot ISOLTRAP measurements (put isoltrap = True)
isoltrap = False
# only measured values of ground states
limit = 100
limit2 = 10
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\beta^-$', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\beta^+$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='EC', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D935', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='$\\alpha$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC00', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='n', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='SF', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 10$ keV/$c^2$)', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV < limit2)].plot(x='N', y='Z', ax=ax, label='p', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
# displaying [limit2]<x<[limit] keV uncertainty
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF70', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D93570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC0070', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF70', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF70', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='measured ($\delta m \geq 100$ keV/$c^2$)', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E570', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit2)&(nubase_df.ME_unc_keV < limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5570', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
f.text(x=0.16,y=0.767,s='70%', fontweight='bold', fontsize=8)
# displaying x<[limit] keV uncertainty
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF40', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5540', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC0040', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF40', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E540', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)&(nubase_df.ME_unc_keV >= limit)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D5540', alpha=0.5, markeredgewidth=0.1, markeredgecolor='k')
f.text(x=0.16,y=0.71,s='40%', fontweight='bold', fontsize=8)
# displaying extrapolated values of ground states
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#00A2FF25', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D5525', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FFCC0025', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#16E7CF25', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D5525', markeredgewidth=0.1, markeredgecolor='k')
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# lists of measured or published masses since 2017 at the ISOLTRAP setup at CERN/ISOLDE
masses_2017__ = ['39K', '85Rb', '133Cs', # offline source
'88Sr', '88Rb', # 2017-05 ArKr
'127Cd', '129Cd', '130Cd', '131Cd', '132Cd', # 2017-07 Cd
'131Cs', # 2017-07 Cs
'48Ar', '98Kr', '99Kr', # 2017-08 ArKr
'49Sc', '50Sc', '51Sc', '99In', '100In', '101In', # 2018-04 ScIn
'70As', '71As', '71Br', '72Br', '73Br', '81Br'] # 2018-05 Br
publications_2017__ = ['27Na', '97Rb', '99Rb', '100Rb', '100Sr', '103Sr', '129Cd', # R. Wolf - Nucl.Instrum. Meth. B 376, 275-280 (2016)
'132Cs', '146Cs', '147Cs', '148Cs', # D. Atanasov - J. Phys. G 44, 064008 (2017)
'185Au', '197At', '219At', '180Au', '188Au', '190Au', # V. Manea - Phys. Rev. C 95, 054322 (2017)
'100Sr', '101Sr', '102Sr', '100Rb', '101Rb', '102Rb', # A. de Roubin - Phys. Rev. C 96, 014310 (2017)
'202Pb', '202Tl', '203Tl', # A. Welker - Eur. Phys. J. A 53, 153 (2017)
'75Cu', '76Cu', '77Cu', '78Cu', '79Cu', # A. Welker - Phys. Rev. Lett. 119, 192502 (2017)
'195Po', '196Po', '197Po', '199Po', '203Po', '208Po', # N. Althubiti - Phys. Rev. C 96, 044325 (2017)
'58Cr', '59Cr', '60Cr', '61Cr', '62Cr', '63Cr', # M. Mougeot - Phys. Rev. Lett. 120, 232501 (2018)
'177Hg', '178Hg', '179Hg', '180Hg', '181Hg', '182Hg', '183Hg', '184Hg', '185Hg', # B. Marsh - Nature Physics 14, 1163 (2018)
'131Cs', '131Xe', # J. Karthein - Hyperfine Interact (2019) 240: 61
'52Cr', '53Cr', '54Cr', '55Cr', '56Cr', '57Cr', '55Mn', '56Fe', '59Fe', '59Co', '75Ga', '77Ga', '78Ga', '79Ga', '140Ce', '140Nd', '156Dy', '160Yb', '168Lu', '178Yb', # W.J. Huang - Eur. Phys. J. A (2019) 55: 96.
'33Mg', '34Mg', '34Si', '34Al', # P. Ascher - Phys. Rev. C 100, 014304 (2019)
'21Na', '21Ne', '23Mg', '23Na'] # J. Karthein - Phys. Rev. C 100, 015502 (2019)
# plotting those measured masses
if isoltrap:
ax.plot([i[0] for i in [nubase_df.N[nubase_df.index == i].tolist() for i in masses_2017__+publications_2017__]],
[i[0] for i in [nubase_df.Z[nubase_df.index == i].tolist() for i in masses_2017__+publications_2017__]],
marker='P', c='yellow', lw=0, zorder=50, label='ISOLTRAP\nsince 2017',
markersize=4, markerfacecolor='yellow', markeredgewidth=0.1, markeredgecolor='k')
# loading and plotting r-process waiting points, taken from ETFSI-Q
rpath = pd.read_csv('bin/etfsi-r-process-path.csv', header=0)
rpath.plot(x='N', y='Z', ax=ax, label='r-process (ETFSI-Q)', lw=0, marker='s', markersize=2.5, markerfacecolor='#6FF1E900', markeredgewidth=0.5, markeredgecolor='#FF5D00')#C177DA
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(labelsize=16)
handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[2],handles[3],handles[4],handles[6],handles[5],handles[8]]
if isoltrap:
handles2 = [handles[0],handles[7],handles[9],handles[12],handles[10],handles[11]]
else:
handles2 = [handles[0],handles[7],handles[9],handles[11],handles[10]]
lg1 = ax.legend(handles=handles1,loc=4,title = 'Decay', markerscale=6,fontsize=16, ncol=2, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white', framealpha=0)
plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-r-path.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
Carbon cluster coverage¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(9,6))
alpha_c = 0.4
# only measured values of ground states
nubase_df[(nubase_df.t_1_2 == 'stbl')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='stable', lw=0, marker='s', markersize=2.7, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'IS')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='k', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\beta^-$', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\beta^+$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'EC')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='EC', lw=0, marker='s', markersize=2.7, markerfacecolor='#61D935', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'e+')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='$\\alpha$', lw=0, marker='s', markersize=2.7, markerfacecolor='#FFCC00', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'n')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='n', lw=0, marker='s', markersize=2.7, markerfacecolor='#00A2FF', alpha=alpha_c*0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='SF', lw=0, marker='s', markersize=2.7, markerfacecolor='#16E7CF', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='measured', lw=0, marker='s', markersize=2.7, markerfacecolor='#E5E5E5', alpha=alpha_c*0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == False)].plot(x='N', y='Z', ax=ax, label='p', lw=0, marker='s', markersize=2.7, markerfacecolor='#FF2D55', alpha=alpha_c*0.5, markeredgewidth=0.1, markeredgecolor='k')
# displaying extrapolated values of ground states
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B-')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#00A2FF', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'B+')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D55', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'A')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FFCC00', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0:2] == 'SF')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#16E7CF', alpha=alpha_c, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='extrapolated', lw=0, marker='o', markersize=2.7, markerfacecolor='white', alpha=alpha_c*0.5, markeredgewidth=0.1, markeredgecolor='k')
nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')&(nubase_df.decay.str[0] == 'p')&(nubase_df.extrapol == True)].plot(x='N', y='Z', ax=ax, label='_nolegend_', lw=0, marker='o', markersize=2.7, markerfacecolor='#FF2D55', alpha=alpha_c*0.5, markeredgewidth=0.1, markeredgecolor='k')
# marking the mass range of carbon clusters
nubase_df[(nubase_df.A % 12 == 0)].plot(x='N', y='Z', ax=ax, lw=0, marker=[(1,-1), (1.1,-0.9), (-0.9,1.1), (-1,1)], markersize=15, c='#FF2D55', mec=None, label='C cluster')
# inserting lines to display the magic Numbers and adding the "magic elements"
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_el = ['He', 'O', 'Ca', 'Ni', 'Sn', 'Pb', 'Ubh']
for i in range(len(magic_nrs)):
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', linewidth=1)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', linewidth=1)
plt.hlines(y=magic_nrs[i], xmin=nubase_df[nubase_df.Z == magic_nrs[i]].N.min()-5, xmax=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.vlines(x=magic_nrs[i], ymin=nubase_df[nubase_df.N == magic_nrs[i]].Z.min()-5, ymax=nubase_df[nubase_df.N == magic_nrs[i]].Z.max()+5, color='k', alpha=0.5, linewidth=1, zorder=50)
plt.text(x=nubase_df[nubase_df.Z == magic_nrs[i]].N.max()+5.5,
y=magic_nrs[i]-2.5,
s='{}'.format(magic_el[i]), fontweight='bold', fontsize=18)
# standardized figure parameters
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('Proton Number', fontsize=24, fontweight='bold')
plt.xticks(magic_nrs, magic_nrs)
plt.yticks(magic_nrs, magic_nrs)
ax.set_xlim(-1, nubase_df.N.max()+1)
ax.set_ylim(-1, nubase_df.Z.max()+1)
plt.tick_params(labelsize=16)
handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[2],handles[3],handles[4],handles[6],handles[5],handles[8]]
handles2 = [handles[0],handles[7],handles[9]]
lg1 = ax.legend(handles=handles1,loc=4,title = 'Decay', markerscale=6,fontsize=16, ncol=2, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
lg2 = ax.legend(handles=handles2,loc=2,fontsize=16, markerscale=6, ncol=1, edgecolor='white')
plt.setp(lg2.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.savefig('nuclear-chart-carbon-clusters.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values posx and posy should be finite values
$E_B$ plot¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
from scipy.constants import physical_constants
import warnings
warnings.filterwarnings('ignore')
u = physical_constants['atomic mass constant energy equivalent in MeV'][0]
m_p = physical_constants['proton mass energy equivalent in MeV'][0]
m_n = physical_constants['neutron mass energy equivalent in MeV'][0]
m_e = physical_constants['electron mass energy equivalent in MeV'][0]
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro:bold',
it='Linguistics Pro:italic:bold',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax = plt.subplots(1,1,figsize=(12,6))
# calculating S2N and uncertainties
nubase_df['EB'] = 0.0
nubase_df['EB_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_EB_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
eb_max = []
# plot EB for experimental values
for z,df_z in nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')].groupby('Z'):
df_z.EB = -(df_z.ME_keV/1000 + df_z.A * u - (df_z.N * m_n + df_z.Z * m_p + df_z.Z * m_e))/df_z.A
df_z.EB_unc = df_z.ME_unc_keV/1000
eb_max.append([df_z.EB.idxmax(), df_z.N[df_z.EB.idxmax()], df_z.EB.max()])
# print(df_z)
# save magic-N-S2N
for n in magic_nrs:
if df_z[(df_z.N == n)&(df_z.extrapol == False)].EB.empty == False:
magic_EB_dict[n].append(df_z[(df_z.N == n)].EB[0])
# plot S2N in black, except for magic-Z -> red
if z in magic_nrs[:3]:
df_z[(df_z.extrapol == False)].plot(x='N', y='EB', yerr='EB_unc', ax=ax, zorder=50,
label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
plt.text(x=df_z[(df_z.extrapol == False)].N.max(),
y=df_z[(df_z.extrapol == False)].EB[df_z[(df_z.extrapol == False)].N.idxmax()]-1,
s='$Z$ = {}'.format(z), fontweight='bold', fontsize=16)
elif z in magic_nrs[3:]:
df_z[(df_z.extrapol == False)].plot(x='N', y='EB', yerr='EB_unc', ax=ax, zorder=50,
label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
plt.text(x=df_z[(df_z.extrapol == False)].N.max(),
y=df_z[(df_z.extrapol == False)].EB[df_z[(df_z.extrapol == False)].N.idxmax()]+0.5,
s='$Z$ = {}'.format(z), fontweight='bold', fontsize=16)
else:
df_z[(df_z.extrapol == False)].plot(x='N', y='EB', yerr='EB_unc', zorder=1,
ax=ax, label='_nolegend_', lw=0.5,c='k',
marker='o', markersize=1.5, markerfacecolor='k',
markeredgewidth=0.1, markeredgecolor='k')
eb_max = pd.DataFrame(eb_max, columns=['el','N','EB_max'])
eb_max[eb_max.EB_max == eb_max.EB_max.max()].plot(x='N',y='EB_max', ax=ax, c='#FFCC00',
marker='*', label='_nolegend_', markersize=20,
markeredgewidth=0.5, markeredgecolor='k')
plt.text(x=eb_max.N[eb_max.EB_max == eb_max.EB_max.max()]-5,
y=eb_max.EB_max.max()+0.5,
s='$^{62}$Ni', fontweight='bold', fontsize=16)
# inserting lines to display the magic Numbers
for n in magic_nrs:
plt.vlines(x=n, ymin=min(magic_EB_dict[n])-1, ymax=max(magic_EB_dict[n])+1,
color='#00A2FF',linewidth=1.5, zorder=1, label='magic $N$')
# standardized figure parameters
plt.tick_params(labelsize=16)
ax.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax.set_ylabel('$E_{B} / (N+Z)$ (MeV)', fontsize=24, fontweight='bold')
ax.set_xticks(magic_nrs)
ax.set_xlim(0,158)
handles, labels = ax.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[0],handles[-1]]
lg1 = ax.legend(handles=handles1,loc=4, markerscale=6,fontsize=16, ncol=1, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
plt.savefig('EB.pdf',bbox_inches='tight',pad_inches=0,transparent=True)
plt.show()
$S_{1n}$ plot¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
from scipy.constants import physical_constants
import warnings
warnings.filterwarnings('ignore')
# u = physical_constants['atomic mass constant energy equivalent in MeV'][0]
m_p = physical_constants['proton mass energy equivalent in MeV'][0]
m_n = physical_constants['neutron mass energy equivalent in MeV'][0]
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro:bold',
it='Linguistics Pro:italic:bold',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax2 = plt.subplots(1,1,figsize=(12,6))
ax2in = ax2.inset_axes([0.6,0.6,0.4,0.4])
# calculating S1N
nubase_df['s1n'] = 0.0
nubase_df['s1n_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_s1n_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
for z,df_z in nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')].groupby('Z'):
df_z.s1n = df_z.ME_keV.shift(1)/1000 - df_z.ME_keV/1000 + nubase_df.ME_keV['1 n']/1000
df_z.s1n_unc = np.sqrt((df_z.ME_unc_keV.shift(1)/1000).pow(2)
+ (df_z.ME_unc_keV/1000).pow(2)
+ (nubase_df.ME_unc_keV['1 n']/1000)**2)
# save magic-N-S1N
for n in magic_nrs:
if df_z[(df_z.N == n)&(df_z.extrapol == False)].s1n.empty == False:
magic_s1n_dict[n].append(df_z[df_z.N == n].s1n[0])
# plot S1N in black, except for magic-Z -> red
if z in magic_nrs:
df_z[(df_z.extrapol == False)].plot(x='N', y='s1n', yerr='s1n_unc', ax=ax2, label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=50)
ax2.text(x=df_z[(df_z.extrapol == False)].N[df_z[(df_z.extrapol == False)].s1n.idxmin()],
y=df_z[(df_z.extrapol == False)].s1n.min()-2,s='$Z$ = {}'.format(z),
fontweight='bold', fontsize=16)
if z == 50:
df_z[(df_z.extrapol == False)].plot(x='N', y='s1n', ax=ax2in, label='magic $Z$', lw=3, c='#FF2D55', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=50)
else:
try:
df_z[(df_z.extrapol == False)&(df_z.Z < 101)].iloc[2:].plot(x='N', y='s1n', ax=ax2, label='_nolegend_', lw=0.5, c='k', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=1)
except:
pass
# inserting lines to display the magic Numbers
for magic in magic_nrs:
ax2.axvline(x=magic, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
# standardized figure parameters
ax2.tick_params(labelsize=16)
ax2.minorticks_off()
ax2.get_legend().remove()
ax2.set_ylim(-4.9, 32)
ax2.set_yticks([0,10,20, 30])
# inlet parameters
ax2in.set_xlim(76.5, 85.5)
ax2in.set_ylim(1.5, 8.5)
ax2in.set_xticks([82])
ax2in.set_yticks([2,5,8])
ax2in.set_xlabel('')
ax2in.tick_params(labelsize=16)
ax2in.text(x=77,y=2,s='$Z=50$',fontweight='bold',fontsize=20)
ax2in.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
ax2in.get_legend().remove()
# standardized figure parameters
ax2.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax2.set_ylabel('$S_{1n}$ (MeV)', fontsize=24, fontweight='bold')
ax2.set_xticks(magic_nrs)
ax2.set_xlim(0,158)
handles, labels = ax2.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[0],handles[-1]]
lg1 = ax2.legend(handles=handles1,loc=2, markerscale=6,fontsize=16, ncol=1, edgecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
plt.gca().add_artist(lg1)
plt.savefig('s1n.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
$S_{2n}$ plot¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
from scipy.constants import physical_constants
import warnings
warnings.filterwarnings('ignore')
# u = physical_constants['atomic mass constant energy equivalent in MeV'][0]
m_p = physical_constants['proton mass energy equivalent in MeV'][0]
m_n = physical_constants['neutron mass energy equivalent in MeV'][0]
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic:bold',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax3 = plt.subplots(1,1,figsize=(12,6))
ax3in = ax3.inset_axes([0.6,0.6,0.4,0.4])
# calculating S2N and uncertainties
nubase_df['s2n'] = 0.0
nubase_df['s2n_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_s2n_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
# plot s2n for experimental values
for z,df_z in nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')].groupby('Z'):
df_z.s2n = df_z.ME_keV.shift(2)/1000 - df_z.ME_keV/1000 + nubase_df.ME_keV['1 n']/1000 * 2
df_z.s2n_unc = np.sqrt((df_z.ME_unc_keV.shift(2)/1000).pow(2)
+ (df_z.ME_unc_keV/1000).pow(2)
+ (nubase_df.ME_unc_keV['1 n']/1000 * 2)**2)
# save magic-N-S2N
for n in magic_nrs:
if df_z[(df_z.N == n)&(df_z.extrapol == False)].s2n.empty == False:
magic_s2n_dict[n].append(df_z[(df_z.N == n)].s2n[0])
# plot S2N in black, except for magic-Z -> red
if z in magic_nrs:
df_z[(df_z.extrapol == False)].plot(x='N', y='s2n', yerr='s2n_unc', ax=ax3,
label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k', zorder=50)
ax3.text(x=df_z[(df_z.extrapol == False)].N.max()-4.3,
y=df_z[(df_z.extrapol == False)].s2n[df_z[(df_z.extrapol == False)].N.idxmax()]-4,
s='$Z$ = {}'.format(z), fontweight='bold', fontsize=16)
if z == 50:
df_z[(df_z.extrapol == False)].plot(x='N', y='s2n', yerr='s2n_unc', ax=ax3in,
label='magic $Z$', lw=3, c='#FF2D55', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k', zorder=50)
else:
try:
df_z[(df_z.extrapol == False)&(df_z.Z < 101)].plot(x='N', y='s2n', yerr='s2n_unc', zorder=1,
ax=ax3, label='_nolegend_', lw=0.5,c='k',
marker='o', markersize=1.5, markerfacecolor='k',
markeredgewidth=0.1, markeredgecolor='k')
except:
pass
# inserting lines to display the magic Numbers
for n in magic_nrs:
# ax3.vlines(x=n, ymin=min(magic_s2n_dict[n])-2.5, ymax=max(magic_s2n_dict[n])+2.5,
# color='#00A2FF',linewidth=1.5, zorder=1, label='magic $N$')
ax3.axvline(x=n, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
# areas of sudden change and magic N=32
ellipse1 = mpl.patches.Ellipse(xy=(60, 11), width=4, height=8, edgecolor='#61D935',
fc='None', lw=2, label='sudden change')
ellipse2 = mpl.patches.Ellipse(xy=(91, 13), width=4, height=8, edgecolor='#61D935',
fc='None', lw=2)
ax3.add_patch(ellipse1)
ax3.add_patch(ellipse2)
ax3.vlines(x=32, ymin=7, ymax=13, color='#FFCC00', linewidth=3, label='magic $N=32$')
# standardized figure parameters
ax3.tick_params(labelsize=16)
ax3.minorticks_off()
ax3.set_ylabel('$S_{2n}$ (MeV)', fontsize=24, fontweight='bold')
ax3.set_xlabel('Neutron Number $N$', fontsize=24, fontweight='bold')
ax3.set_xticks(magic_nrs)
ax3.set_xlim(0,158)
ax3.set_ylim(-7.5, 55)
# inlet parameters
ax3in.set_xlim(76.5, 85.5)
ax3in.set_ylim(4, 16)
ax3in.set_xticks([82])
ax3in.set_yticks([5,10,15])
ax3in.set_xlabel('')
ax3in.tick_params(labelsize=16)
ax3in.text(x=77,y=5,s='$Z=50$',fontweight='bold',fontsize=20)
ax3in.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
handles, labels = ax3.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[-1],handles[-7],handles[-8]]
lg1 = ax3.legend(handles=handles1,loc=2, markerscale=6,fontsize=16, ncol=2, edgecolor='white', facecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
for line in lg1.get_lines(): # increase legend linewidth
line.set_linewidth(3)
ax3in.get_legend().remove()
plt.savefig('s2n.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
q_df = pd.read_csv('bin/q-nndc.csv')
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
from scipy.constants import physical_constants
import warnings
warnings.filterwarnings('ignore')
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro',
it='Linguistics Pro:italic:bold',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, ax_q = plt.subplots(1,1,figsize=(12,6))
ax_qin = ax_q.inset_axes([0.6,0.6,0.4,0.4])
# calculating S2N and uncertainties
nubase_df['s2n'] = 0.0
nubase_df['s2n_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_s2n_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
# plot s2n for experimental values
for z, df_tmp in q_df.groupby(by='z'):
df_tmp.plot(x='n', y='quadrupoleDeformation', ax=ax_q, zorder=1, label='_', lw=0.5,c='k', marker='o', markersize=1.5, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k')
q_df[q_df.z == 60].plot(x='n', y='quadrupoleDeformation', ax=ax_qin, label='_', lw=3, c='#FF2D55', marker='o', markersize=10, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=50)
# inserting lines to display the magic Numbers
for n in magic_nrs:
# ax3.vlines(x=n, ymin=min(magic_s2n_dict[n])-2.5, ymax=max(magic_s2n_dict[n])+2.5,
# color='#00A2FF',linewidth=1.5, zorder=1, label='magic $N$')
ax_q.axvline(x=n, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
# standardized figure parameters
ax_q.tick_params(labelsize=16)
ax_q.minorticks_off()
ax_q.set_ylabel('Quadrupole Deformation $\\beta_2$', fontsize=24, fontweight='bold')
ax_q.set_xlabel('Neutron Number $N$', fontsize=24, fontweight='bold')
ax_q.set_xticks(magic_nrs)
ax_q.set_xlim(0,158)
ax_q.set_ylim(0, 1)
# inlet parameters
# ax_qin.set_xlim(19,29)
# ax_qin.set_ylim(0, 1)
ax_qin.set_xticks([72,82,92])
ax_qin.set_xlabel('')
ax_qin.tick_params(labelsize=16)
ax_qin.text(x=70,y=0.1,s='$Z=60$',fontweight='bold',fontsize=20)
ax_qin.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
# handles, labels = ax_q.get_legend_handles_labels() # allows splitting the legend
# handles1 = [handles[1],handles[-1],handles[-7],handles[-8]]
# lg1 = ax_q.legend(handles=handles1,loc=2, markerscale=6,fontsize=16, ncol=2, edgecolor='white', facecolor='white')
# plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
# for line in lg1.get_lines(): # increase legend linewidth
# line.set_linewidth(3)
ax_q.get_legend().remove()
ax_qin.get_legend().remove()
plt.savefig('quadrupole.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
q_df
n | z | quadrupoleDeformation | |
---|---|---|---|
0 | 4 | 6 | 0.824521 |
1 | 6 | 6 | 0.576601 |
2 | 8 | 6 | 0.359384 |
3 | 12 | 6 | 0.300075 |
4 | 14 | 6 | 0.403011 |
... | ... | ... | ... |
398 | 148 | 96 | 0.337976 |
399 | 150 | 96 | 0.298921 |
400 | 152 | 96 | 0.297126 |
401 | 152 | 98 | 0.299201 |
402 | 154 | 98 | 0.304140 |
403 rows Ć 3 columns
$E_B, S_{\textit{1n}}, S_{\textit{2n}}$¶
%config InlineBackend.figure_format ='retina'
import matplotlib.pyplot as plt
import matplotlib as mpl
from scipy.constants import physical_constants
import warnings
warnings.filterwarnings('ignore')
u = physical_constants['atomic mass constant energy equivalent in MeV'][0]
m_p = physical_constants['proton mass energy equivalent in MeV'][0]
m_n = physical_constants['neutron mass energy equivalent in MeV'][0]
m_e = physical_constants['electron mass energy equivalent in MeV'][0]
# Utopia LaTeX font with greek letters
mpl.rc('font', family='serif', serif='Linguistics Pro')
mpl.rc('text', usetex=False)
mpl.rc('mathtext', fontset='custom',
rm='Linguistics Pro:bold',
it='Linguistics Pro:italic:bold',
bf='Linguistics Pro:bold')
# plotting the different decay modes
f, (ax1, ax2, ax3) = plt.subplots(3,1,figsize=(12,14),sharex=True,
gridspec_kw={'hspace': 0.02})
################################
# E_B
################################
# calculate d3n, d2n
s1n_z82 = []
s2n_z82 = []
# calculating S2N and uncertainties
nubase_df['EB'] = 0.0
nubase_df['EB_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_EB_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
eb_max = []
# plot EB for experimental values
for z,df_z in nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')].groupby('Z'):
df_z.EB = -(df_z.ME_keV/1000 + df_z.A * u - (df_z.N * m_n + df_z.Z * m_p + df_z.Z * m_e))/df_z.A
df_z.EB_unc = df_z.ME_unc_keV/1000
eb_max.append([df_z.EB.idxmax(), df_z.N[df_z.EB.idxmax()], df_z.EB.max()])
# save magic-N-S2N
for n in magic_nrs:
if df_z[(df_z.N == n)&(df_z.extrapol == False)].EB.empty == False:
magic_EB_dict[n].append(df_z[(df_z.N == n)].EB[0])
# plot S2N in black, except for magic-Z -> red
if z in magic_nrs[:3]:
df_z[(df_z.extrapol == False)].plot(x='N', y='EB', yerr='EB_unc', ax=ax1, zorder=50,
label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
ax1.text(x=df_z[(df_z.extrapol == False)].N.max(),
y=df_z[(df_z.extrapol == False)].EB[df_z[(df_z.extrapol == False)].N.idxmax()]-1,
s='$Z$ = {}'.format(z), fontweight='bold', fontsize=16)
elif z in magic_nrs[3:]:
df_z[(df_z.extrapol == False)].plot(x='N', y='EB', yerr='EB_unc', ax=ax1, zorder=50,
label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
ax1.text(x=df_z[(df_z.extrapol == False)].N.max(),
y=df_z[(df_z.extrapol == False)].EB[df_z[(df_z.extrapol == False)].N.idxmax()]+0.5,
s='$Z$ = {}'.format(z), fontweight='bold', fontsize=16)
else:
try:
df_z[(df_z.extrapol == False)&(df_z.Z < 101)].plot(x='N', y='EB', yerr='EB_unc', zorder=1,
ax=ax1, label='_nolegend_', lw=0.5,c='k',
marker='o', markersize=1.5, markerfacecolor='k',
markeredgewidth=0.1, markeredgecolor='k')
except:
pass
eb_max = pd.DataFrame(eb_max, columns=['el','N','EB_max'])
eb_max[eb_max.EB_max == eb_max.EB_max.max()].plot(x='N',y='EB_max', ax=ax1, c='#FFCC00',
marker='*', label='_nolegend_', markersize=20,
markeredgewidth=0.5, markeredgecolor='k')
ax1.text(x=eb_max.N[eb_max.EB_max == eb_max.EB_max.max()]-5,
y=eb_max.EB_max.max()+0.5,
s='$^{62}$Ni', fontweight='bold', fontsize=16)
# inserting lines to display the magic Numbers
for n in magic_nrs:
# ax1.vlines(x=n, ymin=min(magic_EB_dict[n])-1, ymax=max(magic_EB_dict[n])+1,
# color='#00A2FF',linewidth=1.5, zorder=1, label='magic $N$')
ax1.axvline(x=n, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
# standardized figure parameters
ax1.tick_params(labelsize=16)
ax1.minorticks_off()
ax1.set_ylabel('$E_{B} / A$ (MeV)', fontsize=24, fontweight='bold')
################################
# s1n
################################
ax2in = ax2.inset_axes([0.75,0.5,0.25,0.5])
# calculating S1N
nubase_df['s1n'] = 0.0
nubase_df['s1n_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_s1n_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
for z,df_z in nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')].groupby('Z'):
df_z.s1n = df_z.ME_keV.shift(1)/1000 - df_z.ME_keV/1000 + nubase_df.ME_keV['1 n']/1000
df_z.s1n_unc = np.sqrt((df_z.ME_unc_keV.shift(1)/1000).pow(2)
+ (df_z.ME_unc_keV/1000).pow(2)
+ (nubase_df.ME_unc_keV['1 n']/1000)**2)
# save magic-N-S1N
for n in magic_nrs:
if df_z[(df_z.N == n)&(df_z.extrapol == False)].s1n.empty == False:
magic_s1n_dict[n].append(df_z[df_z.N == n].s1n[0])
for n in range (50, 100):
if z == 50:
try:
s1n_z82.append([n, df_z[(df_z.N == n)].s1n[0], df_z[(df_z.N == n)].s1n_unc[0]])
except:
pass
# plot S1N in black, except for magic-Z -> red
if z in magic_nrs:
df_z[(df_z.extrapol == False)].plot(x='N', y='s1n', yerr='s1n_unc', ax=ax2, label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=50)
ax2.text(x=df_z[(df_z.extrapol == False)].N[df_z[(df_z.extrapol == False)].s1n.idxmin()],
y=df_z[(df_z.extrapol == False)].s1n.min()-2,s='$Z$ = {}'.format(z),
fontweight='bold', fontsize=16)
if z == 50:
df_z[(df_z.extrapol == False)].plot(x='N', y='s1n', ax=ax2in, label='magic $Z$', lw=3, c='#FF2D55', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=50)
else:
try:
df_z[(df_z.extrapol == False)&(df_z.Z < 101)].iloc[2:].plot(x='N', y='s1n', ax=ax2, label='_nolegend_', lw=0.5, c='k', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1, markeredgecolor='k', zorder=1)
except:
pass
# inserting lines to display the magic Numbers
for magic in magic_nrs:
ax2.axvline(x=magic, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
# standardized figure parameters
ax2.tick_params(labelsize=16)
ax2.minorticks_off()
ax2.set_ylabel('$S_{\mathit{1}n}$ (MeV)', fontsize=24, fontweight='bold')
ax2.get_legend().remove()
ax2.set_ylim(-4.9, 32)
ax2.set_yticks([0,10,20, 30])
# inlet parameters
ax2in.set_xlim(76.5, 85.5)
ax2in.set_ylim(1.5, 8.5)
ax2in.set_xticks([82])
ax2in.set_yticks([2,5,8])
ax2in.set_xlabel('')
ax2in.tick_params(labelsize=16)
ax2in.text(x=77,y=2,s='$Z=50$',fontweight='bold',fontsize=20)
ax2in.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
ax2in.get_legend().remove()
################################
# s2n
################################
ax3in = ax3.inset_axes([0.75,0.5,0.25,0.5])
# calculating S2N and uncertainties
nubase_df['s2n'] = 0.0
nubase_df['s2n_unc'] = 0.0
magic_nrs = [2, 8, 20, 28, 50, 82, 126]
magic_s2n_dict = {2:[],8:[],20:[],28:[],50:[],82:[],126:[]}
# plot s2n for experimental values
for z,df_z in nubase_df[(nubase_df['Z_+'].astype(str).str[-1] == '0')].groupby('Z'):
df_z.s2n = df_z.ME_keV.shift(2)/1000 - df_z.ME_keV/1000 + nubase_df.ME_keV['1 n']/1000 * 2
df_z.s2n_unc = np.sqrt((df_z.ME_unc_keV.shift(2)/1000).pow(2)
+ (df_z.ME_unc_keV/1000).pow(2)
+ (nubase_df.ME_unc_keV['1 n']/1000 * 2)**2)
# save magic-N-S2N
for n in magic_nrs:
if df_z[(df_z.N == n)&(df_z.extrapol == False)].s2n.empty == False:
magic_s2n_dict[n].append(df_z[(df_z.N == n)].s2n[0])
for n in range (50, 100):
if z == 50:
try:
s2n_z82.append([n, df_z[(df_z.N == n)].s2n[0], df_z[(df_z.N == n)].s2n_unc[0]])
except:
pass
# plot S2N in black, except for magic-Z -> red
if z in magic_nrs:
df_z[(df_z.extrapol == False)].plot(x='N', y='s2n', yerr='s2n_unc', ax=ax3,
label='magic $Z$', lw=2, c='#FF2D55', marker='o',
markersize=1.5, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k', zorder=50)
ax3.text(x=df_z[(df_z.extrapol == False)].N.max()-4.3,
y=df_z[(df_z.extrapol == False)].s2n[df_z[(df_z.extrapol == False)].N.idxmax()]-4,
s='$Z$ = {}'.format(z), fontweight='bold', fontsize=16)
if z == 50:
df_z[(df_z.extrapol == False)].plot(x='N', y='s2n', yerr='s2n_unc', ax=ax3in,
label='magic $Z$', lw=3, c='#FF2D55', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k', zorder=50)
else:
try:
df_z[(df_z.extrapol == False)&(df_z.Z < 101)].plot(x='N', y='s2n', yerr='s2n_unc', zorder=1,
ax=ax3, label='_nolegend_', lw=0.5,c='k',
marker='o', markersize=1.5, markerfacecolor='k',
markeredgewidth=0.1, markeredgecolor='k')
except:
pass
# inserting lines to display the magic Numbers
for n in magic_nrs:
# ax3.vlines(x=n, ymin=min(magic_s2n_dict[n])-2.5, ymax=max(magic_s2n_dict[n])+2.5,
# color='#00A2FF',linewidth=1.5, zorder=1, label='magic $N$')
ax3.axvline(x=n, color='#00A2FF',linestyle='--', linewidth=1, zorder=1, label='magic $N$')
# areas of sudden change and magic N=32
ellipse1 = mpl.patches.Ellipse(xy=(60, 11), width=4, height=8, edgecolor='#61D935',
fc='None', lw=2, label='sudden change')
ellipse2 = mpl.patches.Ellipse(xy=(91, 13), width=4, height=8, edgecolor='#61D935',
fc='None', lw=2)
ax3.add_patch(ellipse1)
ax3.add_patch(ellipse2)
ax3.vlines(x=32, ymin=7, ymax=13, color='#FFCC00', linewidth=3, label='magic $N=32$')
# standardized figure parameters
ax3.tick_params(labelsize=16)
ax3.minorticks_off()
ax3.set_ylabel('$S_{\mathit{2}n}$ (MeV)', fontsize=24, fontweight='bold')
ax3.set_xlabel('Neutron Number', fontsize=24, fontweight='bold')
ax3.set_xticks(magic_nrs)
ax3.set_xlim(0,158)
ax3.set_ylim(-7.5, 55)
# inlet parameters
ax3in.set_xlim(76.5, 85.5)
ax3in.set_ylim(4, 16)
ax3in.set_xticks([82])
ax3in.set_xlabel('')
ax3in.tick_params(labelsize=16)
ax3in.text(x=77,y=5,s='$Z=50$',fontweight='bold',fontsize=20)
ax3in.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
handles, labels = ax3.get_legend_handles_labels() # allows splitting the legend
handles1 = [handles[1],handles[-1],handles[-7],handles[-8]]
lg1 = ax1.legend(handles=handles1,loc=4, markerscale=6,fontsize=16, ncol=1, edgecolor='white', facecolor='white')
plt.setp(lg1.get_title(),fontsize=20,fontweight='bold') # legend title bold
for line in lg1.get_lines(): # increase legend linewidth
line.set_linewidth(3)
ax3.get_legend().remove()
ax3in.get_legend().remove()
f.align_ylabels((ax1,ax2,ax3))
plt.savefig('eb_s1n_s2n.pdf',bbox_inches='tight',pad_inches=0)
plt.show()
f5, ax5 = plt.subplots(1,1,figsize=(4,2)) #d2n
f6, ax6 = plt.subplots(1,1,figsize=(4,2)) #d3n
df_d3n = pd.DataFrame(s1n_z82, columns=['N', 's1n', 's1n_unc'])
df_d2n = pd.DataFrame(s2n_z82, columns=['N', 's2n', 's2n_unc'])
df_d3n['d3n'] = 0.5 * np.power(-1, df_d3n.N+1) * (df_d3n.s1n.shift(-1) - df_d3n.s1n)
df_d3n['d3n_unc'] = 0.5 * np.sqrt((df_d3n.s1n_unc.shift(-1)**2 + df_d3n.s1n_unc)**2)
df_d2n['d2n'] = df_d2n.s2n - df_d2n.s2n.shift(-2)
df_d2n['d2n_unc'] = np.sqrt(df_d2n.s2n_unc**2 + df_d2n.s2n_unc.shift(-2)**2)
df_d2n['Np2'] = df_d2n.N + 2
df_d2n[(df_d2n.N > 74.5) & (df_d2n.N < 84)].plot(x='Np2', y='d2n', yerr='d2n_unc', ax=ax5, lw=3, c='#FF2D55', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k') #[(df_d2n.N > 72) & (df_d2n.N < 82)]
df_d3n[(df_d2n.N > 76.5) & (df_d2n.N < 86)].plot(x='N', y='d3n', yerr='d3n_unc', ax=ax6, lw=3, c='#FF2D55', marker='o',
markersize=10, markerfacecolor='k', markeredgewidth=0.1,
markeredgecolor='k',ecolor='k')
ax5.set_ylim(0.2,1.4)
ax6.set_ylim(0.4,1.4)
ax5.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
ax6.axvline(x=82, color='#00A2FF',linestyle='--', linewidth=2, zorder=1)
ax5.tick_params(labelsize=16)
ax6.tick_params(labelsize=16)
ax5.set_xticks([78,80,82,84])
ax6.set_xticks([78,80,82,84])
ax5.text(x=77,y=1.1,s='$Z=50$',fontweight='bold',fontsize=20)
ax6.text(x=77,y=0.6,s='$Z=50$',fontweight='bold',fontsize=20)
ax5.set_xlabel('$N$',fontweight='bold',fontsize=20)
ax6.set_xlabel('$N$',fontweight='bold',fontsize=20)
ax5.set_ylabel('$\Delta_{2n}$ (MeV)',fontweight='bold',fontsize=20)
ax6.set_ylabel('$\Delta_{3n}$ (MeV)',fontweight='bold',fontsize=20)
ax5.get_legend().remove()
ax6.get_legend().remove()
f5.savefig('d2n.png',bbox_inches='tight',pad_inches=0.1,dpi=300)
f6.savefig('d3n.png',bbox_inches='tight',pad_inches=0.1,dpi=300)
df_d2n
N | s2n | s2n_unc | d2n | d2n_unc | Np2 | |
---|---|---|---|---|---|---|
0 | 50 | NaN | NaN | NaN | NaN | 52 |
1 | 51 | 28.472636 | 0.652993 | 5.550000 | 0.725534 | 53 |
2 | 52 | 23.922636 | 0.260000 | 1.083000 | 0.278632 | 54 |
3 | 53 | 22.922636 | 0.316228 | 0.532000 | 0.331687 | 55 |
4 | 54 | 22.839636 | 0.100180 | 0.970000 | 0.100484 | 56 |
5 | 55 | 22.390636 | 0.100080 | 1.074000 | 0.100285 | 57 |
6 | 56 | 21.869636 | 0.007810 | 1.011000 | 0.010536 | 58 |
7 | 57 | 21.316636 | 0.006403 | 1.056000 | 0.011402 | 59 |
8 | 58 | 20.858636 | 0.007071 | 0.944000 | 0.016462 | 60 |
9 | 59 | 20.260636 | 0.009434 | 0.809000 | 0.013342 | 61 |
10 | 60 | 19.914636 | 0.014866 | 0.958950 | 0.020423 | 62 |
11 | 61 | 19.451636 | 0.009434 | 0.919900 | 0.010796 | 63 |
12 | 62 | 18.955686 | 0.014003 | 0.908365 | 0.014006 | 64 |
13 | 63 | 18.531736 | 0.005250 | 0.683354 | 0.005488 | 65 |
14 | 64 | 18.047321 | 0.000291 | 0.938440 | 0.000309 | 66 |
15 | 65 | 17.848382 | 0.001600 | 1.341892 | 0.001676 | 67 |
16 | 66 | 17.108881 | 0.000104 | 0.839425 | 0.000520 | 68 |
17 | 67 | 16.506490 | 0.000500 | 0.696554 | 0.000995 | 69 |
18 | 68 | 16.269456 | 0.000510 | 0.681920 | 0.001149 | 70 |
19 | 69 | 15.809936 | 0.000860 | 0.535700 | 0.001493 | 71 |
20 | 70 | 15.587536 | 0.001030 | 0.602600 | 0.002762 | 72 |
21 | 71 | 15.274236 | 0.001221 | 0.513500 | 0.002956 | 73 |
22 | 72 | 14.984936 | 0.002563 | 0.550800 | 0.003744 | 74 |
23 | 73 | 14.760736 | 0.002693 | 0.539100 | 0.003897 | 75 |
24 | 74 | 14.434136 | 0.002729 | 0.508000 | 0.011408 | 76 |
25 | 75 | 14.221636 | 0.002818 | 0.502700 | 0.009520 | 77 |
26 | 76 | 13.926136 | 0.011077 | 0.437500 | 0.023826 | 78 |
27 | 77 | 13.718936 | 0.009093 | 0.455300 | 0.021277 | 79 |
28 | 78 | 13.488636 | 0.021095 | 0.574800 | 0.027796 | 80 |
29 | 79 | 13.263636 | 0.019235 | 0.447000 | 0.025981 | 81 |
30 | 80 | 12.913836 | 0.018100 | 0.356800 | 0.018309 | 82 |
31 | 81 | 12.816636 | 0.017464 | 3.065100 | 0.018017 | 83 |
32 | 82 | 12.557036 | 0.002759 | 6.527000 | 0.004540 | 84 |
33 | 83 | 9.751536 | 0.004428 | 3.850800 | 0.005676 | 85 |
34 | 84 | 6.030036 | 0.003606 | 0.151400 | 0.200055 | 86 |
35 | 85 | 5.900736 | 0.003551 | 0.240100 | 0.300036 | 87 |
36 | 86 | 5.878636 | 0.200022 | 0.396000 | 0.489907 | 88 |
37 | 87 | 5.660636 | 0.300015 | 0.358000 | 0.583103 | 89 |
38 | 88 | 5.482636 | 0.447214 | 0.360000 | 0.670820 | 90 |
39 | 89 | 5.302636 | 0.500000 | NaN | NaN | 91 |
40 | 90 | 5.122636 | 0.500000 | NaN | NaN | 92 |