-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add epochs_metadata_excludes #495
Closed
Closed
Conversation
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
hoechenberger
force-pushed
the
metadata-excludes
branch
from
December 31, 2021 10:21
e7cb168
to
57ba28d
Compare
hoechenberger
commented
Dec 31, 2021
hoechenberger
commented
Dec 31, 2021
hoechenberger
commented
Dec 31, 2021
hoechenberger
commented
Dec 31, 2021
couldn't you rather do:
or something like this? |
This might work, will give it a shot |
@agramfort Your proposal works, closing this PR! Thanks! |
hoechenberger
added a commit
to hoechenberger/mne-bids-pipeline
that referenced
this pull request
Jan 3, 2022
This is a rework of mne-tools#495
1 task
hoechenberger
added a commit
to hoechenberger/mne-bids-pipeline
that referenced
this pull request
Jan 3, 2022
This is a rework of mne-tools#495
hoechenberger
added a commit
that referenced
this pull request
Jan 3, 2022
* Allow epochs selection based on a metadata query This is a rework of #495 * Update docs/source/changes.md * Style
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This new setting allows for the exclusion of epochs based on metadata.
In theory this is already possible via
conditions
, but especially with lots of nested event names, this becomes very cumbersome very quickly, because the auto-generated metadata dataframe currently does not create columns for such event groupings. That is, if you have e.g. the following events:and you want to analyze all
stim
trials but exclude all epochs that have abad_response
event in the metadata. You cannot simply specify:because there won't be a column
'stim'
in the auto-generated metadata. Instead, you'd have to add each event name explicitly, and use backticks to make the forward slashes work:Now imagine doing this with even more conditions … This is not very user friendly.
Also there might be experiments where all participants get to be presented with a
stim
, but you might have groups that only get to seestim/1
andstim/2
, while others only get to seestim/3
andstim/4
. You'd have to produce differentconditions
for each group, as the columns corresponding to the not-presented stimuli would simply be missing, and the query would fail, complaining about missing columns.With this PR, the above situation can be addressed by simply specifying:
Before merging …
docs/source/changes.md
)