added probe before
@@ -6,7 +6,7 @@ import neo
from packaging import version
-HAS_NEO_10_2 = version.parse(neo.__version__) >= version.parse('0.10.2')
+HAS_NEO_10_2 = version.parse(neo.__version__) >= version.parse("0.10.2")
class SpikeGLXRecordingExtractor(NeoBaseRecordingExtractor):
@@ -27,25 +27,28 @@ class SpikeGLXRecordingExtractor(NeoBaseRecordingExtractor):
stream_id: str or None
stream for instance : 'imec0.ap' 'nidq' or 'imec0.lf'
"""
- mode = 'folder'
- NeoRawIOClass = 'SpikeGLXRawIO'
+
+ mode = "folder"
+ NeoRawIOClass = "SpikeGLXRawIO"
def __init__(self, folder_path, stream_id=None):
- neo_kwargs = {'dirname': str(folder_path)}
+ neo_kwargs = {"dirname": str(folder_path)}
if HAS_NEO_10_2:
- neo_kwargs['load_sync_channel'] = False
+ neo_kwargs["load_sync_channel"] = False
NeoBaseRecordingExtractor.__init__(self, stream_id=stream_id, **neo_kwargs)
# ~ # open the corresponding stream probe
- if HAS_NEO_10_2 and '.nidq' not in self.stream_id:
- signals_info_dict = {e['stream_name'] : e for e in self.neo_reader.signals_info_list}
- meta_filename = signals_info_dict[self.stream_id]['meta_file']
+ if HAS_NEO_10_2 and ".nidq" not in self.stream_id:
+ signals_info_dict = {
+ e["stream_name"]: e for e in self.neo_reader.signals_info_list
+ }
+ meta_filename = signals_info_dict[self.stream_id]["meta_file"]
# Load probe geometry if available
+ probe = pi.read_spikeglx(meta_filename)
try:
- self.set_probe(probe, in_place=True, group_mode='by_shank')
+ self.set_probe(probe, in_place=True, group_mode="by_shank")
except:
self.set_probe(probe, in_place=True)
- probe = pi.read_spikeglx(meta_filename)
self.set_probe(probe, in_place=True)
self._kwargs = dict(folder_path=str(folder_path), stream_id=stream_id)
