[Mne_analysis] Setting up channel locations

Lidia Miguel Telega lidia.migueltelega at gmail.com
Thu Jan 17 06:58:32 EST 2019
Search archives:

        External Email - Use Caution        

Thanks for your fast answer.

This I've already tried several times but I tried again in case, but still
is not working...

when I want to do:

- ica.plot_components() I get the following error: arrays used as indices
must be of interger  or (boolean) type.

and when trying:

- ica.plot_properties(raw) I get that some electrodes have overlapping
positions even though the montage fits only 24 channels out of 53 channels
that are contained in raw.info['ch_names'] and I listed in ['bads'] 28 out
of the 53 that I do not want to use.

The ones displayed in the error as overlapped are EOGl, EOGr, EOGV, EMGChin
from which EMGChin is the only one contained in 'bads'.


The code I am using is the following one:

rawB0939=mne.io.read_raw_edf('B0939.edf',preload='data_preload')
rawB0939_copy=rawB0939.copy()

rawB0939.info['bads']=['AUX','ECG','Lage','Licht','Akku','Beweg.','EOGl:M1','EOGl:M2','EOGr:M1','C3:M2','C4:M1','Fz:M1','Oz:M1','EOGr:M2','F4:M1','O2:M1','F3:M2','O1:M2','Fz:M2','Oz:M2','Fp1:M1','Fp2:M1','T3:M1','T4:M1','P3:M1','P4:M1','F3:M1','STI
014']
rawB0939_copy.info['bads']=['AUX','ECG','Lage','Licht','Akku','Beweg.','EOGl:M1','EOGl:M2','EOGr:M1','C3:M2','C4:M1','Fz:M1','Oz:M1','EOGr:M2','F4:M1','O2:M1','F3:M2','O1:M2','Fz:M2','Oz:M2','Fp1:M1','Fp2:M1','T3:M1','T4:M1','P3:M1','P4:M1','F3:M1','STI
014']

rawB0939_copy.crop(tmin=4936,tmax=5300)
rawB0939_copy.plot()

# DOWNSAMPLING AND FILTERING CROPPED DATA #
rawB0939_copy.resample(100) # downsampling to 100 Hz ( performs LPF
followed by decimation)
rawB0939_copy.filter(l_freq=49.0,h_freq=3.0) # to perform ICA

# MONTAGE #
rawB0939_copy.set_montage('standard_1020') # 24 channels with positions
established

# ICA #
method='fastica'
ica=ICA(method=method)
print(ica)

ica.fit(rawB0939_copy)
print(ica)
ica_components=ica.get_components()

ica.plot_components(ica_components)
ica.plot_properties(rawB0939_copy)

Do you have some idea how to solve it? I am trying many things but I get
errors through all the ways.

Thanks a lot!



El mié., 16 ene. 2019 a las 16:22, Brunner, Clemens (
clemens.brunner at uni-graz.at) (<clemens.brunner at uni-graz.at>) escribió:

>         External Email - Use Caution
>
> Hi!
>
> Have you tried
>
> raw.set_montage("standard_1020")
>
> You can get all montages by
>
> mne.channels.get_builtin_montages()
>
> Use the montage that contains all (or at least most) of your channel
> names. If you have exotic names, maybe you can map them to names contained
> in one of the standard montages.
>
> Clemens
>
>
>
> > On 16.01.2019, at 15:33, Lidia Miguel Telega <
> lidia.migueltelega at gmail.com> wrote:
> >
> >         External Email - Use Caution
> >
> >
> > Hi,
> >
> > I am struggling to setting up channel locations...
> > I'd like to know if there is a way to set up automatically standardize
> channel locations from the channel names since in my raw data file I only
> have the names. I am looking for a way which does not impply to set up a
> new montage (which I tried but it did not work as some channels resulted to
> be overlapped and I think is not the proper way to do it) or load the
> positions contained in a file.
> > The result of the method I am looking for, I guess would add the
> locations to the 'dig' (digitization points) option in raw.info if I am
> right? This is the part which gives me error for all the functions I use
> (error: 'digitization points not found')
> >
> > Kind regards and thank you for the help,
> >
> > Lidia.
> >
> >
> >
> > --
> > Lidia Miguel Telega
> > M. Sc. Neuroscience
> > Albert-Ludwigs-University of Freiburg, Germany
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>


-- 
*Lidia Miguel Telega*
*M. Sc. Neuroscience*
*Albert-Ludwigs-University of Freiburg, Germany*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190117/0e5affa4/attachment.html 


More information about the Mne_analysis mailing list