plt.close("all") if True: plt.rc("text", usetex=True) plt.rc("font", family="sans-serif") plt.rc("text", fontsize=8) plt.rc("lines", linewidth=0.5) fontsize = 8 figwidth = 3.25 # half of a two-column figure figheight = 2.75 from EC_MS import Dataset, CyclicVoltammagram, load_calibration_results mdict = load_calibration_results( "20A25_calibration_results.pkl" ) # 20A25 calibration is more trustworthy than 20A31! CO2_M44, CO2_M46, CO2_M48 = mdict["CO2_M44"], mdict["CO2_M46"], mdict["CO2_M48"] O2_M32, O2_M34, O2_M36 = mdict["O2_M32"], mdict["O2_M34"], mdict["O2_M36"] H2, CO, He = mdict["H2"], mdict["CO"], mdict["He"] H2.F_cal = 2 # what it god damn should be. More accurate than that measured in calibration.py because of the tilt. H2.cal_mat = { "M2": 1 / H2.F_cal, "M4": -0.0007 / H2.F_cal, } # gets rid of the background due to He double-ionization # r = 0.0040 dataset = Dataset("./pickles/20A31_18O_01.pkl")
from EC_MS import download_cinfdata_set, plot_signal, plot_signal_vs_temperature, compare_signal_to_temperature from EC_MS import load_calibration_results from EC_MS import plot_flux plt.close('all') data = download_cinfdata_set(setup='microreactorNG', time='2019-06-25 09:52:30') #plot_signal(data, leg=True, meta_data=['TC temperature'], rh_label='Temperature [C]') #plot_signal_vs_temperature(data, leg=True, reciprocal=True) compare_signal_to_temperature(MS_data=data) plt.show() exit() mdict = load_calibration_results('19F04_calibration.pkl') O2, CO2, CO, Ar = mdict['O2'], mdict['CO2'], mdict['CO'], mdict['Ar'] if True: # take background from CO2 cracking into account when calculating CO flux # NOTE below on why cal_mat is used exactly this way. CO.cal_mat = {'M28': 1 / CO.F_cal} CO.cal_mat[ 'M44'] = -CO.cal_mat['M28'] * CO2.spectrum['M28'] / CO2.spectrum['M44'] #plot_flux(data, mols=[O2, CO2, CO, Ar], unit='pmol/s') CO2.get_bg(data, tspan=[0, 100]) tspan = [11000, 14000] x, y = CO2.get_flux(data, tspan=tspan, background='preset', unit='pmol/s')
plt.rc("text", usetex=True) plt.rc("font", family="sans-serif") plt.rc("font", size=8) plt.rc("lines", linewidth=0.5) fontsize = 8 figwidth = 3.25 # half of a two-column figure figheight = 2.75 from EC_MS import plot_vs_potential, plot_experiment, sync_metadata, cut_dataset from EC_MS import load_calibration_results, point_calibration, correct_shunt from EC_MS import get_signal plt.close("all") mdict = load_calibration_results("20A31_calibration_results.pkl") CO2_M44, CO2_M46, CO2_M48 = mdict["CO2_M44"], mdict["CO2_M46"], mdict["CO2_M48"] H2, CO, He = mdict["H2"], mdict["CO"], mdict["He"] H2.F_cal = 2 # what it god damn should be. More accurate than that measured in calibration.py because of the tilt. H2.cal_mat = { "M2": 1 / H2.F_cal, "M4": -0.0007 / H2.F_cal, } # gets rid of the background due to He double-ionization with open("./pickles/20A31_18O_01.pkl", "rb") as f: data = pickle.load(f) V_str, J_str = sync_metadata( data, RE_vs_RHE=0.715, A_el=0.196 # *1e-3, J_str='J / [$\mu$A cm$^{-1}$]' ) t_str = "time/s"
""" Created on Thu Jun 6 12:52:13 2019 @author: scott """ from matplotlib import pyplot as plt from EC_MS import download_cinfdata_set, plot_signal from EC_MS import chip_calibration, point_calibration, recalibrate from EC_MS import load_calibration_results, save_calibration_results plt.close('all') mdict = load_calibration_results('19B22_calibration.pkl') O2 = mdict['O2'] data = download_cinfdata_set(setup='microreactorNG', time='2019-06-04 17:29:26') plot_signal(data, leg=True) chip = chip_calibration(data, mol=O2, gas='O2', composition=1, chip='microreactor', tspan=[8200, 8350]) chip.save('MR12') print('\nAir flux through the chip in mol/s: ' + str(chip.capillary_flow(gas='air') / 6.02e23))