JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for SPM Archives


SPM Archives

SPM Archives


SPM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

SPM Home

SPM Home

SPM  April 2011

SPM April 2011

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Need help getting EEG timecourse associated with coordinates defined by fMRI

From:

Martin Dietz <[log in to unmask]>

Reply-To:

Martin Dietz <[log in to unmask]>

Date:

Thu, 28 Apr 2011 12:20:00 +0200

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (160 lines)

Hi Vladimir & John,

I have been following your discussion on how to extract a source time-series. I believe SPM uses singular value decomposition to compute the 1st eigenvariate of the VOI. Could you kindly point me to a description in the literature or the piece of code that performs the computation.

Very best wishes,
Martin



On Apr 27, 2011, at 10:59 PM, Vladimir Litvak wrote:



On 27 Apr 2011, at 21:40, "Sexton, John A." <[log in to unmask]<mailto:[log in to unmask]>> wrote:

Hi Vladimir,

Thank you for the quick response! I was not aware of the latest SPM updates.
I have now installed them and tried the extract feature but got an error (see below).

Just to make sure I understand:  the output of that extract function will be a time series of eeg data from the vertex nearest the coordinate I specified?

Only if you specify VOI radius of zero. See below.


I am actually using the multi-modal face data for practice, so the EEG data I am using do in fact have the fMRI priors applied to them already. I've gone all the way through the source localization process as far as I can tell and am using the "N170+fMRI" inversion for my tests right now.

I have looked at the meeg methods and the Reference section of the EEG part of the SPM manual. I have also looked at section 14.11, the data structure appendix.  This tells a little bit about D.inv{val}.mesh, datareg, inverse, etc.  but it is the fields within those that I would really like to understand. I can't seem to find a clear guide to those anywhere (though I have been trying to piece it together from the individual spm_eeg_inv_*.m files).

This message seemed relevant to what i was trying to do, but I didn't understand the instruction to "extract corresponding temporal mode values in D.inv{val}.inverse.J{c} and post-multiply by those temporal modes themselves in D.inv{val}.inverse T (transposed)"

<https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=SPM;a5e4241.1001>https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=SPM;a5e4241.1001

Is that similar to what the extract function is doing?


Basically yes, but the extract function also summarises the time series of all the vertices within some distance of your chosen location (VOI radius) as the first eigenvariate (similarly to what fMRI 'eigenvariate' button does). This is the right way to do it because the vertex that picks up most of the activity of interest might not be the closest one as orientation is more important than location.


I appreciate your help and I do feel like I am inching in the right direction.


I can't say what's wrong from the error message. You sound like you can try to figure it out yourself. If not, send me an example of your data and what parameters you specified and I'll look at it. If you find the bug, also let me know.

Best,

Vladimir

Thank you!
John



About the Extract Error

When I enter some coordinates in the ms or mm box - say [5, -48, 21] and choose "extract",
I am able to enter a Source label, VOI radius, and File name.

However, at that point I get the following error:

??? Index exceeds matrix dimensions.

Error in ==> spm_eeg_inv_extract at 122
MY(:, MYi:(MYi+Np-1)) =
J{i}(js,:)*T';

Error in ==> spm_eeg_inv_extract_ui at 52
[Ds, D] = spm_eeg_inv_extract(D);

Error in ==>
spm_eeg_inv_imag_api>CheckInverse_Callback
at 421
handles.D =
spm_eeg_inv_extract_ui(handles.D,
handles.D.val, PST);

Error in ==> spm_eeg_inv_imag_api at 53
feval(varargin{:}); % FEVAL
switchyard

??? Error while evaluating uicontrol Callback




________________________________________
From: Vladimir Litvak [[log in to unmask]<mailto:[log in to unmask]>]
Sent: Wednesday, April 27, 2011 2:24 PM
To: Sexton, John A.
Cc: <mailto:[log in to unmask]> [log in to unmask]<mailto:[log in to unmask]>
Subject: Re: [SPM] Need help getting EEG timecourse associated with coordinates defined by fMRI

Dear John,

You are almost there. If you install the latest set of SPM8 updates,
you'll find the 'extract' checkbox that will enable you to save the
source time series as SPM dataset when you press the MIP button. A
more convenient way to access this functionality is via SPM batch or
scripts. If you want closer correspondence with fMRI you might want to
use fMRI priors as described in the multimodal faces tutorial.

@meeg methods are described quite in detail in the reference chapter
in the manual. You can also type methods('meeg') in the command line
to get a full list of methods and then type help meeg/<method name> to
get help for each method. However, in this case it's not the object
itself that you need but the inversion results that are stored in
D.inv which is a struct. The fields are briefly described at the end
of 3D source reconstruction chapter.

In general if you want to save something that you can plot in SPM you
can find the code that does the plotting and use it as an example.

Best,

Vladimir

On Wed, Apr 27, 2011 at 6:38 PM, John Sexton <[log in to unmask]<mailto:[log in to unmask]>> wrote:
> Hello everyone,
>
> I am new to EEG analysis with SPM. I have followed the tutorials in the manual carefully and have managed to get reasonably far on my own, but I am stuck when it comes to digging inside the D meeg object for specific pieces of information.
>
> I have fMRI data and EEG data (collected separately) of subjects viewing faces. So far, I have performed the standard SPM analysis on fMRI data. I have identified the clusters of interest and the corresponding coordinates of the centroids of those clusters in MNI space.
>
> Now this is what I want to do:
>
> 1. Find the point in the EEG data (vertex or sensor) which most closely corresponds to the centroids of the fMRI activation
>
> 2. Extract the time courses for the those points in the EEG data
>
> So far I have entered the coordinates of the fMRI centroids into the "ms or mm" box below the MIP button on the 3D Source Localization window on SPM, then hit the MIP button. This appeared to provide EEG coordinates that were very close to the fMRI coordinates and gave the time (in ms) of peak activity at that coordinate.
>
> For example, if I enter [-39, -46, -23] (obtained from fMRI), the EEG MIP returns [-39, -45, -22] with peak at 195ms.
>
> But now that I have that coordinate (which I assume is the vertex in the EEG data closest to the coordinates I entered), I do not know how to extract the time course of EEG activity associated with it.
>
> This seems like it ought to be easy enough (and there are surely better ways than what I have tried so far), but don't know how to be sure I am getting the correct information.
>
>
> I would greatly appreciate some help on this.
>
> Also, if there any straightforward guide out there to the information contained in the D meeg object, I would love to read it.
>
> Thank you!
>
> John
>

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager