-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy: braindecode/braindecode@0c205e2
- Loading branch information
1 parent
389810a
commit 2390df7
Showing
160 changed files
with
1,366 additions
and
2,209 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 9ec5c1237f59370fcf4be3165728dd0a | ||
config: dfa3b204b4ec02ee979e4bf266ee2b9c | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file modified
BIN
+156 Bytes
(100%)
dev/_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip
Binary file not shown.
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
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Author: Lukas Gemein <[email protected]>\n#\n# License: BSD (3-clause)\n\nimport tempfile\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport mne\n\nfrom braindecode.datasets import TUH\nfrom braindecode.preprocessing import (\n preprocess, Preprocessor, create_fixed_length_windows, scale as multiply)\n\nmne.set_log_level('ERROR') # avoid messages every time a window is extracted" | ||
"# Author: Lukas Gemein <[email protected]>\n#\n# License: BSD (3-clause)\n\nimport tempfile\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport mne\n\nfrom braindecode.datasets import TUH\nfrom braindecode.preprocessing import (\n preprocess, Preprocessor, create_fixed_length_windows)\nfrom numpy import multiply\n\nmne.set_log_level('ERROR') # avoid messages every time a window is extracted" | ||
] | ||
}, | ||
{ | ||
|
@@ -123,7 +123,7 @@ | |
}, | ||
"outputs": [], | ||
"source": [ | ||
"def custom_rename_channels(raw, mapping):\n # rename channels which are dependent on referencing:\n # le: EEG 01-LE, ar: EEG 01-REF\n # mne fails if the mapping contains channels as keys that are not present\n # in the raw\n reference = raw.ch_names[0].split('-')[-1].lower()\n assert reference in ['le', 'ref'], 'unexpected referencing'\n reference = 'le' if reference == 'le' else 'ar'\n raw.rename_channels(mapping[reference])\n\n\ndef custom_crop(raw, tmin=0.0, tmax=None, include_tmax=True):\n # crop recordings to tmin \u2013 tmax. can be incomplete if recording\n # has lower duration than tmax\n # by default mne fails if tmax is bigger than duration\n tmax = min((raw.n_times - 1) / raw.info['sfreq'], tmax)\n raw.crop(tmin=tmin, tmax=tmax, include_tmax=include_tmax)\n\n\ntmin = 1 * 60\ntmax = 6 * 60\nsfreq = 100\n\npreprocessors = [\n Preprocessor(custom_crop, tmin=tmin, tmax=tmax, include_tmax=False,\n apply_on_array=False),\n Preprocessor('set_eeg_reference', ref_channels='average', ch_type='eeg'),\n Preprocessor(custom_rename_channels, mapping=ch_mapping,\n apply_on_array=False),\n Preprocessor('pick_channels', ch_names=short_ch_names, ordered=True),\n Preprocessor(multiply, factor=1e6, apply_on_array=True),\n Preprocessor(np.clip, a_min=-800, a_max=800, apply_on_array=True),\n Preprocessor('resample', sfreq=sfreq),\n]" | ||
"def custom_rename_channels(raw, mapping):\n # rename channels which are dependent on referencing:\n # le: EEG 01-LE, ar: EEG 01-REF\n # mne fails if the mapping contains channels as keys that are not present\n # in the raw\n reference = raw.ch_names[0].split('-')[-1].lower()\n assert reference in ['le', 'ref'], 'unexpected referencing'\n reference = 'le' if reference == 'le' else 'ar'\n raw.rename_channels(mapping[reference])\n\n\ndef custom_crop(raw, tmin=0.0, tmax=None, include_tmax=True):\n # crop recordings to tmin \u2013 tmax. can be incomplete if recording\n # has lower duration than tmax\n # by default mne fails if tmax is bigger than duration\n tmax = min((raw.n_times - 1) / raw.info['sfreq'], tmax)\n raw.crop(tmin=tmin, tmax=tmax, include_tmax=include_tmax)\n\n\ntmin = 1 * 60\ntmax = 6 * 60\nsfreq = 100\nfactor = 1e6\n\npreprocessors = [\n Preprocessor(custom_crop, tmin=tmin, tmax=tmax, include_tmax=False,\n apply_on_array=False),\n Preprocessor('set_eeg_reference', ref_channels='average', ch_type='eeg'),\n Preprocessor(custom_rename_channels, mapping=ch_mapping,\n apply_on_array=False),\n Preprocessor('pick_channels', ch_names=short_ch_names, ordered=True),\n Preprocessor(lambda data: multiply(data, factor), apply_on_array=True), # Convert from V to uV\n Preprocessor(np.clip, a_min=-800, a_max=800, apply_on_array=True),\n Preprocessor('resample', sfreq=sfreq),\n]" | ||
] | ||
}, | ||
{ | ||
|
Binary file modified
BIN
+160 Bytes
(100%)
dev/_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip
Binary file not shown.
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-768 Bytes
(97%)
dev/_images/sphx_glr_plot_benchmark_preprocessing_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.