create_ecg_epochs with mne-12

Hello mne developers,

I upgraded to mne-12 by
% pip install --upgrade --user mne

(although the output indicates that in this way I installed mne-0.11.0
...? See below )

Dear Elena,

This may be due to this bug fix:

https://github.com/mne-tools/mne-python/pull/3055/files

Previously, a synthetic ecg channel was incorrectly created even when the
ecg channel was set by the user.

To check that the `create_ecg_epochs` function works on your computer, try:

from mne.io import Raw
from mne.preprocessing import create_ecg_epochs
from mne.datasets import sample

data_path = sample.data_path()
fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
raw = Raw(fname, preload=True)

ecg_epochs = create_ecg_epochs(raw, tmin=-.15, tmax=.4,
                               l_freq=1.0, h_freq=20.0,
                               reject=dict(grad=4000e-13),
                               ch_name=None, picks=None)

I haven't been able to reproduce your error, so I suspect that there is
something wrong with your raw. Can you report us

raw._data.shape
raw.ch_names
reject
picks

Best,

Jean-R?mi

Dear Jean-Remi,

Below is information you asked for.
MEG channels are 0 to 305.

Elena

Elena,

Did the snippet that I wrote worked on your machine? If so, there is an
issue with your Raw object. Else, there may be a problem with mne
installation.

If you don't find the source of the error, may I suggest you to open an
issue on Github?
https://github.com/mne-tools/mne-python/issues/new

It will be easier to track it down without overloading the mailing list.

All the best,

JR