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:
|
# set sweepIntervalSec (can be different than sweepLengthSec) |
|
if self.abfVersion["major"] == 1: |
|
self.sweepIntervalSec = self.sweepLengthSec |
|
if self.abfVersion["major"] == 2: |
|
self.sweepIntervalSec = self._protocolSection.fEpisodeStartToStart |
|
if self.sweepIntervalSec == 0: |
|
self.sweepIntervalSec = self.sweepLengthSec |
|
|
|
# determine total ABF recording length |
|
self.dataLengthSec = self.sweepIntervalSec*self.sweepCount |
|
if self.sweepCount > 1: |
|
self.dataLengthSec += self.sweepLengthSec |
|
self.dataLengthMin = self.dataLengthSec / 60.0 |
In my case,
if self.sweepIntervalSec == 0:
self.sweepIntervalSec = self.sweepLengthSec
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
self.sweepIntervalSec = self.sweepLengthSec
regardless of the version.
My question now:
Why use fEpisodeStartToStart at all?
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?