Skip to content

Commit

Permalink
Fix XDF marker streams (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr authored Apr 21, 2022
1 parent 6879922 commit f76d825
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## [UNRELEASED] - xxxx-xx-xx
## [0.8.3] - 2022-04-21
### Fixed
- Fix XDF marker stream regression ([#346](https://github.com/cbrnr/mnelab/pull/346) by [Clemens Brunner](https://github.com/cbrnr))

## [0.8.2] - 2022-04-13
### Added
Expand Down
2 changes: 1 addition & 1 deletion mnelab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .mainwindow import MainWindow
from .model import Model

__version__ = "0.9.0.dev0"
__version__ = "0.8.3"


def main():
Expand Down
3 changes: 2 additions & 1 deletion mnelab/io/xdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ def read_raw_xdf(
raw = mne.io.RawArray(all_time_series_scaled, info)
raw._filenames = [fname]

# convert marker streams to annotations
for stream_id, stream in streams.items():
srate = float(stream["info"]["nominal_srate"][0])
if not (srate == 0 and stream["info"]["channel_format"] == ["string"]):
if srate != 0: # marker streams with regular srate are not supported yet
continue
onsets = stream["time_stamps"] - first_time
prefix = f"{stream_id}-" if prefix_markers else ""
Expand Down

0 comments on commit f76d825

Please sign in to comment.