forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Allow automated compilation of metadata (mne-tools#8834)
* ENH: Allow automated compilation of metadata This adds mne.epochs.make_metadata(), which allows for the automated construction of metadata for use in Epochs. The users passes an events array, an event name -> event ID mapping, a time period and sampling frequency. This function will then iterate over all events specified in the mapping, determine which events fall into the specified time period (relative to the currently time-locked event), and will add them to the metadata. * Apply suggestions from code review Co-authored-by: Eric Larson <[email protected]> * Allow passing params by position * Fix typo & add versionadded * Add more functionality * Cleanup, remove HED redundancy in event names, small fixes * Add ERP-CORE dataset * Add tutorial * Add topoplot to tutorial * Fix doc build * Add noqa: D103 * Remove cell marker * Clarify keep_first docstring [skip azp][skip github] * Phrasing [skip azp][skip github] * Formatting [skip azp][skip github] * Remove trailing space * Rework docstring [skip azp][skip github] * Improve event_id param docstring [skip azp][skip github] * More docstring improvements [skip azp][skip github] * Fix indentation [skip azp][skip github] * Phrasing [skip azp][skip github] * Misc tutorial improvements [skip azp][skip github] * Improve tutorial [skip azp][skip github] * Improve docstring [skip azp][skip github] * Slightly alter tutorial flow [skip azp][skip github] * Correct typos & phrasing, as suggested in code review [skip azp][skip github] * Apply some suggestions by @drammock Co-authored-by: Daniel McCloy <[email protected]> * Move paragraph to Notes section [skip azp][skip github] * time_locked_events -> row_events; time period -> time window; doc improvements * Optimzations, use df.itertuples(), improve tests * flake * Apply suggestions from review by @cbrnr [skip github][skip azp] Co-authored-by: Clemens Brunner <[email protected]> * Remove cruft * WIP: Implement changes as per discussion * Apply a bunch of suggestions from code review by @drammock Co-authored-by: Daniel McCloy <[email protected]> * Adjust tutorial to use new column names * Style & docstring fixes * Bug fixes & fixes to tests * Final fixes to toturial * Add missing blank line * Style * Enable Circle pre-fetch of ERP CORE * Add changelog entry [skip azp][skip github] Co-authored-by: Eric Larson <[email protected]> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: Clemens Brunner <[email protected]>
- Loading branch information
1 parent
0135fca
commit 91f6081
Showing
15 changed files
with
895 additions
and
10 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
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 |
---|---|---|
|
@@ -39,3 +39,4 @@ Datasets | |
phantom_4dbti.data_path | ||
refmeg_noise.data_path | ||
ssvep.data_path | ||
erp_core.data_path |
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 |
---|---|---|
|
@@ -53,3 +53,4 @@ Events | |
average_movements | ||
combine_event_ids | ||
equalize_epoch_counts | ||
make_metadata |
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
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,3 @@ | ||
"""ERP-CORE EEG dataset.""" | ||
|
||
from .erp_core import data_path, get_version |
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,26 @@ | ||
from functools import partial | ||
|
||
from ...utils import verbose | ||
from ..utils import (has_dataset, _data_path, _data_path_doc, | ||
_get_version, _version_doc) | ||
|
||
has_erp_core_data = partial(has_dataset, name='erp_core') | ||
|
||
|
||
@verbose | ||
def data_path(path=None, force_update=False, update_path=True, | ||
download=True, verbose=None): # noqa: D103 | ||
return _data_path(path=path, force_update=force_update, | ||
update_path=update_path, name='erp_core', | ||
download=download) | ||
|
||
|
||
data_path.__doc__ = _data_path_doc.format(name='erp_core', | ||
conf='MNE_DATASETS_ERP_CORE_PATH') | ||
|
||
|
||
def get_version(): # noqa: D103 | ||
return _get_version('erp_core') | ||
|
||
|
||
get_version.__doc__ = _version_doc.format(name='erp_core') |
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.