Skip to content
New issue

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

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

Already on GitHub? # to your account

ADD Apply ICA function #43

Merged
merged 9 commits into from
Jul 5, 2019
Merged

ADD Apply ICA function #43

merged 9 commits into from
Jul 5, 2019

Conversation

vferat
Copy link
Contributor

@vferat vferat commented Jul 4, 2019

Fixes #40 @cbrnr & @mmagnuski can you test if if works for you ?

@vferat vferat changed the title Apply ICA #40 ADD Apply ICA Jul 4, 2019
@vferat vferat changed the title ADD Apply ICA ADD Apply ICA function Jul 4, 2019
ica = mne.preprocessing.ICA(method=dialog.methods[method],
fit_params=fit_params)
self.model.history.append("ica = mne.preprocessing.ICA("
Copy link
Owner

Choose a reason for hiding this comment

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

It is better if all string parts are f-strings

@@ -509,8 +517,16 @@ def run_ica(self):
pool.terminate()
else:
self.model.current["ica"] = res.get(timeout=1)
self.model.history.append("ica.fit(inst=raw, "
Copy link
Owner

Choose a reason for hiding this comment

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

Same here, please make all lines f-strings

@@ -194,7 +194,8 @@ def __init__(self, model):
self.find_events)
self.actions["run_ica"] = tools_menu.addAction("Run &ICA...",
self.run_ica)

self.actions["apply_ica"] = tools_menu.addAction("Apply &ICA...",
Copy link
Owner

Choose a reason for hiding this comment

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

Remove the "..." (which is only used if a dialog window will pop up)

@cbrnr
Copy link
Owner

cbrnr commented Jul 5, 2019

Currently, you can only mark bad ICs with "Plot ICA components", which requires a montage. It would be nice if you could mark bad ICs also with the "Plot ICA sources" by clicking on the IC label or IC trace (just like it is possible with Plot raw). This is something MNE should implement and not MNELAB, so I'm going to open an issue there.

@vferat
Copy link
Contributor Author

vferat commented Jul 5, 2019

Currently, you can only mark bad ICs with "Plot ICA components", which requires a montage. It would be nice if you could mark bad ICs also with the "Plot ICA sources" by clicking on the IC label or IC trace (just like it is possible with Plot raw). This is something MNE should implement and not MNELAB, so I'm going to open an issue there.

You can mark ICs with "Plot ICA sources" by clicking on the IC trace, in my case , it becomes red and is rejected when applying ICA. After applying, the source is set to 0

@cbrnr
Copy link
Owner

cbrnr commented Jul 5, 2019

OK, true, but it is still not consistent because clicking on the IC label should also mark it bad. Currently, it tries to open a topomap, which is not possible if there is no montage.

@vferat
Copy link
Contributor Author

vferat commented Jul 5, 2019

Yes I agree . As you said, the issue should be resolve in MNE repo.
The problem is to be consistent both with "raw.plot" and "ica_plot_components" in a way that can easly displays topomaps if available

@cbrnr cbrnr merged commit 372ce6f into cbrnr:master Jul 5, 2019
@cbrnr
Copy link
Owner

cbrnr commented Jul 5, 2019

Thanks @vferat!

@mmagnuski mmagnuski mentioned this pull request Jul 5, 2019
5 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply ICA
3 participants