AttributeError in module pyabf.tools when trying to use Memtest
konung-yaropolk opened this issue · comments
When trying to run Memtest the same way as in the guide, the next error occurs.
A few months ago there aren't any issues when running this code.
abf = pyabf.ABF('file.abf')
memtest = pyabf.tools.memtest.Memtest(abf)
File "/home/lol/abfplot/src/abfplot_core.py", line 215, in membrane_test
memtest = pyabf.tools.memtest.Memtest(abf)
File "/home/lol/.local/lib/python3.9/site-packages/pyabf/tools/memtest.py", line 27, in init
Result = pyabf.tools.sweep.SweepMeasurement
AttributeError: module 'pyabf.tools' has no attribute 'sweep'
I have solved the issue by adding the necessary imports to the memtest.py
A pull request is waiting for you :)
This has been fixed and will be released on pypi shortly. Thanks @konung-yaropolk for pointing it out and creating the PR!
For the record I intend to keep pyabf focused on reading ABF files, and users are highly encouraged to write their own analysis software. The pyabf.tools.memtest
module works but it's not optimized for efficiency or accuracy. I'll update the documentation website to make this more clear.
Users interested in learning more about membrane test calculations are encouraged to check-out Exploring the Membrane Test with a Voltage-Clamped Neuron Model (a blog post I wrote last year that does a deep dive into membrane test calculations)