[Mne_analysis] Fwd: Problems with interpolation (newbie question)

Victor Ferat victor.ferat at fcbg.ch
Tue Aug 27 11:31:52 EDT 2019
Search archives:

        External Email - Use Caution        

Hi Егор,

You may need to set the electrode positions with raw.set_montage<https://martinos.org/mne/dev/generated/mne.io.Raw.html#mne.io.Raw.set_montage>(montage=montage)
You can use montage = mne.channels.read_montage<https://martinos.org/mne/dev/generated/mne.channels.read_montage.html> to load built-in montage or create your own one using the class Montage<https://martinos.org/mne/dev/generated/mne.channels.Montage.html#mne.channels.Montage>

Victor


________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Егор Сысоев <egor.sysoev2002 at gmail.com>
Sent: Tuesday, August 27, 2019 5:17 PM
To: mne_analysis at nmr.mgh.harvard.edu <mne_analysis at nmr.mgh.harvard.edu>
Subject: [Mne_analysis] Fwd: Problems with interpolation (newbie question)


        External Email - Use Caution

Hi everybody,
Earlier I asked about a problem I was having with interpolation of EEG channels and one of the answers fixed my problem (.pick_types(eeg=True, exclude=())). However, there is apparently another problem with the same thing.
The error is:

ValueError: Could not extract channel positions for 72 channels


Here is a simplified version of the code, which still gives the same error:

import mne
data = '...\\NPh1.bdf' #path to file
raw = mne.io.read_raw_bdf(data, preload=True)

Info = raw.info<http://raw.info>
Info['bads'] = ['FC3']

raw.copy().pick_types(eeg=True, exclude=()).interpolate_bads()

The raw.info<http://raw.info> can be seen in the forwarded message below.

---------- Forwarded message ---------
От: Егор Сысоев <egor.sysoev2002 at gmail.com<mailto:egor.sysoev2002 at gmail.com>>
Date: чт, 22 авг. 2019 г. в 23:12
Subject: Problems with interpolation (newbie question)
To: <mne_analysis at nmr.mgh.harvard.edu<mailto:mne_analysis at nmr.mgh.harvard.edu>>


Hi everybody,
I'm new to MNE analysis. I'm trying to interpolate bad channels in EEG (BioSemi) data, but there seems to be an error.
The raw.info<http://raw.info> looks like this:

<Info | 16 non-empty fields
    bads : list | FC3
    ch_names : list | Fp1, AF7, AF3, F1, F3, F5, F7, FT7, FC5, ...
    chs : list | 73 items (EEG: 72, STIM: 1)
    comps : list | 0 items
    custom_ref_applied : bool | False
    dev_head_t : Transform | 3 items
    events : list | 0 items
    highpass : float | 0.0 Hz
    hpi_meas : list | 0 items
    hpi_results : list | 0 items
    lowpass : float | 104.0 Hz
    meas_date : tuple | 2015-09-01 13:51:14 GMT
    nchan : int | 73
    proc_history : list | 0 items
    projs : list | 0 items
    sfreq : float | 512.0 Hz
    acq_pars : NoneType
    acq_stim : NoneType
    ctf_head_t : NoneType
    description : NoneType
    dev_ctf_t : NoneType
    dig : NoneType
    experimenter : NoneType
    file_id : NoneType
    gantry_angle : NoneType
    hpi_subsystem : NoneType
    kit_system_id : NoneType
    line_freq : NoneType
    meas_id : NoneType
    proj_id : NoneType
    proj_name : NoneType
    subject_info : NoneType
    xplotter_layout : NoneType
>


 And the error\warning when I write "raw.copy().pick_types(eeg=True).interpolate_bads()" is this:


<ipython-input-21-28f155242753>:1: RuntimeWarning: No bad channels to interpolate. Doing nothing...
  raw.copy().pick_types(eeg=True).interpolate_bads()

 As can be seen from the raw.info<http://raw.info>, there is one bad channel, and I can't figure out what the problem is.


Best regards,

Egor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190827/ec698fd9/attachment-0001.html 


More information about the Mne_analysis mailing list