Skip to content
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

Projectors applied to the Epochs plot are not applied to the ERF/ERP image #95

Open
hoechenberger opened this issue Apr 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@hoechenberger
Copy link
Member

hoechenberger commented Apr 5, 2022

MWE:

# %%
import mne

sample_dir = mne.datasets.sample.data_path()
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'

raw = mne.io.read_raw_fif(sample_fname, preload=True)
raw.pick_types(meg='mag', ecg=True)

epochs = mne.preprocessing.create_ecg_epochs(
    raw=raw.filter(l_freq=0.1, h_freq=30)
)

ecg_proj, _ = mne.preprocessing.compute_proj_ecg(
    raw=raw,
    n_mag=1
)

epochs.add_proj(ecg_proj)
epochs.plot(n_channels=5, n_epochs=5)

I generate ERF images by right-clicking on a channel name, with and without the ECG projector active.

Screen.Recording.2022-04-05.at.11.59.30.mov

Expected behavior would be that the generated ERF image is based on what I can see in the browser, i.e. the traces with the ECG artifact removed via the projection.

@marsipu marsipu added the bug Something isn't working label May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants