-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MRG: Update repository structure (#21)
* more iclabel to a 'icabel' submodule and add '_' to all private function/class * add entrypoints to iclabel and to mne_icalabel * black * fix missed * rename to label_components * add tests * fix resample_poly that requires up and down as integers * sort imports with isort * run sort and black * fix for resampling * run black * simpler
- Loading branch information
1 parent
7bf7956
commit 32edd7d
Showing
62 changed files
with
287 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
# License: BSD (3-clause) | ||
|
||
__version__ = "0.1dev0" | ||
|
||
from .label_components import label_components # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"""ICLabel - An automated electroencephalographic independent component | ||
classifier, dataset, and website. | ||
This is a python implementation of the EEGLAB plugin 'ICLabel'.""" | ||
|
||
from .features import get_features # noqa: F401 | ||
from .label_components import label_components # noqa: F401 | ||
from .network import ICLabelNet, run_iclabel # noqa: F401 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from typing import Union | ||
|
||
from mne import BaseEpochs | ||
from mne.io import BaseRaw | ||
from mne.preprocessing import ICA | ||
|
||
from .features import get_features | ||
from .network import run_iclabel | ||
|
||
|
||
def label_components(inst: Union[BaseRaw, BaseEpochs], ica: ICA): | ||
""" | ||
Label the provided ICA components with the ICLabel neural network. This | ||
network uses 3 features: | ||
- Topographic maps, based on the ICA decomposition. | ||
- Power Spectral Density (PSD), based on the ICA decomposition and the | ||
provided instance. | ||
- Autocorrelation, based on the ICA decomposition and the provided | ||
instance. | ||
Parameters | ||
---------- | ||
inst : Raw | Epochs | ||
Instance used to fit the ICA decomposition. The instance should be | ||
referenced to a common average and bandpass filtered between 1 and | ||
100 Hz. | ||
ica : ICA | ||
ICA decomposition of the provided instance. | ||
""" | ||
features = get_features(inst, ica) | ||
labels = run_iclabel(*features) | ||
return labels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.