Python library for reading files in Axon Binary Format (ABF)
Project description
Project Homepage: https://github.com/swharden/pyABF
pyABF Cookbook: Getting Started
pyABF Cookbook: Advanced Interactions with ABF Objects
Quickstart
Display ABF Information:
import pyabf
abf=pyabf.ABF("filename.abf")
abf.info()
Access ABF Sweep Data:
import pyabf
abf=pyabf.ABF("filename.abf")
abf.setSweep(7)
print(abf.dataY, abf.units)
print(abf.dataC, abf.unitsCommand)
print(abf.dataX, abf.unitsTime)
Output:
[-47.729 -47.729 -47.76 ..., -42.542 -42.542 -42.572] mV
[ 0. 0. 0. ..., 0. 0. 0.] pA
[ 0. 0. 0. ..., 3. 3. 3.] seconds
Plot all sweeps with matplotlib:
import pyabf
import matplotlib.pyplot as plt
abf=pyabf.ABF("filename.abf")
for sweepNumber in abf.sweepList:
abf.setSweep(sweepNumber)
plt.plot(abf.dataX,abf.dataY)
plt.ylabel(abf.unitsLong)
plt.xlabel(abf.unitsTimeLong)
plt.margins(0,.1)
plt.show()
Output:
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: https://github.com/swharden/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
pyabf-0.1.14.tar.gz
(20.1 kB
view details)
File details
Details for the file pyabf-0.1.14.tar.gz
.
File metadata
- Download URL: pyabf-0.1.14.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 494f6db951bd9aa14a94263cd58940f23a36b8d79ae3b0b5436b3b6e07c7f1da |
|
MD5 | 53d714534aaef9ff85f1927e3265e707 |
|
BLAKE2b-256 | 66c236406fc75400558809d60c892b5deeb95cc8d3e77aac8202c0676d33f49f |