Skip to content

Conversation

@larsoner
Copy link
Member

@larsoner larsoner commented Feb 22, 2021

Closes #5507

Removes some heavy, seemingly overkill parametrization of the test_annotations.py where the parameters were only used in a single function for example. Also makes an overwrite entry in docdict.

Todo:

  • Make rename_channels change the names in annotations
  • Make drop_channels drop channel names, and channel-specific annotations that no longer apply

@larsoner larsoner added this to the 0.23 milestone Feb 22, 2021
@larsoner larsoner changed the title MRG, ENH: Allow channel-specific annotations WIP, ENH: Allow channel-specific annotations Feb 22, 2021
@larsoner larsoner changed the title WIP, ENH: Allow channel-specific annotations MRG, ENH: Allow channel-specific annotations Feb 23, 2021
@larsoner
Copy link
Member Author

Okay I think this is good to go now

@cbrnr
Copy link
Contributor

cbrnr commented Feb 23, 2021

LGTM +1 for merge when green!

Copy link
Member

@hoechenberger hoechenberger left a comment

Choose a reason for hiding this comment

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

Good stuff!

@hoechenberger
Copy link
Member

@larsoner The CI error seems unrelated to me!

@hoechenberger hoechenberger merged commit 0de802a into mne-tools:main Feb 24, 2021
@hoechenberger
Copy link
Member

Thank you, @larsoner!

@larsoner larsoner deleted the chnames branch February 24, 2021 13:06
marsipu pushed a commit to marsipu/mne-python that referenced this pull request Feb 25, 2021
* ENH: Allow channel-specific annotations

* FIX: rename, drop, example, doc

* DOC: Clarify
@jgcaffari1
Copy link

jgcaffari1 commented Nov 2, 2021

Is this only for the most recent version of python? I do not seem to have this functionality in python 3.6 even though I am up to date with mne.

@hoechenberger
Copy link
Member

The latest development version and the upcoming release of MNE-Python 0.24 only support Python 3.7 and newer.

@jgcaffari1
Copy link

I have updated everything and the annotations recognize ch_names as input, but they do not actually annotate specific channels. Do the channels need to have specific names as strings?

@drammock
Copy link
Member

drammock commented Nov 2, 2021

I have updated everything and the annotations recognize ch_names as input, but they do not actually annotate specific channels. Do the channels need to have specific names as strings?

so far this feature has no effect when plotting (we plan to do that, but it's not done yet). Is that what you're noticing?

@jgcaffari1
Copy link

That is what I am noticing. Would I be able to see the channel specific annotations if I save and open in another program?

@drammock
Copy link
Member

drammock commented Nov 2, 2021

Would I be able to see the channel specific annotations if I save and open in another program?

I think SigViewer has the ability to display channel-specific annotations. I don't know if SigViewer can read our Annotations data structure (but you can export our annotations to CSV). @cbrnr would know more...

@jgcaffari1
Copy link

Thank you.

@cbrnr
Copy link
Contributor

cbrnr commented Nov 3, 2021

Yes, SigViewer should be able to import events from a CSV file with columns position, duration, channel, type, and name. A channel value of -1 means all channels. However, I just tried this with a dummy file and the import didn't work (but there was no error either), so I guess this functionality is currently broken 😢 .

@jackz314
Copy link
Contributor

Just wondering if there has been any progress on displaying per-channel annotations?

@larsoner
Copy link
Member Author

Not that I've seen

@drammock
Copy link
Member

Just wondering if there has been any progress on displaying per-channel annotations?

@britta-wstnr good one for the fall sprint?

@aplzr
Copy link
Contributor

aplzr commented Aug 2, 2024

Chiming in to say that I would very much appreciate this feature as well.

@aplzr
Copy link
Contributor

aplzr commented Aug 8, 2024

I just realized that visualization of channel-specific annotations has actually been implemented in mne-qt-browser, so I'm posting here again for the benefit of everyone that didn't find the respective issues and pull requests, but did find this pull request (as I had initially).

  • Install mne-qt-browser (python -m pip install mne-qt-browser)
  • Activate its qt backend
    from mne.viz import set_browser_backend
    set_browser_backend("qt")
  • Plot a RawArray that has channel-specific annotations

mneqtspindleannot

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.

Event markers per channel

8 participants