In [205]:
import numpy as np
import matplotlib.pyplot as plt
In [231]:
#sample 1
elements = ['Sodium', 'Potassium', 'Cobalt', 'Bromine', 'Rubidium', 'Antimony',
'Cesium', 'Mercury']
ppm = [980.2, 2588.97, 0.043, 1.4, 2.22, 2.57, 0.21, 0.035]
sys_unc = [428.53, 1325.27, 0.022, 0.45, 1.056, 0.62, 0.061, 0.0043]
stat_unc = [5.66, 98.93, 0.0056, 0.07, 0.058, 0.17, 0.016, 0.0026]
x = np.linspace(1,len(ppm),len(ppm))
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(10,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [1120, 4912, 0.045, 13, 14.7, 1.5, 0.01, 0.314]
#regulatory limits for the elements
limits = [0, 0, 8.48, 0, 23, 0.1, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 1: Swai Basa Fillet from Vietnam')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [232]:
#sample 2
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Arsenic', 'Bromine',
'Rubidium', 'Antimony','Barium', 'Cesium', 'Gold', 'Mercury']
ppm = [64.70, 3780.58, 0.052, 1.63, 1.45, 4.15, 0.14, 0.31, 10.48, 0.212, 0.00075, 0.234]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [28.48, 1935.24, 0.027, 0.18, 0.43, 1.32, 0.068, 0.08, 1.26, 0.057, 0.00014, 0.029]
stat_unc = [2.06, 790.84, 0.0059, 0.19, 0.14, 0.12, 0.014, 0.07, 1.81, 0.038, 0.00009, 0.031]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [1120, 4912, 0.045, 0.142, 0.03, 13, 14.7, 1.5, 14.3, 0.01, 0.0005, 0.5]
#regulatory limits for the elements
limits = [0, 0, 8.48, 11.3, 3.5, 0, 20, 0.1, 14.3, 0, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 2: Hamachi Fillet from JAPAN')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [233]:
#sample 3
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Arsenic', 'Bromine',
'Rubidium', 'Antimony', 'Cesium', 'Mercury']
ppm = [69.16, 2650.95, 0.274, 0.923, 0.62, 2.16, 0.15, 0.0277, 0.032, 0.024]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [30.68, 1357, 0.14, 0.087, 0.19, 0.7, 0.07, 0.01, 0.0094, 0.003]
stat_unc = [2.54, 95.49, 0.031, 0.072, 0.092, 0.07, 0.014, 0.01, 0.0048, 0.0022]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 12345, 0.3, 0.58, 3.5, 13, 15.65, 1.5, 0.01, 0.773]
#regulatory limits for the elements
limits = [0, 0, 8.48, 8, 3.5, 0, 20, 0.1, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Isotope ppm of Sample 3: Cardinal snapper from MEXICO')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [234]:
#sample 4
elements = ['Sodium', 'Potassium', 'Cobalt','Selenium', 'Arsenic', 'Bromine',
'Rubidium', 'Barium', 'Cesium', 'Mercury']
ppm = [164.3, 3322.37, 1.52, 2.10, 0.7, 5.5, 0.144, 25.22, 0.25, 0.22]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [70.72, 1700.69, 0.77, 0.2, 0.21, 1.8, 0.069, 2.03, 0.1, 0.027]
stat_unc = [7.94, 88.56, 0.11, 0.25, 0.081, 0.13, 0.014, 5.3, 0.091, 0.0065]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 1000, 0.3, 0.58, 3.5, 13, 20, 14.3, 0.01, 0.514]
#regulatory limits for the elements
limits = [0, 0, 8.48, 11.3, 3.5, 0, 20, 14.3, 0.0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 4: Shortraker steak from CANADA')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [217]:
#sample 5
elements = ['Sodium', 'Potassium', 'Iron', 'Cobalt','Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Cesium']
ppm = [143.56, 3556.56, 3.58, 0.885, 1.77, 0.83, 4.61, 0.25, 0.06]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [62.91, 1820.56, 1.83, 0.45, 0.17, 0.23, 1.45, 0.12, 0.019]
stat_unc = [1.24, 144.19, 0.55, 0.087, 0.13, 0.08, 0.24, 0.020, 0.006]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 12345, 13.5, 0.3, 0.58, 3.5, 13, 15.65, 0.01]
#regulatory limits for the elements
limits = [0, 0, 1, 8.48, 8, 3.5, 0, 23, 0]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 5: Yellow tail snapper from Brazil')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [218]:
#sample 6
elements = ['Sodium', 'Potassium', 'Iron', 'Cobalt', 'Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Cesium']
ppm = [510.92, 5369.57, 6.48, 0.05, 0.79, 0.64, 2.19, 1.82, 0.25]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [204.54, 2748.11, 3.12, 0.026, 0.07, 0.19, 0.24, 0.87, 0.073]
stat_unc = [154.81, 174.78, 0.73, 0.0058, 0.088, 0.09, 0.21, 0.092, 0.038]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [860, 4912, 13.5, 0.3, 0.58, 3.5, 13, 20, 0.01]
#regulatory limits for the elements
limits = [0, 0, 1, 8.48, 8, 3.5, 0, 23, 0]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 6: Tilapia from TAIWAN')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [235]:
#sample 7
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Bromine',
'Rubidium', 'Gold', 'Mercury']
ppm = [153.35, 2436.11, 0.1, 0.78, 1.46, 0.78, 0.00086, 0.09]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [66.67, 1247, 0.05, 0.077, 0.48, 0.37, 0.00016, 0.011]
stat_unc = [1.03, 96.54, 0.0087, 0.06, 0.06, 0.037, 0.000067, 0.0043]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(10,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 1000, 0.03, 0.237, 13, 20, 0.0005, 0.217]
#regulatory limits for the elements
limits = [0, 0, 8.48, 11.3, 0, 23, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 7: Grass carp steak from TAIWAN')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [236]:
#sample 8
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Cesium', 'Mercury']
ppm = [9384.64, 2360.73, 0.22, 0.39, 2.73, 3.33, 0.114, 0.033, 0.064]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [3168.57, 1208.43, 0.11, 0.04, 0.74, 1.034, 0.054, 0.011, 0.008]
stat_unc = [3237, 163.37, 0.032, 0.024, 0.56, 0.02, 0.011, 0.0045, 0.0048]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 1000, 0.03, 0.237, 0.01, 13, 20, 0.01, 0.271]
#regulatory limits for the elements
limits = [0, 0, 8.48, 11.3, 3.5, 13, 23, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 8: Grass carp steak from TAIWAN')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [237]:
#sample 9
elements = ['Sodium', 'Potassium', 'Scandium', 'Cobalt', 'Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Cesium', 'Gold', 'Mercury']
ppm = [207.54, 2006.06, 0.00055, 0.03, 1.93, 7.04, 7.77, 0.125, 0.085, 0.0025, 0.09]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [91.25, 1026.88, 0.00023, 0.013, 0.18, 2.07, 2.39, 0.059, 0.027, 0.00046, 0.011]
stat_unc = [2.25, 194.5, 0.000073, 0.0029, 0.14, 0.36, 0.47, 0.011, 0.0064, 0.00029, 0.003]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 1000, 0, 0.03, 0.58, 3.5, 13, 20, 0.01, 0.0005, 2.18]
#regulatory limits for the elements
limits = [0, 0, 0, 8.48, 8, 3.5, 0, 23, 0, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 9: Chilean sea bass from KOREA')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [238]:
#sample 10
elements = ['Sodium', 'Potassium', 'Scandium', 'Cobalt', 'Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Antimony', 'Barium', 'Cesium', 'Mercury']
ppm = [50.48, 2164.19, 0.00027, 0.17, 0.34, 0.56, 2.92, 0.11, 0.064, 51.01, 0.091, 0.0085]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [22.26, 1107.83, 0.00011, 0.085, 0.033, 0.17, 0.96, 0.11, 0.017, 7.22, 0.027, 0.001]
stat_unc = [1.0, 181.28, 0.000061, 0.018, 0.021, 0.095, 0.09, 0.019, 0.0084, 7.23, 0.0093, 0.0011]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [1120, 1000, 0, 0.3, 0.58, 3.5, 13, 20, 1.5, 14.3, 0.01, 0.19]
#regulatory limits for the elements
limits = [0, 0, 0, 8.48, 11.3, 3.5, 0, 23, 0.1, 14.3, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 10: Wild isle salmon from SCOTLAND')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [239]:
#sample 11
elements = ['Sodium', 'Potassium', 'Iron', 'Cobalt', 'Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Mercury']
ppm = [110.81, 1736.26, 7.88, 0.19, 1.78, 1.16, 13.22, 0.203, 0.066]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [48.87, 888.78, 3.27, 0.098, 0.16, 0.34, 6.54, 0.11, 0.0097]
stat_unc = [1.07, 112.71, 0.92, 0.012, 0.08, 0.1, 2.22, 0.025, 0.0038]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [860, 1000, 13.5, 0.3, 0.58, 3.5, 13, 15.65, 0.17]
#regulatory limits for the elements
limits = [0, 0, 1, 8.48, 8, 3.5, 0, 23, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 11: Mackerel from INDIA')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [240]:
#sample 12
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Arsenic', 'Bromine',
'Rubidium', 'Antimony', 'Cesium', 'Mercury']
ppm = [85.33, 1652.5, 0.127, 0.56, 2.14, 3.38, 0.084, 0.5736, 0.02, 0.048]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [37.58, 845.9, 0.064, 0.053, 0.64, 1.06, 0.04, 0.25, 0.0057, 0.006]
stat_unc = [1.83, 185.65, 0.017, 0.029, 0.22, 0.13, 0.013, 0.25, 0.0029, 0.0029]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [1120, 4912, 0.3, 0.58, 3.5, 13, 14.7, 1.5, 0.01, 0.314]
#regulatory limits for the elements
limits = [0, 0, 8.48, 8, 3.5, 0, 23, 0.1, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 12: Norwegian basa from NORWAY')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [241]:
#sample 13
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Arsenic', 'Bromine',
'Rubidium', 'Cesium', 'Mercury']
ppm = [95.74, 2103.34, 0.244, 0.42, 1.65, 3.68, 0.25, 0.11, 0.02]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [40.13, 1076.68, 0.12, 0.041, 0.49, 1.16, 0.12, 0.045, 0.0023]
stat_unc = [2.6, 322.2, 0.043, 0.045, 0.21, 0.14, 0.034, 0.024, 0.002]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [860, 11693, 0.3, 0.58, 0.1, 13, 125.2, 0.01, 0.21]
#regulatory limits for the elements
limits = [0, 0, 8.48, 8, 3.5, 13, 23, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 13: Golden pompano from CHINA')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [242]:
#sample 14
elements = ['Sodium', 'Potassium', 'Scandium', 'Cobalt', 'Selenium', 'Arsenic',
'Bromine', 'Rubidium', 'Cesium', 'Mercury']
ppm = [91.89, 1930.47, 0.001, 0.08, 0.96, 0.64, 23.19, 0.22, 0.22, 0.15]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [40.3, 834.62, 0.0007, 0.04, 0.092, 0.19, 6.97, 0.1, 0.067, 0.018]
stat_unc = [1.93, 123.31, 0.00034, 0.012, 0.057, 0.099, 3.75, 0.027, 0.025, 0.0079]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [1120, 1000, 0, 0.3, 0.58, 3.5, 13, 30, 0.01, 2.18]
#regulatory limits for the elements
limits = [0, 0, 0, 8.48, 11.3, 3.5, 0, 23, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 14: Chilean sea bass from the ARTIC')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [243]:
#sample 15
elements = ['Sodium', 'Potassium', 'Scandium', 'Iron', 'Cobalt', 'Selenium',
'Arsenic', 'Bromine', 'Strontium', 'Rubidium', 'Mercury']
ppm = [303.97, 1856.51, 0.0084, 15.57, 1.45, 0.72, 1.19, 61.80, 34.34, 0.31, 0.047]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [133.68, 950.33, 0.00037, 7.78, 0.74, 0.066, 0.37, 19.83, 12.23, 0.15, 0.0058]
stat_unc = [3.37, 136.6, 0.00047, 0.83, 0.038, 0.045, 0.14, 3.45, 1.79, 0.019, 0.0022]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [3000, 1000, 0, 13.5, 0.3, 0.58, 3.5, 13, 8, 20, 0.033]
#regulatory limits for the elements
limits = [0, 0, 0, 1, 8.48, 8, 3.5, 0, 4, 23, 13]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 15: HD shrimp from VENEZUELA')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [244]:
#sample 16
elements = ['Sodium', 'Potassium', 'Cobalt', 'Selenium', 'Bromine',
'Cesium', 'Mercury']
ppm = [176.69, 1473.66, 0.166, 1.51, 5.83, 0.09, 0.75]
x = np.linspace(1,len(ppm),len(ppm))
sys_unc = [80.61, 754.35, 0.084, 0.15, 1.92, 0.024, 0.093]
stat_unc = [4.79, 98.09, 0.022, 0.10, 0.21, 0.013, 0.023]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.25
p1 = ax.bar(x, ppm, width, color='powderblue', label='Element')
#reference values (based on averages)
ppm2 = [860, 1000, 0.3, 0.58, 13, 0.01, 1.205]
#regulatory limits for the elements
limits = [0, 0, 8.48, 11.3, 0, 0, 1]
#reference graph
p2 = ax.bar(x+0.25, ppm2, width, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
#error bars
p3 = plt.errorbar(x, ppm, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
#limits graph
p4 = ax.bar(x-0.25, limits, width, color='lightslategray', edgecolor='k', label='Limit')
plt.xlabel('Element')
plt.ylabel('Concentration in ppm')
plt.title('Element ppm of Sample 16: Pink grouper steak from MEXICO')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [169]:
#Pottery comparison: comparing the calculated grams of isotopes and
#comparing it to the pottery's original grams
#sample 16
elements = ['Sb-121', 'As-75','Ba-130','Br-81','Ce-140','Cs-133','Co-59',
'Fe-58','Cu-63','Ga-71','La-139','K-41','Rb-85','Sc-45',
'Na-23','Sr-84','Hf-180']
grams = [9.97e-7,4.74e-6,3.08e-5,1.33e-6,4.97e-6,9.24e-5,3.00e-4,
2.04e-6, 5.82e-5, 6.06e-6, 5.97e-6, 6.85e-5, 1.52e-6,
5.36e-6, 8.16e-5, 9.55e-7, 2.4e-7]
x = np.linspace(1,len(grams),len(grams))
sys_unc = [2.58e-7,1.2e-6,2.45e-6,1.13e-6,4.1e-7,2.34e-5,1.49e-4,1.5e-8,
9.8e-7, 3.01e-5,2.38e-6,8.7e-7,3.49e-5,1.21e-6,2.22e-6,4.23e-5,
2.25e-7,5.3e-8]
stat_unc = [1.1e-8,4.37e-8,6.07e-8,4.05e-8,5.48e-8,1.06e-6,8.89e-7,8.78e-10,
3.57e-8,9.04e-6, 1.51e-7,3.65e-8,1.66e-6,4.98e-8,1.93e-8,4.27e-7,
2.21e-8,6.13e-9]
tot_unc = []
for i in x:
val = (sys_unc[int(i)-1]**2+stat_unc[int(i)-1]**2)**0.5
tot_unc.append(val)
mpl_fig = plt.figure(figsize=(12,5))
ax = mpl_fig.add_subplot(111)
width = 0.5
p1 = ax.bar(x, grams, width, color='powderblue', label='Element')
#reference values (based on averages)
pot_grams = [1.66e-6,3.08e-5,7.12e-4,2.3e-6,8.03e-5,8.31e-5,1.406e-5,
1.017e-2,6.0e-5,4.44e-5,4.49e-5,1.45e-2,7.0e-5,2.055e-5,
2.61e-3,1.45e-4,6.23e-6]
#reference graph
p2 = ax.bar(x, pot_grams, width=0.35, color='lightsalmon', edgecolor='red', alpha=0.3, label='Reference')
p3 = plt.errorbar(x, grams, yerr=tot_unc, fmt='.', ecolor='steelblue', capthick=1, capsize=2)
plt.xlabel('Isotope')
plt.ylabel('Grams')
plt.title('Detected grams in Pottery sample')
plt.legend()
plt.xticks(x, elements)
ax.set_yscale('log')
plt.show()
In [ ]:
#The reason why some isotopes seem to have a higher amount than the
#starting existing amount is because the pottery was previously irradiated
#therefore the model is predicting more of the pre-existing isotope due to
#the radioactive isotopes created in the first irradiation.
#co-59 can be from the brick contamination