Skip to content

Expand byte size of samples_per_record #92

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

Merged
merged 5 commits into from
Jan 28, 2025

Conversation

haberdashPI
Copy link
Member

samples_per_record is stored as an Int16 which can cause errors when individual records of an EDF are very large. This expands the size to Int32.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.25%. Comparing base (151f92f) to head (961a024).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #92   +/-   ##
=======================================
  Coverage   95.25%   95.25%           
=======================================
  Files           4        4           
  Lines         295      295           
=======================================
  Hits          281      281           
  Misses         14       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@haberdashPI haberdashPI force-pushed the dfl/exapnd-samples-per-record branch from c4aab2b to 06b47a6 Compare January 28, 2025 16:00
@haberdashPI haberdashPI requested review from ararslan, patinoam and kleinschmidt and removed request for ararslan January 28, 2025 16:04
Project.toml Outdated
@@ -1,7 +1,7 @@
name = "EDF"
uuid = "ccffbfc1-f56e-50fb-a33b-53d1781b2825"
authors = ["Beacon Biosignals, Inc."]
version = "0.7.5"
version = "0.7.6"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "0.7.6"
version = "0.8.0"

src/types.jl Outdated
end

function SignalHeader(signal::AnnotationsSignal)
return SignalHeader("EDF Annotations", "", "", -1, 1, -32768, 32767,
return SignalHeader("EDF Annotations", "", "", -1, 1, -32768, 32767, # typemin/typemax
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the typemin/typemax comment is actually that informative; it may even be more confusing since the field is now typed as Int32 but those values are not typemin(Int32)/typemax(Int32), they're for Int16, which will be otherwise irrelevant after this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this field is still Int16 I think (it's the digital min/max)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's creating any confusion at all, I'll just remove it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this is only helpful for my weird brain 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, I think my confusion only arose because of the context of the change (I assumed without checking that it was related to the field that's having its type widened)

haberdashPI and others added 2 commits January 28, 2025 14:58
readme revisions

Co-authored-by: Alex Arslan <[email protected]>
Copy link

@patinoam patinoam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on my end - all changes from Int16 to Int32 are reasonable! However you should probably hold off on merging until @kleinschmidt / @ararslan / @ericphanson approve

@kleinschmidt kleinschmidt merged commit 25b4844 into main Jan 28, 2025
7 checks passed
@kleinschmidt kleinschmidt deleted the dfl/exapnd-samples-per-record branch January 28, 2025 21:56
haberdashPI added a commit to beacon-biosignals/OndaEDF.jl that referenced this pull request Jan 31, 2025
This upgrades OndaEDF.jl to EDF.jl 0.8 (c.f. beacon-biosignals/EDF.jl#92), which expands the field `sample_per_record` from `Int16` to `Int32`, mandating the creation of a new `PlanV3` and `FilePlanV3` that can accommodate this wider type.

Co-authored-by: Phillip Alday <[email protected]>
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.

5 participants