You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main problem is that the gaps automatically detected by the code are much smaller than what would reasonably qualify as a segment in Neo (for example, someone deliberately pausing the recording). These gaps are more likely artifacts of the system (in #1770, it looks like a case of dropped samples).
Creating format-specific heuristics for each format would be a large maintenance burden. A simpler, more maintainable, and general solution is to provide users (who know their data best) with both information and control. We came up with the following proposal:
Opt-in behavior: RawIO readers should provide an argument (e.g. gap_tolerance_ms, naming TBD per reader) that lets users explicitly load data with gaps if they wish. Gaps smaller than the value will be ignored, gaps larger than the value will be segmented.
ignore_integrity_checks as the global escape hatch. A boolean kwarg at instantiation that bypasses every integrity check the reader performs, including gap detection and any format-specific file-validity checks. Default is False (strict). This serves two audiences: users who know their data is fine and want faster loads (integrity checks can be expensive, as @samuelgarcia pointed out), and users who need to open corrupt files to recover what they can (e.g. when the person who ran the experiment is no longer available). Examples: Add the possilibity of opening intan files even if corrupted. #1470 (Intan corrupt-file opening), Blackrock add block validation #1740 (other integrity checks).
This design would allow us to implement a consistent API across RawIO, so gaps are handled with a common interface. The plan is as follows:
Implement the solution first for Blackrock (since there are open issues and users currently cannot read the data). This will also let us to discuss the types and naming of the interface.
Extend the interface to other popular readers (e.g. Intan, OpenEphys, SpikeGLX, Plexon) to uncover potential difficulties.
Once the API is stable for the main readers, integrate it into the abstract/parent classes as a general RawIO API.
If possible, deprecate the current gap-handling mechanisms already in place (e.g. in OpenEphys) to simplify the codebase.
@zm711, @samuelgarcia, and I had a discussion today about two current Blackrock issues (#1770 and #1755).
The main problem is that the gaps automatically detected by the code are much smaller than what would reasonably qualify as a segment in Neo (for example, someone deliberately pausing the recording). These gaps are more likely artifacts of the system (in #1770, it looks like a case of dropped samples).
Creating format-specific heuristics for each format would be a large maintenance burden. A simpler, more maintainable, and general solution is to provide users (who know their data best) with both information and control. We came up with the following proposal:
gap_tolerance_ms, naming TBD per reader) that lets users explicitly load data with gaps if they wish. Gaps smaller than the value will be ignored, gaps larger than the value will be segmented._get_blackrock_timestampsfor per-sample timestamp retrieval #1816 for Blackrock).ignore_integrity_checksas the global escape hatch. A boolean kwarg at instantiation that bypasses every integrity check the reader performs, including gap detection and any format-specific file-validity checks. Default isFalse(strict). This serves two audiences: users who know their data is fine and want faster loads (integrity checks can be expensive, as @samuelgarcia pointed out), and users who need to open corrupt files to recover what they can (e.g. when the person who ran the experiment is no longer available). Examples: Add the possilibity of opening intan files even if corrupted. #1470 (Intan corrupt-file opening), Blackrock add block validation #1740 (other integrity checks).This design would allow us to implement a consistent API across RawIO, so gaps are handled with a common interface. The plan is as follows:
[EDIT, added mechanism to override the checks]