Discrete Source Space source localization

Hello,

Does anyone have any experience using discrete source spaces for source
localization?

What I am trying to do is to fit auditory data by placing anatomically
defined sources in left and right auditory cortex. The issue I'm having is
that the time courses aren't matching up with time courses generated using
a similar approach in BESA.

More concerning, the time courses don't match what I get if I do a full
cortical sheet source localization and extract the time courses from a
functional label. See attached plot.

I have double checked and the anatomical location (red dot) for the
discrete sources space is right in the middle of the functional label
(green dots).

Does anyone see something obviously wrong with the attached approach? Am I
wrong for expecting better agreement between the results?

Thanks,
Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/aeddb59a/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TimeCourses.png
Type: image/png
Size: 55632 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/aeddb59a/attachment-0002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: label_location.png
Type: image/png
Size: 35573 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/aeddb59a/attachment-0003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A40_rt_aud_ex.py
Type: text/x-python
Size: 4394 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/aeddb59a/attachment-0001.py

What I am trying to do is to fit auditory data by placing anatomically
defined sources in left and right auditory cortex. The issue I'm having is
that the time courses aren't matching up with time courses generated using
a similar approach in BESA.

Are you doing the equivalent computation in BESA, i.e. a minimum norm
estimate with dSPM noise normalization, regularization parameter = 1. / 9.,
and so forth?

More concerning, the time courses don't match what I get if I do a full

cortical sheet source localization and extract the time courses from a
functional label.

If I understand your source space correctly -- that it is just a handful of
dipoles (or one dipole) in left and right auditory cortices, or a similar
small subset -- this is not too surprising to me (though I have never tried
it). Minimum norm will try to account for all observed sensor data using
activations in exactly the set of source points provided. So if you only
provide auditory cortex sources in the source space, MNE will try to
explain all sensor activity using only these sources. This means that if
there is any activation outside of auditory cortex -- or even sensor or
environmental noise -- it will show up in "auditory cortex" anyway (as it
is the *only* place it can show up). If you have a full cortical source
space on the other hand, activity from other areas can be accounted for by
those other source points, and sensor/environmental noise sources can be
distributed across other sources.

Thinking about the limiting case of only a few locations, activations in
tiny source space might approach something like the time course of the
global field power (although dSPM normalization might change this a bit).

There might be other things going on, too -- I'm not sure how nicely the
minimum norm and dSPM code behave if there are *fewer* source points than
sensors, for example, though I'd expect it to be okay -- but this is at
least what first came to mind.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/15e4a2ae/attachment.html

Thanks for the response Eric.

While I agree with everything you are saying, I think something else is
going on.

Take a look at the attached.
What I did was to first select only the right sensors and then I fit the
following.
1) a cortical sheet dSPM, with a functional label.
2) a fixed location dipole (mne.fit_dipole(pos=...))
3) a dspm with a single source volume source space

the dipole location and the source space location are the same.

As you can see from the time course plots, the cortical sheet dSPM and
fix_location dipole are very similar however the single source dSPM is
quite different.

This doesn't make sense to me. Both the dipole and the single source volume
source space should have the same lead field and should be trying to
explain the same data. granted there is regularization in the dspm, but I'm
not sure why that would move the peaks around in time?

What I am trying to do is to fit auditory data by placing anatomically

defined sources in left and right auditory cortex. The issue I'm having is
that the time courses aren't matching up with time courses generated using
a similar approach in BESA.

Are you doing the equivalent computation in BESA, i.e. a minimum norm
estimate with dSPM noise normalization, regularization parameter = 1. / 9.,
and so forth?

More concerning, the time courses don't match what I get if I do a full

cortical sheet source localization and extract the time courses from a
functional label.

If I understand your source space correctly -- that it is just a handful
of dipoles (or one dipole) in left and right auditory cortices, or a
similar small subset -- this is not too surprising to me (though I have
never tried it). Minimum norm will try to account for all observed sensor
data using activations in exactly the set of source points provided. So if
you only provide auditory cortex sources in the source space, MNE will try
to explain all sensor activity using only these sources. This means that if
there is any activation outside of auditory cortex -- or even sensor or
environmental noise -- it will show up in "auditory cortex" anyway (as it
is the *only* place it can show up). If you have a full cortical source
space on the other hand, activity from other areas can be accounted for by
those other source points, and sensor/environmental noise sources can be
distributed across other sources.

