A simple Python interface for ABF files

pyABF

pyABF is a Python package which simplifies the process of reading electrophysiology data from Axon Binary Format (ABF) files. It was created with the goal of providing a Pythonic API to access the content of ABF files which is so intuitive to use (with a predictive IDE) that documentation is largely unnecessary. Flip through the quickstart tutorial and you'll be analyzing and graphing ABFs in minutes!

Installation

pyABF supports Python 3.6+ and is available on PyPi:

pip install --upgrade pyabf

Quickstart

import pyabf
abf = pyabf.ABF("demo.abf")
abf.setSweep(sweepNumber: 3, channel: 0)
print(abf.sweepY) # displays sweep data (ADC)
print(abf.sweepX) # displays sweep times (seconds)
print(abf.sweepC) # displays command waveform (DAC)

Plot Sweeps with Matplotlib

import matplotlib.pyplot as plt
import pyabf
abf = pyabf.ABF("demo.abf")
abf.setSweep(14)
plt.plot(abf.sweepX, abf.sweepY)
plt.show()

Tutorial

Features

Citing pyABF

If the pyABF module facilitated your research, consider citing this project by name so it can benefit others too:

"Analysis of electrophysiological recordings was performed with custom software written for this project using Python 3.7 and the pyABF moduleĀ¹."

[1] Harden, SW (2020). pyABF 2.2.3. [Online]. Available: https://pypi.org/project/pyabf/, Accessed on: Sep. 24, 2019.

Author

pyABF was created by Scott W Harden (Harden Technologies, LLC) with many contributions from the open-source community