Skip to content

Fix dejittering of timestamps#165

Open
cbrnr wants to merge 2 commits intoxdf-modules:mainfrom
cbrnr:fix-dejitter
Open

Fix dejittering of timestamps#165
cbrnr wants to merge 2 commits intoxdf-modules:mainfrom
cbrnr:fix-dejitter

Conversation

@cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Feb 12, 2026

Fixes #163. The problem was that streams marked as can_drop_samples (e.g., video) were not excluded from dejittering, which is what happens in the MATLAB implementation.

@cbrnr
Copy link
Contributor Author

cbrnr commented Feb 12, 2026

@magdabiadala I've tested the fix with your example file and I get approximately the same start times for all streams now:

Stream 4 (PolarBand): 19263.77, 19263.78, 19263.79, 19263.79, 19263.80, 19263.81, 19263.82, 19263.82, 19263.83, 19263.84
Stream 6 (Shimmer_GSR): 19264.30, 19264.32, 19264.34, 19264.36, 19264.38, 19264.40, 19264.42, 19264.44, 19264.46, 19264.48
Stream 2 (HMD): 19264.29, 19264.30, 19264.31, 19264.32, 19264.33, 19264.34, 19264.35, 19264.37, 19264.38, 19264.39
Stream 5 (ViveProEye): 19270.96, 19271.06, 19271.07, 19271.08, 19271.09, 19271.10, 19271.15, 19271.20, 19271.26, 19271.31
Stream 3 (LookedAtObject): 19272.27, 19272.28, 19273.45, 19273.46, 19273.55, 19273.56, 19273.58, 19273.59, 19273.60, 19273.62
Stream 1 (ExperimentMarkerStream): 19267.14, 19268.13, 19271.05, 19331.73, 19354.02, 19405.50, 19406.51, 19418.08, 19469.14, 19477.32

Previously, the first 10 timestamps in streams 2 and 5 were shifted by around 47s:

Stream 2: Calculated effective sampling rate 70.1133 Hz is different from specified rate 90.0000 Hz.
Stream 5: Calculated effective sampling rate 70.0808 Hz is different from specified rate 90.0000 Hz.
Stream 4 (PolarBand): 19263.77, 19263.78, 19263.79, 19263.79, 19263.80, 19263.81, 19263.82, 19263.82, 19263.83, 19263.84
Stream 6 (Shimmer_GSR): 19264.30, 19264.32, 19264.34, 19264.36, 19264.38, 19264.40, 19264.42, 19264.44, 19264.46, 19264.48
Stream 2 (HMD): 19217.11, 19217.12, 19217.13, 19217.15, 19217.16, 19217.18, 19217.19, 19217.21, 19217.22, 19217.23
Stream 5 (ViveProEye): 19221.51, 19221.52, 19221.54, 19221.55, 19221.57, 19221.58, 19221.60, 19221.61, 19221.62, 19221.64
Stream 3 (LookedAtObject): 19272.27, 19272.28, 19273.45, 19273.46, 19273.55, 19273.56, 19273.58, 19273.59, 19273.60, 19273.62
Stream 1 (ExperimentMarkerStream): 19267.14, 19268.13, 19271.05, 19331.73, 19354.02, 19405.50, 19406.51, 19418.08, 19469.14, 19477.32

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.

bug in dejitter_timestamps when set to default

1 participant