-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
implement channel specific epoch rejection #12219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CarinaFo
wants to merge
100
commits into
mne-tools:main
Choose a base branch
from
CarinaFo:channel_specific_epoch_rejection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+172
−10
Open
Changes from all commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
d7ccfd4
function to reject epochs per channel
CarinaFo f94c7e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 32a87f8
added masked data to channel specific rejection
CarinaFo 8fccf71
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo 6e6c4a4
added masked data to function and to return
CarinaFo 7da2ab5
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 300ce43
updated epochs.average with np.nanmean
CarinaFo afd2c8e
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo f5804ab
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 880d157
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo afed69d
Update mne/epochs.py
CarinaFo 194c83a
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo e054119
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo f742c1e
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo b74d4de
updated changelog for PR11776
CarinaFo cbd7083
updated github account name
CarinaFo 8a3eea5
resolve merge conflict - forgot to pull before adding to changelog
CarinaFo eb6ac3d
added contribution to changelog
CarinaFo 7d17f89
added second PR number to close both
CarinaFo c84bebb
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo 9e00065
Merge branch 'mne-tools:main' into channel_specific_epoch_rejection
CarinaFo 0c20484
Merge branch 'mne-tools:main' into channel_specific_epoch_rejection
CarinaFo 0d03885
deleted bad epochs function
CarinaFo e16cf74
added interpolate bad epochs method
CarinaFo b00f2b0
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo 0cb0ed5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8a2f95b
fixed bug in interpolate epochs method
CarinaFo 3e9435b
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo 341fd25
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 1e2252e
added interpolate bad epochs nan to interpolate_bads function
CarinaFo dfbba00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] cc58b73
removed interpolate bad epochs from interpolate_bads due to MixinClass
CarinaFo 167f38c
removed interpolate bad epochs
CarinaFo 4e675cc
added set bad epochs to NaN method for epochs class
CarinaFo 3b5d67b
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo 2868197
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7fc2be1
removed return statement (operates in-place)
CarinaFo 91302bb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b22cf11
deleted epoch based rejection from doc string
CarinaFo b011e6a
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo c794710
DW initial revisions
dominikwelke a27b135
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo f2ea3c4
Merge branch 'mne-tools:main' into channel_specific_epoch_rejection
CarinaFo 7feea14
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo 1856286
Merge branch 'channel_specific_epoch_rejection' of github.com:CarinaF…
CarinaFo caac9f4
Merge pull request #3 from dominikwelke/carinafo/channel_specific_epo…
CarinaFo fa9567a
fixed docstring
CarinaFo 4abf7fd
fixed dostring set_bad_epochs_to_NaN
CarinaFo 7f707e7
Merge branch 'mne-tools:main' into channel_specific_epoch_rejection
CarinaFo 2a5e271
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 5d048a8
clean up channel specific epoch rejection function
CarinaFo 6e9753e
clean up channel specific epoch rejection function, renamed function
CarinaFo 900ea35
included nave updates
CarinaFo 610aae8
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo d44a602
after pre-commit hooks
CarinaFo e92adb7
basic testing of drop bad epochs
CarinaFo 970a66d
changelog
CarinaFo ab6cef7
Update mne/channels/channels.py
CarinaFo b8b9984
Update doc/changes/dev/12219.newfeature.rst
CarinaFo a158f5d
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo ce4a1a5
replaced lit with boolean mask
CarinaFo 6a9d3b8
added time dimension to mask and forced array to boolean, afterpre co…
CarinaFo d493db1
updated basic test function
CarinaFo d967b00
fixed failed tests
CarinaFo 86cb361
droppped nave attribute (should be in evoked)
CarinaFo 174e3fa
added reject mask as attribute and nave_per_channel
CarinaFo ab4d295
added nave_per_channel to evoked from epoch after pre commit
CarinaFo 9c9f643
fixed bug
CarinaFo d34ec0e
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 7f47d19
fix bug in test
CarinaFo fdc03c0
Merge branch 'channel_specific_epoch_rejection' of https://github.com…
CarinaFo 30ee239
fixed another bug
CarinaFo 008aed9
added return docstring
CarinaFo 0afca43
fix contributor name
CarinaFo f72066c
contributer name
CarinaFo a2de721
update changelog
CarinaFo 80b4500
added baseline to evoked_from epoch_data (fix test failure)
CarinaFo 2bd5cbb
fixed channel picks test failure
CarinaFo 32d2f05
fixed test length of channels after averaging
CarinaFo 819ec7a
added nave_per_channel to evoked
CarinaFo 674fd7a
undid change to evoked
CarinaFo 432d072
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 69ab83c
Merge branch 'channel_specific_epoch_rejection' of https://github.com…
CarinaFo ace7912
updated docstring
CarinaFo 5dd5f77
docstring (no types in inputs)
CarinaFo 4c70c09
fix bug in evoked_from_epoch_data
CarinaFo fc5b343
add nave_per_channel to pick function
CarinaFo f723b6e
name change
CarinaFo 316d8f5
renamed test function and fixed some bugs
CarinaFo 30be959
revert to fix bug in other epochs test functions (baseline correction…
CarinaFo c3c6bb3
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo cc7204e
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo d4d3ddf
included test for None in drop_bad_channels
CarinaFo 05377b4
increase code coverage
CarinaFo 7490dc4
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo ff4f912
create nave matrix
CarinaFo 9092281
Merge branch 'main' into channel_specific_epoch_rejection
CarinaFo 7e227a0
Merge branch 'channel_specific_epoch_rejection' of https://github.com…
CarinaFo 5eeef54
check for attribute
CarinaFo d224e67
included None
CarinaFo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,9 @@ | ||
| Add drop_bad_epochs method to :class:mne.Epochs for channel-specific epoch rejection | ||
|
|
||
| This method allows users to mark bad epochs on a per-channel basis by setting | ||
| them to NaN. The | ||
| nave and | ||
| nave_per_channel attributes for evokeds are updated | ||
| accordingly to reflect the number of valid epochs per channel. | ||
|
|
||
| Contributed by `Carina Forster`_. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
perhaps add smth like:
assert ev == ep.average(pick=ch_subset)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.
not sure if we have to test that here (I think this is covered in the test for averaging epochs)