From f76d82526716e45383257848682e3e828d6775e8 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Thu, 21 Apr 2022 13:37:01 +0200 Subject: [PATCH] Fix XDF marker streams (#346) --- CHANGELOG.md | 4 +++- mnelab/__init__.py | 2 +- mnelab/io/xdf.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef035ccc..bee0faca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/mnelab/__init__.py b/mnelab/__init__.py index 9bb12a54..2fc1f627 100644 --- a/mnelab/__init__.py +++ b/mnelab/__init__.py @@ -14,7 +14,7 @@ from .mainwindow import MainWindow from .model import Model -__version__ = "0.9.0.dev0" +__version__ = "0.8.3" def main(): diff --git a/mnelab/io/xdf.py b/mnelab/io/xdf.py index f3852583..07ceaf8d 100644 --- a/mnelab/io/xdf.py +++ b/mnelab/io/xdf.py @@ -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 ""