Skip to content

Add SelectSegmentEvent#4575

Merged
alejoe91 merged 2 commits intoSpikeInterface:mainfrom
tayheau:event_segement
May 7, 2026
Merged

Add SelectSegmentEvent#4575
alejoe91 merged 2 commits intoSpikeInterface:mainfrom
tayheau:event_segement

Conversation

@tayheau
Copy link
Copy Markdown
Contributor

@tayheau tayheau commented May 4, 2026

add select_segment(segment_indices: int | list[int]) to BaseEvent through a new class SelectSegmentEvent(BaseEvent)

recordings and sortings have it, so in continuity (and bc i need it), i think it can be a good small addition ;)

@alejoe91 alejoe91 added the core Changes to core module label May 4, 2026
@alejoe91 alejoe91 changed the title add SelectSegmentEvent Add SelectSegmentEvent May 5, 2026
@h-mayorquin
Copy link
Copy Markdown
Collaborator

add select_segment(segment_indices: int | list[int]) to BaseEvent through a new class SelectSegmentEvent(BaseEvent)

recordings and sortings have it, so in continuity (and bc i need it), i think it can be a good small addition ;)

add select_segment(segment_indices: int | list[int]) to BaseEvent through a new class SelectSegmentEvent(BaseEvent)

recordings and sortings have it, so in continuity (and bc i need it), i think it can be a good small addition ;)

Can you describe a little about your use case?

@tayheau
Copy link
Copy Markdown
Contributor Author

tayheau commented May 7, 2026

Can you describe a little about your use case?

Mostly the analysis of my results, i work per segment due to the nature of the stimulus set.  Tbh it works also by using the select since the concept of segment exist in BaseEvent, i feel it makes the api more uniform to also have select_segement here. If you feel that it's out of scope, we can drop it !

@alejoe91
Copy link
Copy Markdown
Member

alejoe91 commented May 7, 2026

LGTM! I agree this unifies the API with the recording/sorting and makes the Event c;ass more complete! Thanks @tayheau

@alejoe91 alejoe91 merged commit ec55b00 into SpikeInterface:main May 7, 2026
15 checks passed
@h-mayorquin
Copy link
Copy Markdown
Collaborator

No, I think is totally within scope. I am just curious about what kind of setup you have and what formats you work in. I think it is good to leave this kind of thing documented at least on github issues so we can come back and see why we took the decisions we took.

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

Labels

core Changes to core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants