Skip to content

BlackrockRawIO: Add _get_blackrock_timestamps for per-sample timestamp retrieval#1816

Merged
alejoe91 merged 1 commit intoNeuralEnsemble:masterfrom
h-mayorquin:add_get_timestamps_to_blackrock
Feb 13, 2026
Merged

BlackrockRawIO: Add _get_blackrock_timestamps for per-sample timestamp retrieval#1816
alejoe91 merged 1 commit intoNeuralEnsemble:masterfrom
h-mayorquin:add_get_timestamps_to_blackrock

Conversation

@h-mayorquin
Copy link
Contributor

This PR adds a private method _get_blackrock_timestamps to BlackrockRawIO that returns per-sample timestamps in seconds as a float64 array, implementing pillar 3 ("expose original acquisition timestamps") of the gap-handling API proposal in #1773. For PTP formats, actual per-sample hardware timestamps are extracted; for all other formats, timestamps within each data block are interpolated from the first sample using the sampling rate. The method is private for now to allow discussion of a public API on BaseRawIO later, but downstream users can already use it in the meantime.

Another reason to add this logic first is that it paves the way for generalizing gap_tolerance_ms to standard format variants (v2.2/v2.3/v3.0). Currently gap handling only works for PTP; by establishing a uniform per-sample timestamp representation across all formats, the segmentation pipeline can be rewritten as a single code path that applies np.diff based gap detection to any variant, eliminating the format-specific branching in _segment_nsx_data and making the code simpler.

@alejoe91 alejoe91 added this to the 0.14.4 milestone Feb 11, 2026
@alejoe91 alejoe91 merged commit 95adf26 into NeuralEnsemble:master Feb 13, 2026
3 checks passed
@h-mayorquin h-mayorquin deleted the add_get_timestamps_to_blackrock branch February 13, 2026 17:31
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.

2 participants