Skip to content

Highlight bad Epochs instead of dropping them when preload=False upon plotting #12253

@withmywoessner

Description

@withmywoessner

Describe the new feature or enhancement

Hello! I am currently working on a feature to drop Epoch based on callables in #12195, and thought it would be a nice feature to be able to see which Epochs would be dropped (since you may have complicated callables) if preload=False in the Epochs constructor.

Describe your proposed implementation

I think this could be implemented by displaying the rejected epochs instead of dropping them when plotting. For instance:

epochs = mne.Epochs(
    raw,
    events,
    tmin=-0.2,
    tmax=0.5,
    reject_tmax=0,
    reject=reject_criteria,
    flat=flat_criteria,
    reject_by_annotation=False,
    preload=False
)
epochs.plot()

Hypothetical output (Epochs in red will be dropped):
image

Describe possible alternatives

Maybe instead of this method. I can add another parameter, but I think this is too complicated.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions