Skip to content

Ignoring bads in raw.plot_psd doesn't work #6637

@cbrnr

Description

@cbrnr

By default, raw.plot_psd() excludes bad channels. According to the docs, I can include bad channels by setting picks="all", but this doesn't work:

import mne
from mne.datasets import sample


data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_raw.fif'
raw = mne.io.read_raw_fif(raw_fname, preload=True)

raw.drop_channels(raw.info["ch_names"][:315])
raw.drop_channels(raw.info["ch_names"][4:])
raw.info["bads"] = ['EEG 003', 'EEG 004']

raw.plot_psd(spatial_colors=False)
raw.plot_psd(spatial_colors=False, picks="all")

Both plots only show the traces for the good channels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions