-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect recording length for 2.0.0.0 gap-free files #139
Comments
This comment was marked as outdated.
This comment was marked as outdated.
SolutionI want to highlight your solution for others who may land here after searching for this issue:
self.sweepIntervalSec = self.sweepLengthSec
ABFs can be configured with an inter-sweep interval that is different from the sweep length. E.g., "record a 5 second sweep once every 30 seconds". I assume this is why the header has separate |
This comment was marked as outdated.
This comment was marked as outdated.
Thanks! Here's a ZIP of the sample ABF file in question: V2_dataLengthSec_Example.zip It looks this this is a gap free file, so the inter-sweep interval value may not be relevant to this recording. However, the bug you initially described that causes this gap-free file to be read incorrectly is important to resolve! I'll look into fixing this and making a new release shortly. Thanks so much for reporting this! |
Thanks for the explanation and the swift response! |
I work with files from various ABF versions, for version 2.0.0.0 files, self._protocolSection.fEpisodeStartToStart appears to be set to a value that's significantly smaller than the actual sweep length, leading to an underestimation of the sweep Interval (sweepIntervalSec), and subsequently the total recording length (dataLengthSec).
Problematic Code in abf.py:
pyABF/src/pyabf/abf.py
Lines 419 to 431 in 2a0c1b0
In my case,
does not seem to catch the issue. In the 2.0 recordings that are available to me, fEpisodeStartToStart is consistently reported as 5. I did not further investigate this issue and solved it for me by setting
regardless of the version.
My question now:
Why use fEpisodeStartToStart at all?
The text was updated successfully, but these errors were encountered: