ENH: add Raw annotation span conversion - #14240
Open
timothyanderson096-ocdealcheck wants to merge 2 commits into
Open
ENH: add Raw annotation span conversion#14240timothyanderson096-ocdealcheck wants to merge 2 commits into
timothyanderson096-ocdealcheck wants to merge 2 commits into
Conversation
timothyanderson096-ocdealcheck
requested review from
agramfort,
drammock,
larsoner and
mscheltienne
as code owners
August 28, 2026 12:27
larsoner
reviewed
Aug 28, 2026
| """:class:`~mne.Annotations` for marking segments of data.""" | ||
| return self._annotations | ||
|
|
||
| def get_annotation_span(self, index: int) -> tuple[float, float]: |
Member
There was a problem hiding this comment.
Since this can all be vectorized (?) I wonder if a:
get_annotation_spans()
that computes all at once would make more sense
Implements the get_annotation_spans() design suggested by @larsoner during review of mne-tools#14240.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
Addresses #13890.
What does this implement/fix?
Raw.get_annotation_span(index) -> (tmin, tmax)Additional information
Verification: 10 tests passed, 1 skipped because Qt was unavailable. Ruff checks and formatting checks passed.
AI/GDN disclosure:
GDN is an independent verification system that sits above AI and uses its own verification system in conjunction with AI. I have reviewed and understood the changes that were implemented and approve them. Once again, GDN is an independent verification system that sits above AI and can be used with any model. It just so happens that we are using ChatGPT with GPT-5.6 Sol at Ultra reasoning effort to complete our work.