from matplotlib import pyplot as plt

from ixdat import Measurement

plt.close("all")

if False:
    data_dir = Path.home() / (
        "Dropbox/ixdat_resources/20B12_Data_Analysis_Workshop/example data set/"
    )

    ocp_file = data_dir / "01_Trimi1_cont_02_OCV_C01.mpt"
    cv_file = data_dir / "01_Trimi1_cont_03_CVA_C01.mpt"
    cp_file = data_dir / "01_Trimi1_cont_04_CP_C01.mpt"

    ocp_meas = Measurement.read(ocp_file, reader="biologic", name="Pt_demo_ocp")
    print("read ocp file!")
    cv_meas = Measurement.read(cv_file, reader="biologic", name="Pt_demo_cv")
    print("read cv file!")
    cp_meas = Measurement.read(cp_file, reader="biologic", name="Pt_demo_cp")
    print("read cp file!")

    ocp_id = ocp_meas.save()
    cv_id = cv_meas.save()
    cp_id = cp_meas.save()
else:
    ocp_meas = Measurement.get(7)
    cv_meas = Measurement.get(8)
    cp_meas = Measurement.get(9)

combined_meas = ocp_meas + cv_meas + cp_meas
示例#2
0
from ixdat import Measurement

meas_A = Measurement.read("../data/04_Pt18Ox.pkl", reader="EC_MS")
axes_A = meas_A.plot_measurement(tspan=[0, 2000])

meas_B = Measurement.read("../data/05_Pt16Ox_in_18O_electrolyte.pkl",
                          reader="EC_MS")
axes_B = meas_B.plot_measurement(tspan=[200, 2200])
from ixdat import Measurement

meas = Measurement.read("../data/02_Pt_in_18O_electrolyte_35C.pkl",
                        reader="EC_MS")

meas.tstamp += 12250
axes_a = meas.plot_measurement(tspan=[0, 7500])
示例#4
0
electrode area here, but not in the publication. They are also slightly different
than in the publication. I think this was a mistake in the publication,
that I had used a different, less accurate, calibration. The mistake did not affect the
conclusions of the publication.
"""

from ixdat import Measurement
from ixdat.techniques.ec_ms import ECMSCalibration

# ---------- load calibration and data, find data selections -------------------- #

calibration = ECMSCalibration.read(
    "../paper_I_fig_S1/Scott2021a_ElectrocmimActa_calibration.ix")

meas = Measurement.read("../data/03_Ir_in_18O_electrolyte.pkl",
                        reader="EC_MS",
                        calibration=calibration)
if False:  # plot the whole raw data to get an overview
    meas.plot_measurement()

meas.set_bg(  # define background just once for the whole script:
    tspan_bg=[4600, 4620],
    mass_list=["M2", "M32", "M34", "M36", "M44", "M46", "M48"],
)

tspan_CO_ox = [5680, 6300]
tspan_CO_strip = [4450, 5200]

if False:  # plot raw data
    for tspan in [tspan_CO_ox, tspan_CO_strip]:
        meas.plot_measurement(tspan=tspan)
from ixdat import Measurement

meas_1 = Measurement.read("../data/07_Ir18Ox_1.pkl", reader="EC_MS")

axes_1 = meas_1.plot_measurement()

meas_2 = Measurement.read("../data/08_Ir18Ox_2.pkl", reader="EC_MS")

axes_2 = meas_2.plot_measurement()
示例#6
0
internal calibration. This is because this measurement was taken one week before the
calibration file, and MS sensitivity drifts. This is considered normal.

More concerning is the fact that the measured M34/M32 ratio after the sample should have
been reductively de-labeled seems a bit high compared to the nominal 0.0040, even though
the M46/M44 ratio immediately  seems right on. This is unexplained.
The nominal 0.0040 is used.
"""

import numpy as np
from ixdat import Measurement
from ixdat.techniques.ec_ms import ECMSCalibration
from ixdat.plotters.ms_plotter import STANDARD_COLORS

# -------- load and select the data ---------- #
meas_full = Measurement.read("../data/04_Pt18Ox.pkl", reader="EC_MS")
meas = meas_full.cut(tspan=[100, 1900], t_zero="start")

# ------- fig 1a is a simple plot of the raw data. This is a one-liner in ixdat. -----
axes_a = meas.plot_measurement()
# and, to save it:
fig_a = axes_a[0].get_figure()
fig_a.savefig("paper_II_fig_1a.png")

# ------ fig 1b is an isotope experiment plot, with calibrated data on two axes ------ #

# First, we load, attach, and correct the calibration
calibration = ECMSCalibration.read(
    "../paper_I_fig_S1/Scott2021a_ElectrocmimActa_calibration.ix")
tspan_natural = [5000, 5200]  # steady OER from de-labeled catalyst
# tspan_bg = [3850, 3900]  # just before that OER period, signals at background level
from ixdat import Measurement

meas = Measurement.read("../data/06_Ir18O2.pkl", reader="EC_MS")

meas.plot_measurement(tspan=[000, 7500])
from ixdat import Measurement

meas = Measurement.read("../data/09_Ir18Ox_yH2O.pkl", reader="EC_MS")

meas.plot_measurement()