Electrochemistry - Mass Spectrometry (EC-MS)

The main class for EC-MS data is the ECMSMeasurement.

It comes with the EC-MS plotter which makes EC-MS plots like this one:

Other than that it doesn’t have much but inherits from both ECMeasurement and MSMeasurement. An ECMSMeasurement can be created either by adding an ECMeasurement and an MSMeasurement using the + operator, or by directly importing data using an EC-MS reader such as “zilien”.

ECMSCyclicVoltammogram adds to ECMSMeasurement the tools for selecting and analyzing data based on an electrochemical cyclic voltammatry program that are implemented in CyclicVoltammogram (see The cv module).

is implemented in the deconvolution module, in a class inheriting from ECMSMeasurement.

ixdat has all the functionality and more for EC-MS data and analysis as the legacy EC_MS package. This includes the tools behind the EC-MS analysis and visualization in the puplications:

ixdat is used for the following EC-MS articles:

The ec_ms module

Source: https://github.com/ixdat/ixdat/tree/user_ready/src/ixdat/techniques/ec_ms.py

Module for representation and analysis of EC-MS measurements

class ixdat.techniques.ec_ms.ECMSCalibration(name=None, date=None, setup=None, ms_cal_results=None, RE_vs_RHE=None, A_el=None, L=None)[source]

Class for calibrations useful for ECMSMeasurements

FIXME: A class in a technique module shouldn’t inherit directly from Saveable. We
need to generalize calibration somehow. Also, ECMSCalibration should inherit from or otherwise use a class MSCalibration
as_dict()[source]

Have to dict the MSCalResults to get serializable as_dict (see Saveable)

export(path_to_file=None)[source]

Export an ECMSCalibration as a json-formatted text file

classmethod from_dict(obj_as_dict)[source]

Unpack the MSCalResults when initiating from a dict

get_F(mol, mass)[source]

Return the sensitivity factor for mol at mass

get_mass_and_F(mol)[source]

Return the mass and sensitivity factor to use for simple quant. of mol

classmethod read(path_to_file)[source]

Read an ECMSCalibration from a json-formatted text file

scaled_to(ms_cal_result)[source]

Return a new calibration w scaled sensitivity factors to match one given

class ixdat.techniques.ec_ms.ECMSCyclicVoltammogram(*args, **kwargs)[source]

Class for raw EC-MS functionality. Parents: CyclicVoltammogram, ECMSMeasurement

class ixdat.techniques.ec_ms.ECMSMeasurement(**kwargs)[source]

Class for raw EC-MS functionality. Parents: ECMeasurement and MSMeasurement

as_cv()[source]

Convert self to a CyclicVoltammogram

as_dict()[source]

Return dict: serialization of the object main and auxiliary tables

ec_plotter

The default plotter for ECMSMeasurement is ECMSPlotter

ecms_calibration(mol, mass, n_el, tspan, tspan_bg=None)[source]

Calibrate for mol and mass based on one period of steady electrolysis

Parameters:
  • mol (str) – Name of the molecule to calibrate
  • mass (str) – Name of the mass at which to calibrate
  • n_el (str) – Number of electrons passed per molecule produced (remember the sign! e.g. +4 for O2 by OER and -2 for H2 by HER)
  • tspan (tspan) – The timespan of steady electrolysis
  • tspan_bg (tspan) – The time to use as a background

Return MSCalResult: The result of the calibration

ecms_calibration_curve(mol, mass, n_el, tspan_list=None, tspan_bg=None, ax='new', axes_measurement=None)[source]

Fit mol’s sensitivity at mass based on steady periods of EC production

Parameters:
  • mol (str) – Name of the molecule to calibrate
  • mass (str) – Name of the mass at which to calibrate
  • n_el (str) – Number of electrons passed per molecule produced (remember the sign! e.g. +4 for O2 by OER and -2 for H2 by HER)
  • tspan_list (list of tspan) – THe timespans of steady electrolysis
  • tspan_bg (tspan) – The time to use as a background
  • ax (Axis) – The axis on which to plot the calibration curve result. Defaults to a new axis.
  • axes_measurement (list of Axes) – The EC-MS plot axes to highlight the calibration on. Defaults to None.
Return MSCalResult(, Axis(, Axis)): The result of the calibration
(and requested axes)
exporter

The default plotter for ECMSMeasurement is ECMSExporter

classmethod from_dict(obj_as_dict)[source]

Unpack the ECMSCalibration when initiating from a dict

ms_plotter

The default plotter for ECMSMeasurement is ECMSPlotter

plotter

The default plotter for ECMSMeasurement is ECMSPlotter

The deconvolution module

Source: https://github.com/ixdat/ixdat/tree/user_ready/src/ixdat/techniques/deconvolution.py

Module for deconvolution of mass transport effects.

class ixdat.techniques.deconvolution.DecoMeasurement(**kwargs)[source]

Class implementing deconvolution of EC-MS data

extract_kernel(signal_name, cutoff_pot=0, tspan=None, tspan_bg=None)[source]

Extracts a Kernel object from a measurement.

Parameters:
  • signal_name (str) – Signal name from which the kernel/impule response is to be extracted.
  • cutoff_pot (int) – Potential which the defines the onset of the impulse. Must be larger than the resting potential before the impulse.
  • tspan (list) – Timespan from which the kernel/impulse response is extracted.
  • tspan_bg (list) – Timespan that corresponds to the background signal.
grab_partial_current(signal_name, kernel_obj, tspan=None, tspan_bg=None, snr=10)[source]

Return the deconvoluted partial current for a given signal

Parameters:
  • signal_name (str) – Name of signal for which deconvolution is to be carried out.
  • kernel_obj (Kernel) – Kernel object which contains the mass transport parameters
  • tspan (list) – Timespan for which the partial current is returned.
  • tspan_bg (list) – Timespan that corresponds to the background signal.
  • snr (int) – signal-to-noise ratio used for Wiener deconvolution.
class ixdat.techniques.deconvolution.Kernel(parameters={}, MS_data=None, EC_data=None)[source]

Kernel class implementing datatreatment of kernel/impulse response data.

calculate_kernel(dt=0.1, duration=100, norm=True, matrix=False)[source]

Calculates a kernel/impulse response.

Parameters:
  • dt (int) – Timestep for which the kernel/impulse response is calculated. Has to match the timestep of the measured data for deconvolution.
  • duration (int) – Duration in seconds for which the kernel/impulse response is calculated. Must be long enough to reach zero.
  • norm (bool) – If true the kernel/impulse response is normalized to its area.
  • matrix (bool) – If true the circulant matrix constructed from the kernel/ impulse reponse is returned.
charge

Integrates the measured current over the time.

plot(dt=0.1, duration=100, ax=None, norm=True, **kwargs)[source]

Returns a plot of the kernel/impulse response.

sig_area

Integrates a measured impulse response and returns the area.