[Mne_analysis] Convert brainstorm channel .xyz file or sfp file into mne raw fif

Liu, Feng FLIU0 at mgh.harvard.edu
Thu Dec 6 21:13:45 EST 2018
Search archives:

Sorry that I think it is more helpful to post the error message.


montage = mne.channels.read_montage( '/home/scratch/brainstorm_db/Protocol01/data/106a_recon/BioSemi_128_A01.sfp')
raw.set_montage(montage=montage)

ValueError: None of the sensors defined in the montage were found in the info structure. Check the channel names.

This is the structure of raw.info:

<Info | 19 non-empty fields
    bads : list | MEG 2443, EEG 053
    ch_names : list | MEG 0113, MEG 0112, MEG 0111, MEG 0122, MEG 0123, ...
    chs : list | 376 items (GRAD: 204, MAG: 102, STIM: 9, EEG: 60, EOG: 1)
    comps : list | 0 items


I think when I use setup_montage, it will check the original channel names, it will assign the value only if the name under montage match the name under raw.info['ch_names']. So do I need to delete all the raw.info['ch_names'] and re-assign channels names?


Best,

Feng Liu

________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Liu, Feng <feng.liu at mavs.uta.edu>
Sent: Thursday, December 6, 2018 8:55:39 PM
To: Alexandre Gramfort; Discussion and support forum for the users of MNE Software
Subject: Re: [Mne_analysis] Convert brainstorm channel .xyz file or sfp file into mne raw fif


        External Email - Use Caution

Hi Alex,

Thank you for your reply.  I can read sfp files using raw.set_montage, do you know should I manually replace the raw.info with the montage information, in the end, I want to build the forward model using mne.make_forward_solution(), as you know this function requires raw.info as a mandatory input. I thought there should be a link from montage to raw.info.

Best regards,
Feng
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Alexandre Gramfort <alexandre.gramfort at inria.fr>
Sent: Thursday, December 6, 2018 1:31 PM
To: Discussion and support forum for the users of MNE Software
Subject: Re: [Mne_analysis] Convert brainstorm channel .xyz file or sfp file into mne raw fif

        External Email - Use Caution

see:

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmartinos.org%2Fmne%2Fdev%2Fgenerated%2Fmne.channels.read_montage.html&amp;data=02%7C01%7Cfeng.liu%40mavs.uta.edu%7Ccb95432d21b947f4d5ba08d65bb16de0%7C5cdc5b43d7be4caa8173729e3b0a62d9%7C0%7C0%7C636797214942900171&amp;sdata=j6ayJB%2BsHBO8nHke9L2vXXa5s3GH%2Ba%2B%2BWGOerPRZmdQ%3D&amp;reserved=0

and then

raw.set_montage

should do the job.

HTH
Alex
On Thu, Dec 6, 2018 at 6:04 PM Liu, Feng <feng.liu at mavs.uta.edu> wrote:
>
>         External Email - Use Caution
>
> Dear MNE community,
>
>
> I want to use a set of electrode channel locations for my subjects. I have channel location files in format of .xyz and .sfp generated from brainstorm (already coregistered), does anyone know how to convert to fif file? I can setup montage by reading sfp files, but I don't know how to replace the  raw.info using the montage information. Also how to get the trans.fif file?
>
>
> Thank you very much for your time
>
>
> Best,
>
>
> Feng Liu
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&amp;data=02%7C01%7Cfeng.liu%40mavs.uta.edu%7Ccb95432d21b947f4d5ba08d65bb16de0%7C5cdc5b43d7be4caa8173729e3b0a62d9%7C0%7C0%7C636797214942900171&amp;sdata=ue0eTdONtUeNHUGowMrYXPGO%2Fu3QZKCvVk3UeJjChfs%3D&amp;reserved=0

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&amp;data=02%7C01%7Cfeng.liu%40mavs.uta.edu%7Ccb95432d21b947f4d5ba08d65bb16de0%7C5cdc5b43d7be4caa8173729e3b0a62d9%7C0%7C0%7C636797214942900171&amp;sdata=ue0eTdONtUeNHUGowMrYXPGO%2Fu3QZKCvVk3UeJjChfs%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181207/079e9b46/attachment-0001.html 


More information about the Mne_analysis mailing list