Thinking about the limiting case of only a few locations, activations in
tiny source space might approach something like the time course of the
global field power (although dSPM normalization might change this a bit).

There might be other things going on, too -- I'm not sure how nicely the
minimum norm and dSPM code behave if there are *fewer* source points than
sensors, for example, though I'd expect it to be okay -- but this is at
least what first came to mind.

Eric

_______________________________________________
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/20180222/fdc24352/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A40_rt_aud_ex.py
Type: text/x-python
Size: 5846 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/fdc24352/attachment-0001.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TimeCourses.png
Type: image/png
Size: 30216 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180222/fdc24352/attachment-0001.png

This doesn't make sense to me. Both the dipole and the single source
volume source space should have the same lead field and should be trying to
explain the same data. granted there is regularization in the dspm, but I'm
not sure why that would move the peaks around in time?

To get to the bottom of this I would try simulating evoked data
<mne.simulation.simulate_evoked — MNE 1.6.0 documentation.
First I'd use a single source (discrete source space with a single point)
activated with some pattern (Hann window
<https://docs.scipy.org/doc/numpy/reference/generated/numpy.hanning.html&gt;?\)
with no noise (nave=np.inf) and a diagonal ad-hoc noise covariance
<mne.make_ad_hoc_cov — MNE 1.6.0 documentation;
during `fit_dipole` and `make_inverse_operator` and repeat this analysis.
Hopefully they all agree and give you back your activation. Then you could
add noise with a realistic spatial pattern (e.g., from your real data
baseline period) and see what happens. Hopefully this moves toward what you
see with the real data. But testing through simulation should allow you to
probe how each choice (covariance, regularization, noise sources, inverse,
etc.) affect the results.

If you try it, let us know what you find! Eventually we could consider
turning it into some sort of tutorial.

Eric

What I am trying to do is to fit auditory data by placing anatomically

defined sources in left and right auditory cortex. The issue I'm having is
that the time courses aren't matching up with time courses generated using
a similar approach in BESA.

Are you doing the equivalent computation in BESA, i.e. a minimum norm
estimate with dSPM noise normalization, regularization parameter = 1. / 9.,
and so forth?

More concerning, the time courses don't match what I get if I do a full

cortical sheet source localization and extract the time courses from a
functional label.

If I understand your source space correctly -- that it is just a handful
of dipoles (or one dipole) in left and right auditory cortices, or a
similar small subset -- this is not too surprising to me (though I have
never tried it). Minimum norm will try to account for all observed sensor
data using activations in exactly the set of source points provided. So if
you only provide auditory cortex sources in the source space, MNE will try
to explain all sensor activity using only these sources. This means that if
there is any activation outside of auditory cortex -- or even sensor or
environmental noise -- it will show up in "auditory cortex" anyway (as it
is the *only* place it can show up). If you have a full cortical source
space on the other hand, activity from other areas can be accounted for by
those other source points, and sensor/environmental noise sources can be
distributed across other sources.

Thinking about the limiting case of only a few locations, activations in
tiny source space might approach something like the time course of the
global field power (although dSPM normalization might change this a bit).

There might be other things going on, too -- I'm not sure how nicely the
minimum norm and dSPM code behave if there are *fewer* source points
than sensors, for example, though I'd expect it to be okay -- but this is
at least what first came to mind.

Eric

_______________________________________________
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/20180223/d97ed2c5/attachment.html

Ok.

While I'm not 100% sure I understand all of the intricacies, I was able to
identify the problem.

Essentially, it was a problem of regularization. With only a few source
locations and a loose=1 the radial part of the leadfield for each source
was playing a large roll by essentially magnifying noise.

This doesn't cause issues when dipole fitting because dipole fitting
doesn't invert the leadfield so the small singular value for that source
orientation is ignored.

I'm still not 100% how/why these source orientations get suppressed when
doing a full cortical sheet fit with loose=1, such as VectorSourceEstimate.
But from looking at the results of estimate_snr it seems like it doesn't.

So the take home, at least for me, is to always check the lambad2 values
you use, via estimate_snr or plot_snr_estimate, particularly when using
discrete source spaces or even volume source spaces.

-Luke

Great, thanks for letting us know how it worked out.

Eric

hi Luke,

thanks for the feedback.

do you think you could make an example from this so we can explain this on
the website?

thanks
Alex

Sure,

Although it'll depend somewhat on what you want the example to illustrate.

Attached is a cleaned up version of the script I was using to investigate
this. It uses sample data so is almost an example now. Give it a run and if
this is the kind of thing you have in mind I'll open a PR and we can
modify/discuss it there.

hi Luke,

thanks for the feedback.

do you think you could make an example from this so we can explain this on
the website?

thanks
Alex

Great, thanks for letting us know how it worked out.

Eric

Ok.

While I'm not 100% sure I understand all of the intricacies, I was able
to identify the problem.

Essentially, it was a problem of regularization. With only a few source
locations and a loose=1 the radial part of the leadfield for each source
was playing a large roll by essentially magnifying noise.

This doesn't cause issues when dipole fitting because dipole fitting
doesn't invert the leadfield so the small singular value for that source
orientation is ignored.

I'm still not 100% how/why these source orientations get suppressed when
doing a full cortical sheet fit with loose=1, such as VectorSourceEstimate.
But from looking at the results of estimate_snr it seems like it doesn't.

So the take home, at least for me, is to always check the lambad2 values
you use, via estimate_snr or plot_snr_estimate, particularly when using
discrete source spaces or even volume source spaces.

-Luke

This doesn't make sense to me. Both the dipole and the single source

volume source space should have the same lead field and should be trying to
explain the same data. granted there is regularization in the dspm, but I'm
not sure why that would move the peaks around in time?

To get to the bottom of this I would try simulating evoked data
<mne.simulation.simulate_evoked — MNE 1.6.0 documentation.
First I'd use a single source (discrete source space with a single point)
activated with some pattern (Hann window
<https://docs.scipy.org/doc/numpy/reference/generated/numpy.hanning.html&gt;?\)
with no noise (nave=np.inf) and a diagonal ad-hoc noise covariance
<mne.make_ad_hoc_cov — MNE 1.6.0 documentation;
during `fit_dipole` and `make_inverse_operator` and repeat this analysis.
Hopefully they all agree and give you back your activation. Then you could
add noise with a realistic spatial pattern (e.g., from your real data
baseline period) and see what happens. Hopefully this moves toward what you
see with the real data. But testing through simulation should allow you to
probe how each choice (covariance, regularization, noise sources, inverse,
etc.) affect the results.

If you try it, let us know what you find! Eventually we could consider
turning it into some sort of tutorial.

Eric

What I am trying to do is to fit auditory data by placing

anatomically defined sources in left and right auditory cortex. The issue
I'm having is that the time courses aren't matching up with time courses
generated using a similar approach in BESA.

Are you doing the equivalent computation in BESA, i.e. a minimum norm
estimate with dSPM noise normalization, regularization parameter = 1. / 9.,
and so forth?

More concerning, the time courses don't match what I get if I do a

full cortical sheet source localization and extract the time courses from a
functional label.

If I understand your source space correctly -- that it is just a
handful of dipoles (or one dipole) in left and right auditory cortices, or
a similar small subset -- this is not too surprising to me (though I have
never tried it). Minimum norm will try to account for all observed sensor
data using activations in exactly the set of source points provided. So if
you only provide auditory cortex sources in the source space, MNE will try
to explain all sensor activity using only these sources. This means that if
there is any activation outside of auditory cortex -- or even sensor or
environmental noise -- it will show up in "auditory cortex" anyway (as it
is the *only* place it can show up). If you have a full cortical
source space on the other hand, activity from other areas can be accounted
for by those other source points, and sensor/environmental noise sources
can be distributed across other sources.

Thinking about the limiting case of only a few locations, activations
in tiny source space might approach something like the time course of the
global field power (although dSPM normalization might change this a bit).

There might be other things going on, too -- I'm not sure how nicely
the minimum norm and dSPM code behave if there are *fewer* source
points than sensors, for example, though I'd expect it to be okay -- but
this is at least what first came to mind.

Eric

_______________________________________________
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.

_______________________________________________
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/20180228/c1518c71/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot_discsrc_snr.py
Type: text/x-python
Size: 9423 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180228/c1518c71/attachment-0001.py