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

Fix edfrawio for pyedflib>=0.1.39 #1635

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Changes from all commits
Commits
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 neo/rawio/edfrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def _parse_header(self):
for ch_idx, sig_dict in enumerate(self.signal_headers):
ch_name = sig_dict["label"]
chan_id = ch_idx
sr = sig_dict["sample_rate"] # Hz
# pyedf >= 0.1.39 uses sample_frequency, pyedf < 0.1.39 uses sample_rate
sr = sig_dict.get("sample_frequency") or sig_dict.get("sample_rate") # Hz
dtype = "int16" # assume general int16 based on edf documentation
units = sig_dict["dimension"]
physical_range = sig_dict["physical_max"] - sig_dict["physical_min"]
Expand Down Expand Up @@ -160,6 +161,7 @@ def _parse_header(self):
"label",
"dimension",
"sample_rate",
"sample_frequency",
"physical_min",
"physical_max",
"digital_min",
Expand Down
Loading