Skip to content

Commit 4f5b555

Browse files
authored
Merge branch 'main' into fix-doc-motion
2 parents b3f670f + f3bfd84 commit 4f5b555

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/spikeinterface/extractors/neoextractors/spikeglx.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,18 @@ def __init__(
7575

7676
self._kwargs.update(dict(folder_path=str(Path(folder_path).absolute()), load_sync_channel=load_sync_channel))
7777

78+
stream_is_nidq_or_sync = "nidq" in self.stream_id or "SYNC" in self.stream_id
79+
if stream_is_nidq_or_sync:
80+
# Do not add probe information for the sync or nidq stream. Early return
81+
return None
82+
7883
# Checks if the probe information is available and adds location, shanks and sample shift if available.
7984
signals_info_dict = {e["stream_name"]: e for e in self.neo_reader.signals_info_list}
8085
meta_filename = signals_info_dict[self.stream_id]["meta_file"]
86+
8187
ap_meta_filename = meta_filename.replace(".lf", ".ap") if "lf" in self.stream_id else meta_filename
8288
ap_meta_file_exists = Path(ap_meta_filename).exists()
83-
stream_is_not_nidq = "nidq" not in self.stream_id
84-
add_probe_properties = ap_meta_file_exists and stream_is_not_nidq and not load_sync_channel
89+
add_probe_properties = ap_meta_file_exists and not load_sync_channel
8590

8691
if add_probe_properties:
8792
probe = probeinterface.read_spikeglx(ap_meta_filename)

src/spikeinterface/extractors/tests/test_neoextractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ class SpikeGLXRecordingTest(RecordingCommonTestSuite, unittest.TestCase):
101101
downloads = ["spikeglx"]
102102
entities = [
103103
("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.ap"}),
104-
("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.ap", "load_sync_channel": True}),
105104
("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.lf"}),
106105
("spikeglx/Noise4Sam_g0", {"stream_id": "nidq"}),
106+
("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.ap-SYNC"}),
107107
]
108108

109109

0 commit comments

Comments
 (0)