Topomap with Brainvision EEG data

Hello List,
I am trying to port all my Matlab analysis scripts into python and have trouble making a topomap with EEG data collected from a Brainvision system.
I am trying to use mne.viz.plot_topomap() with the channel location information that I know works with eeglab topoplot.
The resulting plot doesn't match the topomap I make with Matlab.
Any help to resolve this is much appreciated.
I am using mne version 0.9 from github.
Thanks!
-Lakshmi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141030/2098d92d/attachment.html

Hi Lakshmi,

could you possibly share data snippets, an example script and maybe the
different figures that you see?
Otherwise it will be difficult to understand what's wrong.

--Denis

2014-10-30 14:23 GMT+01:00 Lakshmi Krishnan <lakshmik at umd.edu>:

Hello List,
I am trying to port all my Matlab analysis scripts into python and have
trouble making a topomap with EEG data collected from a Brainvision system.
I am trying to use mne.viz.plot_topomap() with the channel location
information that I know works with eeglab topoplot.
The resulting plot doesn't match the topomap I make with Matlab.
Any help to resolve this is much appreciated.
I am using mne version 0.9 from github.
Thanks!
-Lakshmi

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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/20141030/20dcef78/attachment.html

Hi Denis,
Here is the link to sample sample scripts and figures for generating the topomap with a eeglab utility function and mne-python.

https://copy.com/djUllqUXi3lfSaiV

The matlab topoplot matches the figures provided by Brain vision in their documentation.I would be happy to use any other channel location file that's known to work with Brain Vision EEG data.
Thanks!
-Lakshmi

Hi Lakshmi,

Generally it would be better to use actual data, not randomly generated
data to compare both routines.
Obviously the locations are different.
Do you happen to use any importing routine to get your data into MNE?
Which kind of data format do you use, natively?
The viz function you're using is quite low level and normally expects
preprocessed channel locations.
We'll have a mini MNE sprint tomorrow in Paris on EEG, montages and io
functionality.
We'll take a look at your case and get back to you.

Best,
Denis

2014-10-30 21:02 GMT+01:00 Lakshmi Krishnan <lakshmik at umd.edu>:

   Hi Denis,
Here is the link to sample sample scripts and figures for generating the
topomap with a eeglab utility function and mne-python.

Cahoots — Ann Arbor Coworking Space

The matlab topoplot matches the figures provided by Brain vision in their
documentation.I would be happy to use any other channel location file
that's known to work with Brain Vision EEG data.
Thanks!
-Lakshmi
------------------------------
*From:* mne_analysis-bounces at nmr.mgh.harvard.edu [
mne_analysis-bounces at nmr.mgh.harvard.edu] on behalf of Denis-Alexander
Engemann [denis.engemann at gmail.com]
*Sent:* Thursday, October 30, 2014 9:27 AM
*To:* Discussion and support forum for the users of MNE Software
*Subject:* Re: [Mne_analysis] Topomap with Brainvision EEG data

  Hi Lakshmi,

could you possibly share data snippets, an example script and maybe the
different figures that you see?
Otherwise it will be difficult to understand what's wrong.

--Denis

2014-10-30 14:23 GMT+01:00 Lakshmi Krishnan <lakshmik at umd.edu>:

Hello List,
I am trying to port all my Matlab analysis scripts into python and have
trouble making a topomap with EEG data collected from a Brainvision system.
I am trying to use mne.viz.plot_topomap() with the channel location
information that I know works with eeglab topoplot.
The resulting plot doesn't match the topomap I make with Matlab.
Any help to resolve this is much appreciated.
I am using mne version 0.9 from github.
Thanks!
-Lakshmi

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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/20141030/553693d6/attachment.html

Hi Denis,
I was hesitant to use real data since the electrode locations didn't match.
I read the brain vision eeg files into mne-python using mne.io.read_raw_brainvision.
I couldn't figure out how to set up the electrode location information in the rawData,since I don't have any additional localization file.
On another note,if I had nothing but the EEG data(with the std electrode locations) it is hard to use most of the inverse methods in mne-python, is that right?
Thanks!
-Lakshmi

