TdtRawIO: detect SEV vs TEV using the UCF flag instead of silent per-channel fallback#1835
Open
h-mayorquin wants to merge 2 commits intoNeuralEnsemble:masterfrom
Open
TdtRawIO: detect SEV vs TEV using the UCF flag instead of silent per-channel fallback#1835h-mayorquin wants to merge 2 commits intoNeuralEnsemble:masterfrom
h-mayorquin wants to merge 2 commits intoNeuralEnsemble:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1817.
In
TdtRawIO._parse_header, storage mode (SEV vs TEV) is a per-store configuration choice set at recording time via Synapse's "Discrete Files" option, and encoded in the TSQ event type via theEVTYPE_UCFbit (0x10). The previous implementation ignored this flag and instead globbed for an SEV file per channel, silently falling back to the TEV buffer when one was not found. Because TEV does not contain valid stream data for a UCF-flagged store, that fallback produced wrong data rather than an error.The check now runs once per store using
info["TankEvType"] & EVTYPE_UCF. When the bit is set, a missing SEV file raisesNeoReadWriteErrorwith the store name, channel, and segment, making the failure mode explicit. When the bit is not set, the existing TEV fallback path is preserved so non-UCF recordings continue to work unchanged.EVTYPE_MASKalready excludes the UCF bit, so none of the existing stream filtering is affected.