-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support BDF files #46
Conversation
I might be missing something here. Why use |
@klaff I think the problem comes when moving it to/from disk: you need to interpret the blitted data as |
Ah, so some bit-twiddling like:
|
I think we've generally tried to keep the internal representations of things as close as possible to how the format stores them, for better or for worse. (One notable deviation is that the array of samples for each signal is one big vector and is not divided into data records. Annotations, however, are divided into data records.) Keeping the encoded representation true to the format also simplifies both the reading and writing; no extra conversions or checks are required. For actually using the data, you'd want to call |
This comment has been minimized.
This comment has been minimized.
BDF is BioSemi's variant of EDF that encodes samples as 24 bits each rather than 16. Here we're using BitIntegers.jl to get an `Int24` type that allows us to support BDF with minimal internal changes.
@@ -47,7 +47,6 @@ end | |||
|
|||
function edf_write(io::IO, value, byte_limit::Integer) | |||
edf_value = _edf_repr(value) | |||
@assert isascii(edf_value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this requirement had to be removed because the version field of a BDF header begins with a non-ASCII byte.
BDF is BioSemi's variant of EDF that encodes samples as 24 bits each rather than 16. Here we're using BitIntegers.jl to get an
Int24
type that Should™ allow us to support BDF with minimal internal changes.Closes #33.
Current state of this PR: Works!
Doesn't fully work, haven't looked too closely yet, was mostly just trying this out for fun.