Propagate per-sample hardware timestamps through the signal chain#696
Open
anjaldoshi wants to merge 7 commits intoopen-ephys:developmentfrom
Open
Propagate per-sample hardware timestamps through the signal chain#696anjaldoshi wants to merge 7 commits intoopen-ephys:developmentfrom
anjaldoshi wants to merge 7 commits intoopen-ephys:developmentfrom
Conversation
bparks13
reviewed
May 5, 2026
Member
bparks13
left a comment
There was a problem hiding this comment.
Tested this with the ONIX Source plugin, where the expected sample rate was manipulated to be well over or well under the actual sample rate. I also recorded the timestamps manually next to the binary files, and compared the recorded timestamps to the manually saved timestamps. In all cases, the timestamps were correctly propagated to the binary files and saved, even in extreme cases where the expected sample rate was > 1 kHz off from the real sample rate. The mean difference between the manually saved timestamps and the recorded timestamps was 2.704472865532025e-07 seconds, which is most likely due to rounding errors since these are double values.
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.
Preserves per-sample timestamps through processing and recording for hardware-synced streams. Previously, timestamps were reduced to the first sample per block and the rest inferred, which could cause drift or backward jumps when the effective rate varied.
DataBuffer::readAllFromBuffer()now returns full per-sample timestamps.SystemEvent::TIMESTAMP_ARRAYto propagate timestamps without altering existing formats.SourceNodenow buffers and emits per-sample timestamps alongside legacy metadata.GenericProcessorhelpers for accessing and resolving timestamps within a block.RecordNodeto use per-sample timestamps, with interpolation as fallback.DataQueuecan now write timestamp arrays directly.