Python library for reading files in Axon Binary Format (ABF)
Project description
pyABF: a pure-Python ABF file reader
pyABF provides a Python interface to electrophysiology files in the Axon Binary Format (ABF). pyABF supports Python versions 3.6 and newer and does not use obscure libraries (just the standard libraries plus numpy and matplotlib). pyABF supports reading of ABF1 and ABF2 files, and can write ABF1 files.
Quickstart
Install or upgrade pyABF:
pip install --upgrade pyabf
Access ABF sweep data:
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 a sweep with Matplotlib:
import pyabf
import matplotlib.pyplot as plt
abf = pyabf.ABF("demo.abf")
abf.setSweep(14)
plt.plot(abf.sweepX, abf.sweepY)
plt.show()
Additional Examples
Full pyabf API documentation, additional code examples, a pyabf cookbook, and low-level information about the ABF file format can be found at the pyABF project homepage: http://swharden.com/pyabf/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyabf-2.3.5.tar.gz
.
File metadata
- Download URL: pyabf-2.3.5.tar.gz
- Upload date:
- Size: 44.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bcfd0c658ed02fa26799aa195a543f502ea7f2e8d17d667a8b0a5550111f3f6 |
|
MD5 | 83c27d5307564a3d90899eb63954fa71 |
|
BLAKE2b-256 | a77b374509559942082234c1064fd916ac5829177448113498c1d5e2a93bed73 |