Skip to content

Conversation

@BeiGeJin
Copy link
Contributor

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.

@welcome
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

@BeiGeJin BeiGeJin requested a review from drammock as a code owner January 19, 2025 04:54
@BeiGeJin
Copy link
Contributor 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.

BeiGeJin and others added 2 commits January 21, 2025 18:05
* upstream/main: (230 commits)
  FIX: Fix ICA.apply when fitted including marked bad channels (mne-tools#13478)
  FIX: Correctly set the calibration factor in Nihon Kohden reader (mne-tools#13468)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13479)
  MAINT: Update code credit (mne-tools#13477)
  Fix `versionadded` directive formatting (mne-tools#13471)
  typo in mailmap (mne-tools#13475)
  FIX: Fix _plot_topomap channel names plotting when using a mask (mne-tools#13470)
  FIX: Handle an Eyelink File with blank lines injected throughout file (mne-tools#13469)
  ENH: adds annotation filtering to raw and ica source figures (mne-tools#13460)
  MAINT: Restore VTK nightly wheel on Linux and bump changelog checker (mne-tools#13436)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13465)
  FIX: Fix add_reference_channels for passing two channels names (mne-tools#13466)
  ENH: Add on_missing for combine_channels (mne-tools#13463)
  Bump the actions group with 2 updates (mne-tools#13464)
  Move development dependencies into a dependency group (no more extra) (mne-tools#13452)
  ENH: add on_missing for rename_channels (mne-tools#13456)
  add advisory board to website (mne-tools#13462)
  ENH: Support Nihon Kohden EEG-1200A V01.00 (mne-tools#13448)
  MAINT: Update dependency specifiers (mne-tools#13459)
  ENH: Add encoding parameter to Nihon Kohden reader (mne-tools#13458)
  ...
@larsoner
Copy link
Member

larsoner commented Nov 5, 2025

@BeiGeJin sorry we missed this one, we don't get notified when people push commits so didn't realize you had addressed our comments! I merged upstream/main into this branch, confirmed the test fails on main but passes on this PR, and will mark this for merge-when-green. Thanks in advance!

@larsoner larsoner enabled auto-merge (squash) November 5, 2025 18:24
@larsoner larsoner merged commit b259e59 into mne-tools:main Nov 5, 2025
32 checks passed
@welcome
Copy link

welcome bot commented Nov 5, 2025

🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪

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