Skip to content

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
h-mayorquin:fix_tdt
Open

TdtRawIO: detect SEV vs TEV using the UCF flag instead of silent per-channel fallback#1835
h-mayorquin wants to merge 2 commits intoNeuralEnsemble:masterfrom
h-mayorquin:fix_tdt

Conversation

@h-mayorquin
Copy link
Copy Markdown
Contributor

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 the EVTYPE_UCF bit (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 raises NeoReadWriteError with 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_MASK already excludes the UCF bit, so none of the existing stream filtering is affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TdtRawIO: Detect SEV vs TEV format using the UCF flag instead of per-channel silent fallback

1 participant