question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ica.get_sources has strange ch_names and ch_type

See original GitHub issue

After calling ica.get_source() with a Raw object I noticed that

  • the ch_names “ICA 001” start by 1 instead of 0 (which is not consistent)
  • I couldn’t plot it right, as the ch_type for scaling is not clear (it seems to be misc, but I couldn’t find any documentation about it)

I would suggest to let the ICAs start by 0 everywhere. Remove the +1 here: https://github.com/mne-tools/mne-python/blob/master/mne/preprocessing/ica.py#L798

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Jun 15, 2017

So over in #4320 the crushing weight of a half dozen (or more) opened issues/PRs about this issue has caused @agramfort to have a change of heart to accept the possibility of naming channels as ICA 000+. It creates inconsistency with other channel names, but IMO (and maybe @agramfort has come around to it, now, too) this is less bad / create fewer problems than our current solution, where most users are confused by our ICA interface.

@dengemann @jona-sassenhagen @jasmainak @mmagnuski are you okay with this change?

@mmagnuski would you perhaps be up for making a PR?

1reaction
mmagnuskicommented, Jan 10, 2017

I also think that ic numbering inconsistency is counterintuitive (and changing the docs won’t change the intuitions 😉 ). ica.plot_sources plots sources with names in IC #000 convention - which is good as it makes comparisons between plot_components and plot_sources easier, but further increases surprise when ica.get_sources().plot() gives other labels (ICA 001). If channel labels must of form ICA 001 - then maybe ICA plotting functions should print ICA 001 instead of the index? Or maybe both should change to IC 001? 😈

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found