[Mne_analysis] Problem including reference electrode in info['chs'][.]['loc']

Emily Stephen emilyps14 at gmail.com
Thu Dec 10 17:34:51 EST 2015
Search archives:

Yes. Well, in the old data the average reference projector's active
property is set to 'on', and in my data it is set to 'off'.

I tried running mne.io.proj.activate_proj to make it active in the new
data, and it did not affect the lead field matrix. Is there some other way
to activate the proj?

Emily

On Thu, Dec 10, 2015 at 5:30 PM, Hari Bharadwaj <hari at nmr.mgh.harvard.edu>
wrote:

> Hi Emily,
>     My immediate thought is.. do you have an average reference projector
> that is being applied in one case and not the other?
>
> Hari
>
> On Thu, December 10, 2015 5:25 pm, Emily Stephen wrote:
> > Hi Again,
> >
> > I've been debugging my code by comparing an EEG forward model that I
> > constructed using MNE python to one constructed by a former labmate using
> > MNE C. The lead field matrices are different, even when I use identical
> > source space, BEM solution, and transformation file.
> >
> > I've narrowed down the problem to info['chs'][...]['eeg_loc'], which in
> > the
> > old data is 3x2, with the second column having the location of the
> > reference electrode. In my data, eeg_loc is 3x1, with no information
> about
> > the location of the reference electrode. The information in this second
> > column appears to be used by _bem_specify_els, which loops over the
> > columns
> > of the electrode location matrix.
> >
> > I've played around a bit with add_reference_channels and
> > set_eeg_reference,
> > but neither of them changes the second column in eeg_loc for the
> > non-reference electrodes. The location of the reference electrode is
> > specified in my montage file (hpts), but there doesn't seem to be a way
> to
> > apply it to the eeg_loc of all of the other electrodes.
> >
> > This is what I thought might have worked, but it seems to just add
> another
> > electrode, without influencing the chs of the other electrodes:
> > montage = mne.channels.read_montage(montage_hpts, transform=True,
> > unit='mm')
> > raw = mne.io.read_raw_fif(rawfile,preload=True)
> > mne.io.add_reference_channels(raw,'EEG000',copy=False)
> > raw.set_montage(montage)
> > mne.io.set_eeg_reference(raw,['EEG000'],copy=False)
> >
> > Thoughts?
> >
> > Thanks,
> > Emily
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> --
> Hari Bharadwaj
> Research Fellow
> Martinos Center for Biomedical Imaging,
> Massachusetts General Hospital
> 149 Thirteenth Street,
> Charlestown, MA 02129
>
> hari at nmr.mgh.harvard.edu
> Ph: 734-883-5954
> www.haribharadwaj.com
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20151210/a068e766/attachment.html 


More information about the Mne_analysis mailing list