In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit # import the curve fitting function
import pandas as pd
%matplotlib inline
In [2]:
Argon = pd.read_table('Ar.txt',delimiter=', ',engine='python', header=None)
Amu = Argon[0] #These are the values of amu that the mass spec searches for
Argon = np.array([entry[:-1] for entry in Argon[1]],dtype='float')*1e6
In [10]:
plt.figure(figsize=(9,4))
plt.scatter(Amu, Argon);
ax = plt.gca()
#ax.set_yscale('log')
plt.xlim(12,45);
plt.ylim(0,4)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.savefig('RawArgon.png')
In [4]:
Arbkd = pd.read_table('Background_Ar.txt',delimiter=', ',engine='python', header=None)
Arbkd = np.array([entry[:-1] for entry in Arbkd[1]],dtype='float')*1e6
In [11]:
plt.figure(figsize=(9,4))
plt.scatter(Amu, Argon - Arbkd);
ax = plt.gca()
#ax.set_yscale('log')
plt.xlim(12,45);
plt.ylim(0,4)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.savefig('TrueArgon.png')
Upon close inspection, background substraction has removed a single peak near 19 amu.
In [12]:
Krypton = pd.read_table('Kr.txt',delimiter=', ',engine='python', header=None)
Krypton = np.array([entry[:-1] for entry in Krypton[1]],dtype='float')*1e6
Krbkd = pd.read_table('Background_Kr.txt',delimiter=', ',engine='python', header=None)
Krbkd = np.array([entry[:-1] for entry in Krbkd[1]],dtype='float')*1e6
In [20]:
plt.figure(figsize=(9,4))
plt.scatter(Amu, Krypton - Krbkd);
ax = plt.gca()
plt.xlim(12,45);
plt.ylim(0,6)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.savefig('Krypton.png')
Here, and for all subsequent measurements on this day, there is a slight peak at 40 amu, which is to be some residual from the Argon test.
In [29]:
Neon = pd.read_table('Ne.txt',delimiter=', ',engine='python', header=None)
Neon = np.array([entry[:-1] for entry in Neon[1]],dtype='float')*1e6
Nebkd = pd.read_table('Background_Ne.txt',delimiter=', ',engine='python', header=None)
Nebkd = np.array([entry[:-1] for entry in Nebkd[1]],dtype='float')*1e6
plt.figure(figsize=(9,4))
plt.scatter(Amu, Neon - Nebkd);
ax = plt.gca()
plt.xlim(12,35);
plt.ylim(0,3.2)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.savefig('Neon.png')
In [30]:
Air = pd.read_table('Air.txt',delimiter=', ',engine='python', header=None)
Air = np.array([entry[:-1] for entry in Air[1]],dtype='float')*1e6
plt.figure(figsize=(9,4))
plt.scatter(Amu, Air - Nebkd);
ax = plt.gca()
plt.xlim(12,35);
plt.ylim(0,3.2)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.savefig('Air.png')
In [50]:
Quick = pd.read_table('QuickExhale.txt',delimiter=', ',engine='python', header=None)
Quick = np.array([entry[:-1] for entry in Quick[1]],dtype='float')*1e6
Quickbkd = pd.read_table('Background_Breath.txt',delimiter=', ',engine='python', header=None)
Quickbkd = np.array([entry[:-1] for entry in Quickbkd[1]],dtype='float')*1e6
Hold = pd.read_table('HoldBreath30s.txt',delimiter=', ',engine='python', header=None)
Hold = np.array([entry[:-1] for entry in Hold[1]],dtype='float')*1e6
plt.figure(figsize=(9,4))
plt.scatter(Amu, Quick - Quickbkd,color='blue',label='Quick Exhale');
plt.scatter(Amu, Hold - Quickbkd,color='red',label = 'Hold Breath');
ax = plt.gca()
plt.xlim(12,35);
plt.ylim(0,8.5)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.legend(loc='upper left')
plt.savefig('Breath.png')
In [53]:
Can1 = pd.read_table('CompressedAir_Tetrafluoroethane.txt',delimiter=', ',engine='python', header=None)
Can1 = np.array([entry[:-1] for entry in Can1[1]],dtype='float')*1e6
Can2 = pd.read_table('CompressedAir_Difluoroethane.txt',delimiter=', ',engine='python', header=None)
Can2 = np.array([entry[:-1] for entry in Can2[1]],dtype='float')*1e6
plt.figure(figsize=(9,4))
plt.scatter(Amu, Can1 - Quickbkd,color='blue',label='Tetrafluoroethane');
plt.scatter(Amu, Can2 - Quickbkd,color='red',label = 'Difluoroethane');
ax = plt.gca()
plt.xlim(10,65);
plt.ylim(0,8.5)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.legend(loc='upper right')
plt.savefig('CompressedAir.png')
In [56]:
Volcano = pd.read_table('Volcano.txt',delimiter=', ',engine='python', header=None)
Volcano = np.array([entry[:-1] for entry in Volcano[1]],dtype='float')*1e6
VolcanoBackground = pd.read_table('VolcanoBackground.txt',delimiter=', ',engine='python', header=None)
VolcanoBackground = np.array([entry[:-1] for entry in VolcanoBackground[1]],dtype='float')*1e6
plt.figure(figsize=(9,4))
plt.scatter(Amu, Volcano - VolcanoBackground);
ax = plt.gca()
plt.xlim(10,35);
plt.ylim(0,8.5)
plt.xlabel('Particle Mass [Amu]',size=18);
plt.ylabel('Pressure [Torr]$\cdot 10^{-6}$',size=18);
plt.xticks(size = 11);
plt.yticks(size = 11);
plt.savefig('Volcano.png')
In [ ]: