Skip to content

ENH: add Raw annotation span conversion - #14240

Open
timothyanderson096-ocdealcheck wants to merge 2 commits into
mne-tools:mainfrom
timothyanderson096-ocdealcheck:gdn-13890-annotation-span
Open

ENH: add Raw annotation span conversion#14240
timothyanderson096-ocdealcheck wants to merge 2 commits into
mne-tools:mainfrom
timothyanderson096-ocdealcheck:gdn-13890-annotation-span

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown

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.

Comment thread mne/io/base.py Outdated
""":class:`~mne.Annotations` for marking segments of data."""
return self._annotations

def get_annotation_span(self, index: int) -> tuple[float, float]:

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.

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.
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.

2 participants