Skip to content

Implement copy/get_slice/get_global_contact_positions for probegroup#416

Merged
alejoe91 merged 8 commits intoSpikeInterface:mainfrom
alejoe91:probegroup-get-slice
Mar 25, 2026
Merged

Implement copy/get_slice/get_global_contact_positions for probegroup#416
alejoe91 merged 8 commits intoSpikeInterface:mainfrom
alejoe91:probegroup-get-slice

Conversation

@alejoe91
Copy link
Copy Markdown
Member

As in title

Copy link
Copy Markdown
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good tme, some small comments.

Comment thread src/probeinterface/probegroup.py Outdated
Comment thread src/probeinterface/probegroup.py Outdated
Comment thread src/probeinterface/probegroup.py Outdated
Comment thread src/probeinterface/probegroup.py Outdated
@alejoe91
Copy link
Copy Markdown
Member Author

@h-mayorquin thanks for the comments! All addressed :)

@alejoe91 alejoe91 merged commit 75370d5 into SpikeInterface:main Mar 25, 2026
9 checks passed
contact_positions = np.vstack([probe.contact_positions for probe in self.probes])
return contact_positions

def get_slice(self, selection: np.ndarray[bool | int]) -> "ProbeGroup":
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we strongly need to discuss this behavior.
Does the slice is probe by probe concatenated or is the slice is on channel_devcide_index ordered ?
This is very very important when handling several probes!!! sometimes channel indices are interleaved!!
And so the result will not be the same.

@samuelgarcia
Copy link
Copy Markdown
Member

We need to be very very carefull with probegroup slicing and if we remove the contact vertor in spikeinterface.
The contact use to be ordered by channel device index because sometimes channel from differents are interleaved.
So slicing globaly a recording with bool or indices should be done with the channel device indices in mind or not but we need something that do not slip channel on the wrong probe when slicing a recording that have 2 probes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants