Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug for ica.get_sources() and add a corresponding test #13068

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

BeiGeJin
Copy link

Reference issue (if any)

Fixes #13057.

What does this implement/fix?

It fixes the bug in ica.get_sources() for concatenated raw object.

There is a bug in the ica._source_as_raw function, here it assigns [self.last_samp] to self._last_samps, however self.last_samp is a property function and it seems that if its wrapped in a list, it won't actually call this function until used later. So I change it to first calculate the values and then put them in the list.

Copy link

welcome bot commented Jan 17, 2025

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Looks like a good start, just a few minor comments!

You'll also need to add a doc/changes/devel/13068.bugfix.rst with a message like

Fixed ICA processing of concatenated raw instances, by :newcontrib:`Firstname Lastname`.

then add your name to doc/changes/names.inc

mne/preprocessing/ica.py Outdated Show resolved Hide resolved
mne/tests/test_ica.py Outdated Show resolved Hide resolved
@BeiGeJin BeiGeJin requested a review from drammock as a code owner January 19, 2025 04:54
@BeiGeJin
Copy link
Author

Looks like a good start, just a few minor comments!

You'll also need to add a doc/changes/devel/13068.bugfix.rst with a message like

Fixed ICA processing of concatenated raw instances, by :newcontrib:`Firstname Lastname`.

then add your name to doc/changes/names.inc

Sure! I've got all these done according to your comments.

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.

ICA get_sources() can't deal with a concatenated raw object
3 participants