Giter Site home page Giter Site logo

ec_ms's Introduction

EC_MS: Electrochemistry plus Mass Spectrometry

EC_MS provides a powerful object-oriented interface to electrochemistry data, mass spectrometry data, and especially the combination of these two types of datasets produced by electrochemistry - mass spectrometry (EC-MS) techniques such as differential electrochemical mass spectrometry (DEMS) and chip-based EC-MS.

EC_MS has grown in concert with the chip EC-MS technology sold by Spectro Inlets, but is especially useful data sets from other hardware and software (see below), as it automates the tedious task of ligning up the datasets in time.

EC_MS will soon be replaced by the in-situ experimental data tool ixdat, which will inherit the interface and EC-MS functionality of EC_MS, but with full documentation, better design, plugability for data from any in-situ technique, and a database interface.

The primary object-oriented interface is the Dataset class. For example:

>>> from EC_MS import Dataset
>>> MS_dataset = Dataset('MS_data.txt', data_type='MS')
>>> EC_dataset = Dataset('EC_data.mpt', data_type='EC')
>>> dataset = MS_dataset + EC_dataset  # calls the function EC_MS.synchronize()
>>> dataset.plot_experiment()          # EC data in lower panel, MS data in upper panel

In this example, the MS and EC datasets are combined by lining up all of the time variables based on timestamps read in the headers of the files.

It is easy to manipulate the datasets based on the electrochemistry program

>>> from EC_MS import CyclicVoltammagram
>>> cv = CyclicVoltammagram(Dataset)
>>> cv.normalize(RE_vs_RHE=0.715)
>>> cv.redefine_cycle(V=0.45, redox=1) # defines when the cycle counter increases
>>> cycle_1 = cv[1]                    # selects one cycle
>>> cycle_1.plot(masses=['M2', 'M44']) # electrochemical potential on the x-axis

And that's just a small teaser. Additional functionality includes:

  • object-oriented interface to mass spectra with the Spectrum and Spectra classes
  • Calibration functions and classes for quantitative data analysis and plotting
  • Thermochemistry and Electrolyte subpackages for calculating standard potentials and chemical equilibrium
  • Mass-transport modelling of products and reactants in the working volume between the electrode and the vacuum inlet
  • ohmic drop correction and automated quantitative comparisons of cyclic voltammagrams

Full documentation will be included from the beginning when EC_MS is replaced by ixdat.

Installation

EC_MS is pip-installable! Just type in your terminal or Anaconda prompt:

$ pip install EC_MS

The in-development version is available on github.

EC_MS requires numpy, scipy, and matplotlib. I recommend using Anaconda python, and writing and running your scripts with spyder. This has proven the easiest to set up on all operating systems I've tried.

Supported Data Types

Mass Spectrometry

  • .tsv files from Spectro Inlets' Zilien (data_type="SI")
  • .dat files (both Bin.dat and Scan.dat) from Pfeiffer Vacuum's PVMassSpec (data_type="PVMS")
  • .txt files from cinfdata. (data_type="MS")
  • .txt files from Stanford Reasearch Systsms' Residual Gas Analyzer (data_type="RGA")
  • .txt files from MKS's Process Eye Professional software (data_type="MKS")

Electrochemistry

  • .tsv files from Spectro Inlets' Zilien (data_type="SI")
  • .mpt files from BioLogic's EC-Lab (data_type="EC")
  • .txt files from CH Instruments software (data_type="CHI")

Full documentation is pending!

If you would like support for another file type, write to me.

References

This python package was first described in:

Daniel B. Trimarco and Soren B. Scott, et al. Enabling real-time detection of electrochemical desorption phenomena with sub-monolayer sensitivity. Electrochimica Acta, 2018.

Its functionality is demonstrated, a bit more up-to-date, in the figures and footnotes of:

Soren B. Scott. Isotope-Labeling Studies in Electrocatalysis for Renewable Energy Conversion and the Net CO2 Impact of this PhD Project. PhD Thesis, 2019..

Other articles with figures and data analysis by EC_MS include:

  • Anna Winiwarter and Luca Silvioli, et al. Towards an Atomistic Understanding of Electrocatalytic Partial Hydrocarbon Oxidation: Propene on Palladium. Energy and Environmental Science, 2019.
  • Claudie Roy, Bela Sebok, Soren B. Scott, et al. Impact of nanoparticle size and lattice oxygen on water oxidation on NiFeOxHy. Nature Catalysis, 2018.

Project Information

EC_MS is poorly documented and, despite my best efforts, can still be a bit buggy.

Please log issues and suggest features on github to help me improve it.

Major imporovements will most likely not come in EC_MS, but instead in its successor ixdat. Feedback is still highly appreciated, so we can get things right from the start in ixdat.

EC_MS is completely free and open-source.

If you have questions or if you'd like to contribute, please contact me.

ec_ms's People

Contributors

scottsoren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ec_ms's Issues

Import problems from cinfdata txt-file

When using text_to_data(text, data_type="MS") to import downloaded txt files from cinfdata into Dataset objects, the values get stored as lists instead of numpy arrays. This leads to several upstream errors when plotting/manipulating MS data.

sort_time

when using sort_time on a dataset.data from multiple files, it tries to look for the timecol of the filenumber datacol and fails

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.