diff --git a/src/spikeinterface/extractors/neoextractors/spikeglx.py b/src/spikeinterface/extractors/neoextractors/spikeglx.py index 4e900097ea..df3728fe6a 100644 --- a/src/spikeinterface/extractors/neoextractors/spikeglx.py +++ b/src/spikeinterface/extractors/neoextractors/spikeglx.py @@ -75,13 +75,18 @@ def __init__( self._kwargs.update(dict(folder_path=str(Path(folder_path).absolute()), load_sync_channel=load_sync_channel)) + stream_is_nidq_or_sync = "nidq" in self.stream_id or "SYNC" in self.stream_id + if stream_is_nidq_or_sync: + # Do not add probe information for the sync or nidq stream. Early return + return None + # Checks if the probe information is available and adds location, shanks and sample shift if available. 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"] + ap_meta_filename = meta_filename.replace(".lf", ".ap") if "lf" in self.stream_id else meta_filename ap_meta_file_exists = Path(ap_meta_filename).exists() - stream_is_not_nidq = "nidq" not in self.stream_id - add_probe_properties = ap_meta_file_exists and stream_is_not_nidq and not load_sync_channel + add_probe_properties = ap_meta_file_exists and not load_sync_channel if add_probe_properties: probe = probeinterface.read_spikeglx(ap_meta_filename) diff --git a/src/spikeinterface/extractors/tests/test_neoextractors.py b/src/spikeinterface/extractors/tests/test_neoextractors.py index 7ef3a362e8..0eb43535aa 100644 --- a/src/spikeinterface/extractors/tests/test_neoextractors.py +++ b/src/spikeinterface/extractors/tests/test_neoextractors.py @@ -101,9 +101,9 @@ class SpikeGLXRecordingTest(RecordingCommonTestSuite, unittest.TestCase): downloads = ["spikeglx"] entities = [ ("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.ap"}), - ("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.ap", "load_sync_channel": True}), ("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.lf"}), ("spikeglx/Noise4Sam_g0", {"stream_id": "nidq"}), + ("spikeglx/Noise4Sam_g0", {"stream_id": "imec0.ap-SYNC"}), ]