An example with double channel string marker#4
Open
abcsds wants to merge 7 commits into
Open
Conversation
Contributor
|
Same comment as in #5, can you add a description for the example file please? Either in a separate |
Contributor
|
Also, I think |
Author
|
Used |
Contributor
|
@abcsds we have updated the README, can you please add a new section with a description of this dataset? Thanks! |
cbrnr
reviewed
Feb 10, 2025
cbrnr
reviewed
Feb 18, 2025
cbrnr
reviewed
Feb 18, 2025
Contributor
|
Looks good! Now we should try to figure out the time stamp issue (i.e., why XDF.jl reports a different time stamp than pyxdf)! |
abcsds
added a commit
to abcsds/XDF.jl
that referenced
this pull request
May 22, 2026
The XDF binary spec stores each sample of a string stream as one
varlen-prefixed string per channel, but `read_xdf` read a single
varlen-prefixed string and broadcast it across every channel of the
sample. On twochannel_string_marker.xdf XDF.jl returned
["Marker 0A" "Marker 0A"]
where pyxdf returned
[["Marker 0A", "Marker 0B"]].
Loop over channels and read one varlen-prefixed string each instead.
Add a regression test that vendors the 1.5 KB twochannel_string_marker.xdf
fixture from xdf-modules/example-files#4 under test/testdata/ and pins
its sha256, then asserts stream metadata and the per-channel marker
payload. test/Project.toml gains a dependency on stdlib SHA so the
fixture-integrity check can run.
Resolves cbrnr#10. Supersedes cbrnr#14.
abcsds
added a commit
to abcsds/XDF.jl
that referenced
this pull request
May 22, 2026
With a single ClockOffset chunk, `sync_clock` built a 1x2 design matrix
and solved it with `x \ y`. That system is underdetermined, so Julia's
left divide returns the minimum-norm solution -- a valid answer to the
underdetermined system, but one that imposes a spurious non-zero slope
on the offset trajectory. On twochannel_string_marker.xdf (one offset
of -0.1 at clock time 6.1, one sample at raw t = 17.0) it produced
t = 16.725987961266686
instead of the expected
t = 17.0 + (-0.1) = 16.9.
pyxdf's `_clock_sync` (xdf-modules/pyxdf src/pyxdf/pyxdf.py) treats
single-offset segments as `(intercept = offset, slope = 0)`, i.e. a
constant correction. Special-case `size(offsets, 1) == 1` to do the
same; the regression path is unchanged for two or more offsets.
Add two sub-testsets pinning both raw and synced time stamps to the
values pyxdf returns on the same fixture; the synced assertion fails
without this change and passes with it.
Resolves the timestamp discrepancy flagged on
xdf-modules/example-files#4.
abcsds
added a commit
to abcsds/XDF.jl
that referenced
this pull request
May 22, 2026
The XDF binary spec stores each sample of a string stream as one
varlen-prefixed string per channel, but `read_xdf` read a single
varlen-prefixed string and broadcast it across every channel of the
sample. On twochannel_string_marker.xdf XDF.jl returned
["Marker 0A" "Marker 0A"]
where pyxdf returned
[["Marker 0A", "Marker 0B"]].
Loop over channels and read one varlen-prefixed string each instead.
Add a regression test that vendors the 1.5 KB twochannel_string_marker.xdf
fixture from xdf-modules/example-files#4 under test/testdata/ and pins
its sha256, then asserts stream metadata and the per-channel marker
payload. test/Project.toml gains a dependency on stdlib SHA so the
fixture-integrity check can run.
Resolves cbrnr#10. Supersedes cbrnr#14.
abcsds
added a commit
to abcsds/XDF.jl
that referenced
this pull request
May 22, 2026
With a single ClockOffset chunk, `sync_clock` built a 1x2 design matrix
and solved it with `x \ y`. That system is underdetermined, so Julia's
left divide returns the minimum-norm solution -- a valid answer to the
underdetermined system, but one that imposes a spurious non-zero slope
on the offset trajectory. On twochannel_string_marker.xdf (one offset
of -0.1 at clock time 6.1, one sample at raw t = 17.0) it produced
t = 16.725987961266686
instead of the expected
t = 17.0 + (-0.1) = 16.9.
pyxdf's `_clock_sync` (xdf-modules/pyxdf src/pyxdf/pyxdf.py) treats
single-offset segments as `(intercept = offset, slope = 0)`, i.e. a
constant correction. Special-case `size(offsets, 1) == 1` to do the
same; the regression path is unchanged for two or more offsets.
Add two sub-testsets pinning both raw and synced time stamps to the
values pyxdf returns on the same fixture; the synced assertion fails
without this change and passes with it.
Resolves the timestamp discrepancy flagged on
xdf-modules/example-files#4.
abcsds
added a commit
to abcsds/XDF.jl
that referenced
this pull request
May 22, 2026
The XDF binary spec stores each sample of a string stream as one
varlen-prefixed string per channel, but `read_xdf` read a single
varlen-prefixed string and broadcast it across every channel of the
sample. On twochannel_string_marker.xdf XDF.jl returned
["Marker 0A" "Marker 0A"]
where pyxdf returned
[["Marker 0A", "Marker 0B"]].
Loop over channels and read one varlen-prefixed string each instead.
Add a regression test that vendors the 1.5 KB twochannel_string_marker.xdf
fixture from xdf-modules/example-files#4 under test/testdata/ and pins
its sha256, then asserts stream metadata and the per-channel marker
payload. test/Project.toml gains a dependency on stdlib SHA so the
fixture-integrity check can run.
Resolves cbrnr#10. Supersedes cbrnr#14.
abcsds
added a commit
to abcsds/XDF.jl
that referenced
this pull request
May 22, 2026
With a single ClockOffset chunk, `sync_clock` built a 1x2 design matrix
and solved it with `x \ y`. That system is underdetermined, so Julia's
left divide returns the minimum-norm solution -- a valid answer to the
underdetermined system, but one that imposes a spurious non-zero slope
on the offset trajectory. On twochannel_string_marker.xdf (one offset
of -0.1 at clock time 6.1, one sample at raw t = 17.0) it produced
t = 16.725987961266686
instead of the expected
t = 17.0 + (-0.1) = 16.9.
pyxdf's `_clock_sync` (xdf-modules/pyxdf src/pyxdf/pyxdf.py) treats
single-offset segments as `(intercept = offset, slope = 0)`, i.e. a
constant correction. Special-case `size(offsets, 1) == 1` to do the
same; the regression path is unchanged for two or more offsets.
Add two sub-testsets pinning both raw and synced time stamps to the
values pyxdf returns on the same fixture; the synced assertion fails
without this change and passes with it.
Resolves the timestamp discrepancy flagged on
xdf-modules/example-files#4.
Resolve README.md conflict by keeping both upstream's clock_resets clock-offsets table (from xdf-modules#7) and the new twochannel_string_marker.xdf section. Also normalize XML footer indentation in the second stream (tabs → 4 spaces) for internal consistency within the new section, and add a trailing newline at EOF. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Multiple channels with string markers seem to have been an issue in both liblxdf and xdf.jl. This file was uploaded by @tstenner in xdf-modules/libxdf#19
It presents a single data point at time [16.725987961266686] with markers ["Marker 0A" "Marker 0B"].
The header of the file is:
The footer of the file is: