Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1 #15

Closed
wants to merge 28 commits into from
Closed

V1 #15

Changes from 3 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Manifest.toml
Dockerfile
Dockerfile
.vscode/
.venv/
6 changes: 3 additions & 3 deletions src/XDF.jl
Original file line number Diff line number Diff line change
@@ -125,9 +125,9 @@ function read_xdf(filename::AbstractString, sync::Bool=true)
streams[id]["time"][index[id]] = previous + delta
end
if streams[id]["dtype"] === String
streams[id]["data"][index[id], :] .= String(
read(io, read_varlen_int(io))
)
for j in 1:nchannels
streams[id]["data"][index[id], j] = String(read(io, read_varlen_int(io)))
end
else
streams[id]["data"][index[id], :] = reinterpret(
dtype, read(io, sizeof(dtype) * nchannels)
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ end
@test s1["srate"] == 1000.0
@test s1["dtype"] == String
@test size(s1["data"]) == (1, 2)
@test s1["data"] == ["Marker 0A" "Marker 0A"]
@test s1["data"] == ["Marker 0A" "Marker 0B"]
s2 = streams[46202862]
@test s2["type"] == "EEG"
@test s2["nchannels"] == 64