Skip to content

Implement reading .CMT comment files in our Nihon Kohden reader - #13642

Draft
wmvanvliet wants to merge 4 commits into
mne-tools:mainfrom
wmvanvliet:nihon-comments
Draft

wmvanvliet wants to merge 4 commits into
mne-tools:mainfrom
wmvanvliet:nihon-comments

Conversation

@wmvanvliet

@wmvanvliet wmvanvliet commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

This implements basic support for reading the .CMT sidecar file in Nihon Kohden EEG recordings. These comment are an extension to the annotations functionality, where the annotation description is P_COMMENT and should be replaced with the corresponding comment in the .CMT file. Comments can include images and have markup such as background and foreground colors. We ignore all that and just replace the P_COMMENT string in the annotation with the text of the comment.

Fixes #13633.

Todo:

  • Add example file with comments to the testing dataset
  • Add unit tests.

@wmvanvliet wmvanvliet added the ENH label Feb 9, 2026
@wmvanvliet
wmvanvliet marked this pull request as draft February 9, 2026 10:11
@wmvanvliet

Copy link
Copy Markdown
Contributor Author

This PR will be on hold until we can get our hands on some example Nihon files that make use of this comment feature.

@myd7349

myd7349 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Hello @wmvanvliet . I may be able to help. I can edit the data in mne-testing-data using Nihon Workbench and generate a .CMT file that contains P_COMMENT.

@wmvanvliet

Copy link
Copy Markdown
Contributor Author

yes, that would help!

@myd7349

myd7349 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Hi! @wmvanvliet I have just created a PR: mne-tools/mne-testing-data#134 .

The updated test data DA00100E.EEG/CMT contains two P_COMMENT entries:

  • R peak 1
  • R peak 2

as shown in the figure below:

NK screenshot

I also updated the EDF file using EDFbrowser. However, please note that EDFbrowser may not yet support conversion of P_COMMENT, so the event texts in the generated EDF file are still P_COMMENT.

EDFbrowser screenshot

@larsoner

larsoner commented May 27, 2026 •

Copy link
Copy Markdown
Member

Released 0.174 with md5sum (at least when I downloaded it)

3ac81540c553c0d264a14f122fc52e91

@wmvanvliet

Copy link
Copy Markdown
Contributor Author

nice, thank you @myd7349!

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support reading comment text/content from Nihon Kohden EEG files

3 participants