Try to read openephys probe
@@ -9,6 +9,8 @@ from pathlib import Path
import numpy as np
+import probeinterface as pi
+
from .neobaseextractor import (NeoBaseRecordingExtractor,
NeoBaseSortingExtractor,
NeoBaseEventExtractor)
@@ -63,6 +65,14 @@ class OpenEphysBinaryRecordingExtractor(NeoBaseRecordingExtractor):
neo_kwargs = {'dirname': folder_path}
NeoBaseRecordingExtractor.__init__(self, stream_id=stream_id, **neo_kwargs)
+ if hasattr(pi, "read_openephys"):
+ try:
+ probe = pi.read_openephys(folder_path)
+ self.set_probe(probe, in_place=True)
+ except Exception:
+ # probe not supported by OE version
+ pass
+
self._kwargs = dict(folder_path=str(folder_path), stream_id=stream_id)
