Spectro-Electrochemistry
Spectro-Electrochemsitry (S-EC) can refer to (i) a broad range of in-situ techniques
hyphenating electrochemistry to some kind of spectrometry (see e.g.
Lozeman et al, 2020
) or (ii) more specifically,
the combination of electrochemistry and visible-light spectroscopy. In ixdat
, we
use the latter meaning.
S-EC data is organized in a SpectroECMeasurement
, which inherits from ECMeasurement
(see Electrochemistry) and uses a SpectrumSeries
(see Spectra)
for managing the 2-D data array formed by the sequential spectra (see Figure).
To this, the class adds delta optical density (dOD
) calculations. Methods
such as calc_dOD
, get_dOD_spectrum
, and track_wavelength
take as
an optional argument a specification of the time/potential/spectrum index to
use as the reference for optical density calculation. If not provided, the
object’s reference_spectrum
is used, which itself can be set by the
set_reference_spectrum
method.
The data structure is the same whether the experiment is done as a slow potential scan with adsorption vs potential in mind, or as a potential jump or release with time-resolved behavior in mind.
Plots of S-EC are made by the SECPlotter. These are either heat plots
(plot_measurement
and plot_vs_potential
) or coplotted cross-sections (plot_waterfall
and plot_wavelengths
). Exporting SEC data results in a master file with
the EC data and any tracked wavelengths and two auxiliary files with (i) the
spectrum series and (ii) the reference spectrum.
A jupyter notebook tutorial for S-EC is available.
Fitting of spectroelectrochemistry data is not yet supported in ixdat
.
The spectroelectrochemistry
module
- class ixdat.techniques.spectroelectrochemistry.ECOpticalMeasurement(reference_spectrum=None, ref_id=None, **kwargs)[source]
Electrochemistry with optical Spectroscopy
This adds, to the SpectroElectrochemistry base class, methods for normalizing to a reference spectrum to get optical density, and for tracking intensity at specific wavelengths.
- calc_dOD(V_ref=None, t_ref=None, index_ref=None)[source]
Calculate the optical density with respect to a reference
Provide at most one of V_ref, t_ref, or index. If none are provided the default reference spectrum (self.reference_spectrum) will be used.
- Parameters
V_ref (float) – The potential at which to get the reference spectrum
t_ref (float) – The time at which to get the reference spectrum
index_ref (int) – The index of the reference spectrum
Return Field: the delta optical density spanning time and wavelength
- default_plotter
alias of
ECOpticalPlotter
- get_dOD_spectrum(V=None, t=None, index=None, V_ref=None, t_ref=None, index_ref=None)[source]
Return the delta optical density Spectrum given a point and reference point.
Provide exactly one of V, t, and index, and at most one of V_ref, t_ref, and index_ref. For V and V_ref to work, the potential in the measurement must be monotonically increasing.
- Parameters
V (float) – The potential at which to get the spectrum.
t (float) – The time at which to get the spectrum
index (int) – The index of the spectrum
V_ref (float) – The potential at which to get the reference spectrum
t_ref (float) – The time at which to get the reference spectrum
index_ref (int) – The index of the reference spectrum
- Returns
The dOD spectrum. The data is (spectrum.x, spectrum.y)
- Return type
- get_spectrum(V=None, t=None, index=None, name=None, interpolate=True)[source]
Return the Spectrum at a given potential V, time t, or index
Exactly one of V, t, and index should be given. If V (t) is out of the range of self.U (self.t), then first or last spectrum will be returned.
- Parameters
V (float) – The potential at which to get the spectrum. Measurement.U must be monotonically increasing for this to work.
t (float) – The time at which to get the spectrum
index (int) – The index of the spectrum
name (str) – Optional. name to give the new spectrum if interpolated
interpolate (bool) – Optional. Set to false to grab closest spectrum rather than interpolating.
Return Spectrum: The spectrum. The data is (spectrum.x, spectrum.y)
- property reference_spectrum
The reference spectrum which will by default be used to calculate dOD
- set_reference_spectrum(spectrum=None, t_ref=None, V_ref=None)[source]
Set the spectrum used as the reference when calculating dOD.
- Parameters
spectrum (Spectrum or str) – If a Spectrum is given, it becomes the reference spectrum. The string “reference” can be given to make the reference spectrum become (via the reference_spectrum property) one that the measurement was loaded with (evt. for definition of wavelengths).
t_ref (float) – The time (with respect to self.tstamp) to use as the reference spectrum
V_ref (float) – The potential to use as the reference spectrum. This will only work if the potential is monotonically increasing.
- track_wavelength(wl, width=10, V_ref=None, t_ref=None, index_ref=None)[source]
Return and cache a ValueSeries for the dOD for a specific wavelength.
- The caching adds wl_str to the SECMeasurement’s data series, where
wl_str = “w” + int(wl) This is dOD. The raw is also added as wl_str + “_raw”.
- So, to get the raw counts for a specific wavelength, call this function and
then use __getitem__, as in: sec_meas[wl_str + “_raw”]
- If V_ref, t_ref, or index_ref are provided, they specify what to reference dOD
to. Otherwise, dOD is referenced to the SECMeasurement’s reference_spectrum.
- Parameters
wl (float) – The wavelength to track in [nm]
width (float) – The width around wl to average. For example, if wl=400 and width = 20, the spectra will be averaged between 390 and 410 nm to get the values. Defaults to 10. To interpolate at the exact wavelength rather than averaging, specify width=0.
V_ref (float) – The potential at which to get the reference spectrum
t_ref (float) – The time at which to get the reference spectrum
index_ref (int) – The index of the reference spectrum
Returns ValueSeries: The dOD value of the spectrum at wl.
- property wavelength
A DataSeries with the wavelengths for the SEC spectra
- property wl
A numpy array with the wavelengths in [nm] for the SEC spectra
- class ixdat.techniques.spectroelectrochemistry.ECXASMeasurement(**kwargs)[source]
Electrochemistry with X-ray Absorption Spectroscopy
- class ixdat.techniques.spectroelectrochemistry.SpectroECMeasurement(**kwargs)[source]
Electrochemistry with spectrometry.
- default_exporter
alias of
SECExporter
- default_plotter
alias of
SECPlotter