Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Package for parsing the contents of Gamry EXPLAIN data (DTA) files.

Project description


PyPI PyPI - Python Version PyPI - License

Python package for parsing the contents of Gamry EXPLAIN data (DTA) files. This package is meant to convert flat-file EXPLAIN data into pandas DataFrames for easy analysis and visualization.

Getting Started


  • pandas


Package from PyPi

$ pip install gamry-parser

Local Installation

  1. Check out the latest code:
$ git clone
  1. Use setuptools to install the package
$ python install


The provided Usage example loads a CV DTA file two ways, and demonstrates the utility of custom functions within the CyclicVoltammetry subclass (get_v_range, get_scan_rate)

$ python

GamryParser Example

The following snippet loads a DTA file and prints to screen: (1) experiment type, (2) # of curves, and (3) a random curve in the form of a pandas DataFrame.

import gamry_parser as parser
import random

file = '/enter/the/file/path.dta'
gp = parser.GamryParser()

print("experiment type: {}".format(gp.get_experiment_type()))
print("loaded curves: {}".format(gp.get_curve_count()))

curve_index = random.randint(1,gp.get_curve_count())
print("showing curve #{}".format(curve_index))

ChronoAmperometry Example

The ChronoAmperometry class is a subclass of GamryParser. Executing the method get_curve_data() will return a DataFrame with three columns: (1) T, (2) Vf, and (3) Im

In the example, the file is expected to be a simple chronoamperometry experiment (single step, no preconditioning); there will only be a single curve of data contained within the file. In addition, note the use of the to_timestamp property, which allows the user to request get_curve_data to return a DataFrame with a T column containing DateTime objects (as opposed to the default: float seconds since start).

import gamry_parser as parser
import random

file = '/enter/the/file/path.dta'
ca = parser.ChronoAmperometry(to_timestamp=True)


ipython notebook demonstration scripts are included in the demo folder.

  • notebook_gamry_parser.ipynb: Simple example loading data from ChronoA experiment output. Instead of gamry_parser.GamryParser(), the parser could be instantiated with gamry_parser.ChronoAmperometry()
  • notebook_cyclicvoltammetry.ipynb: Example loading data from a CV (cyclic voltammetry) experiment output. Uses the gamry_parser.CyclicVoltammetry() subclass.

Additional Examples

Similar procedure should be followed for using the gamry_parser.CyclicVoltammetry(), gamry_parser.Impedance(), gamry_parser.OpenCircuitPotential(), and gamry_parser.VFP600() parser subclasses. Take a look at and in tests/ for some additional usage examples.


Project Tree

  ├── gamry_parser              # source files
  │   ├── ...          
  │   ├──            # ChronoAmperometry() experiment parser
  │   ├──                 # CyclicVoltammetry() experiment parser
  │   ├──             # Impedance() experiment parser
  |   ├──        # GamryParser: generic DTA file parser
  │   ├──                # OpenCircuitPotential() experiment parser
  |   └──             # VFP600() parses experiment data generated by the Gamry VFP600 LabView Frontend. 
  ├── tests                     # unit tests and test data
  |   └── ...
  ├──                  # setuptools configuration
  └── ...                


Documentation! Loading of data is straightforward, and hopefully the examples provided in this README provide enough context for any of the subclasses to be used/extended.

In the future, it would be nice to add support for things like equivalent circuit modeling, though at the moment there are other projects focused specifically on building out models and fitting EIS data (e.g. kbknudsen/PyEIS, ECSHackWeek/




Tests extending unittest.TestCase may be found in /tests/.

$ python test
$ coverage run --source=gamry_parser/ test
$ coverage report -m

Latest output:

$ coverage report -m
Name                          Stmts   Miss  Cover   Missing
gamry_parser/          7      0   100%
gamry_parser/          23      0   100%
gamry_parser/               17      0   100%
gamry_parser/            6      0   100%
gamry_parser/     145      3    98%   131, 234-235
gamry_parser/              32      0   100%
gamry_parser/           1      0   100%
gamry_parser/           35      0   100%
TOTAL                           266      3    99%

Code Guidelines

  • PEP8 via pylint or flake8
  • GitHub flow for proposing changes (i.e. create a feature branch and submit a PR against the master branch).
  • Tests: Maintain > 80% line coverage, per file


SemVer for versioning.

  1. Matching major version numbers are guaranteed to work together.
  2. Any change to the public API (breaking change) will increase a major version.


Use setuptools to build, twine to publish to pypi.

$ rm -rf dist
$ python build
$ python sdist bdist_wheel
$ twine upload dist/*


This project is licensed under the MIT License - see the LICENSE file for details

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gamry-parser, version 0.4.3
Filename, size File type Python version Upload date Hashes
Filename, size gamry_parser-0.4.3-py3-none-any.whl (16.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size gamry_parser-0.4.3.tar.gz (12.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page