Skip to content
Draft
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3dc5729
Test IBL extractors tests failing for PI update
alejoe91 Dec 29, 2025
d1a0532
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Jan 6, 2026
33c6769
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Jan 16, 2026
2c94bac
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Jan 20, 2026
a412bd8
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Feb 2, 2026
504e19d
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Feb 12, 2026
cd09c19
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Feb 19, 2026
a40d073
Merge branch 'main' of github.com:alejoe91/spikeinterface
alejoe91 Feb 24, 2026
a1da327
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 2, 2026
ef19a8e
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 3, 2026
a098b51
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 6, 2026
61c317a
Fix OpenEphys tests
alejoe91 Mar 6, 2026
c9ff247
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 9, 2026
3520138
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 16, 2026
f61329d
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 16, 2026
d64ae6a
Merge branch 'main' of github.com:alejoe91/spikeinterface
alejoe91 Mar 16, 2026
aef197d
Merge branch 'main' of github.com:SpikeInterface/spikeinterface
alejoe91 Mar 17, 2026
62f79b4
Propagate oebin_file to probeinterface.read_openephys
alejoe91 Mar 17, 2026
305b974
Remove old logic and add comment
alejoe91 Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 13 additions & 23 deletions src/spikeinterface/extractors/neoextractors/openephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,44 +319,34 @@ def __init__(
else:
record_node = ""
oe_stream = stream_name
exp_ids = sorted(list(self.neo_reader.folder_structure[record_node]["experiments"].keys()))
node_structure = self.neo_reader.folder_structure[record_node]
exp_ids = sorted(list(node_structure["experiments"].keys()))
if block_index is None:
exp_id = exp_ids[0]
else:
exp_id = exp_ids[block_index]
rec_ids = sorted(
list(self.neo_reader.folder_structure[record_node]["experiments"][exp_id]["recordings"].keys())
)
rec_ids = sorted(list(node_structure["experiments"][exp_id]["recordings"].keys()))

# do not load probe for NIDQ stream or if load_sync_channel is True
if "NI-DAQmx" not in stream_name and not load_sync_channel:
settings_file = self.neo_reader.folder_structure[record_node]["experiments"][exp_id]["settings_file"]
settings_file = node_structure["experiments"][exp_id]["settings_file"]

if Path(settings_file).is_file():
# look for oebin file
exp_name = node_structure["experiments"][exp_id]["name"]
# we can use the first recording folder to find the oebin file, as the mapping should be the same
# for all recordings within the experiment
rec_name = node_structure["experiments"][exp_id]["recordings"][rec_ids[0]]["name"]
oebin_file = settings_file.parent / exp_name / rec_name / "structure.oebin"
oebin_file = oebin_file if oebin_file.is_file() else None

probe = probeinterface.read_openephys(
settings_file=settings_file, stream_name=stream_name, raise_error=False
settings_file=settings_file, stream_name=stream_name, oebin_file=oebin_file, raise_error=False
)
else:
probe = None

if probe is not None:
# Ensure device channel index corresponds to channel_ids
probe_channel_names = probe.contact_annotations.get("channel_name", None)
if probe_channel_names is not None and not np.array_equal(probe_channel_names, self.channel_ids):
if set(probe_channel_names) == set(self.channel_ids):
device_channel_indices = []
probe_channel_names = list(probe_channel_names)
device_channel_indices = np.zeros(len(self.channel_ids), dtype=int)
for i, ch in enumerate(self.channel_ids):
index_in_probe = probe_channel_names.index(ch)
device_channel_indices[index_in_probe] = i
probe.set_device_channel_indices(device_channel_indices)
else:
warnings.warn(
"Channel names in the probe do not match the channel ids from Neo. "
"Cannot set device channel indices, but this might lead to incorrect probe geometries"
)

if probe.shank_ids is not None:
self.set_probe(probe, in_place=True, group_mode="by_shank")
else:
Expand Down
Loading