Skip to content

Fix: update raw attributes when appending cHPI channels - #14180

Merged
larsoner merged 4 commits into
mne-tools:mainfrom
christianbrodbeck:fix/raw-hpi
Aug 19, 2026
Merged

Fix: update raw attributes when appending cHPI channels#14180
larsoner merged 4 commits into
mne-tools:mainfrom
christianbrodbeck:fix/raw-hpi

Conversation

@christianbrodbeck

Copy link
Copy Markdown
Member

What does this implement/fix?

When appending cHPI channels to raw, some private attributes containing by-channel information need to be updated to enable subsequent indexing operations to work.

Additional information

Claude Opus 5 identified the issue and implemented the tests and fix. GPT-5.6 Sol reviewed change and identified issue with concatenation (in comment).

@christianbrodbeck
christianbrodbeck marked this pull request as ready for review August 19, 2026 14:48

@larsoner larsoner left a comment

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.

Maybe someday we should instead create a mini RawFIF instance and raw.append(chpi_raw)... it should take care of all of this stuff and would be more DRY. But in the meantime I think this works. Thanks @christianbrodbeck !

@larsoner
larsoner merged commit d030bd5 into mne-tools:main Aug 19, 2026
31 checks passed
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