-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
mnelab/mainwindow.py
Outdated
ica = mne.preprocessing.ICA(method=dialog.methods[method], | ||
fit_params=fit_params) | ||
self.model.history.append("ica = mne.preprocessing.ICA(" |
There was a problem hiding this comment.
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
mnelab/mainwindow.py
Outdated
@@ -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, " |
There was a problem hiding this comment.
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
mnelab/mainwindow.py
Outdated
@@ -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...", |
There was a problem hiding this comment.
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)
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 |
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. |
Yes I agree . As you said, the issue should be resolve in MNE repo. |
Thanks @vferat! |
Fixes #40 @cbrnr & @mmagnuski can you test if if works for you ?