Dear Lakshmi,

sorry for the delay. I just completed your example to make it work. Let me
know whether it makes you happy.

To recap, the problem was not the data or the topos themselves but the
positioning of the sensors.
The solution is to first put the data in an mne container, mne.EvokedArrat
in this case.
Then calling the high level viz functions / methods then does the trick,
they will do some automatic rescaling of the sensor positions to match the
outline definition, a head scheme in this case.

Here's the script.

Here's EEG lab with non-sense data:

Here MNE with non-sense data (from the example):

Note. You'll need the development version of MNE tor run the code. It
relies on the montage functionality that we have just added last Friday.

I hope this helps,
best,
Denis

2014-10-31 13:17 GMT+01:00 Lakshmi Krishnan <lakshmik at umd.edu>:

Hi Denis,
I was hesitant to use real data since the electrode locations didn't match.
I read the brain vision eeg files into mne-python using
mne.io.read_raw_brainvision.
I couldn't figure out how to set up the electrode location information in
the rawData,since I don't have any additional localization file.
On another note,if I had nothing but the EEG data(with the std electrode
locations) it is hard to use most of the inverse methods in mne-python, is
that right?
Thanks!
-Lakshmi
------------------------------
*From:* mne_analysis-bounces at nmr.mgh.harvard.edu [
mne_analysis-bounces at nmr.mgh.harvard.edu] on behalf of Denis-Alexander
Engemann [denis.engemann at gmail.com]
*Sent:* Thursday, October 30, 2014 4:12 PM

*To:* Discussion and support forum for the users of MNE Software
*Subject:* Re: [Mne_analysis] Topomap with Brainvision EEG data

  Hi Lakshmi,

Generally it would be better to use actual data, not randomly generated
data to compare both routines.
Obviously the locations are different.
Do you happen to use any importing routine to get your data into MNE?
Which kind of data format do you use, natively?
The viz function you're using is quite low level and normally expects
preprocessed channel locations.
We'll have a mini MNE sprint tomorrow in Paris on EEG, montages and io
functionality.
We'll take a look at your case and get back to you.

Best,
Denis

2014-10-30 21:02 GMT+01:00 Lakshmi Krishnan <lakshmik at umd.edu>:

  Hi Denis,
Here is the link to sample sample scripts and figures for generating
the topomap with a eeglab utility function and mne-python.

Cahoots — Ann Arbor Coworking Space

The matlab topoplot matches the figures provided by Brain vision in their
documentation.I would be happy to use any other channel location file
that's known to work with Brain Vision EEG data.
Thanks!
-Lakshmi
------------------------------
*From:* mne_analysis-bounces at nmr.mgh.harvard.edu [
mne_analysis-bounces at nmr.mgh.harvard.edu] on behalf of Denis-Alexander
Engemann [denis.engemann at gmail.com]
*Sent:* Thursday, October 30, 2014 9:27 AM
*To:* Discussion and support forum for the users of MNE Software
*Subject:* Re: [Mne_analysis] Topomap with Brainvision EEG data

   Hi Lakshmi,

could you possibly share data snippets, an example script and maybe the
different figures that you see?
Otherwise it will be difficult to understand what's wrong.

--Denis

2014-10-30 14:23 GMT+01:00 Lakshmi Krishnan <lakshmik at umd.edu>:

Hello List,
I am trying to port all my Matlab analysis scripts into python and have
trouble making a topomap with EEG data collected from a Brainvision system.
I am trying to use mne.viz.plot_topomap() with the channel location
information that I know works with eeglab topoplot.
The resulting plot doesn't match the topomap I make with Matlab.
Any help to resolve this is much appreciated.
I am using mne version 0.9 from github.
Thanks!
-Lakshmi

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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/20141103/e5a4e301/attachment.html

Hi Denis,
Thanks so much.This is very helpful!
Best,
Lakshmi