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

Help for NEUROMEG Archives


NEUROMEG Archives

NEUROMEG Archives


NEUROMEG@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

NEUROMEG Home

NEUROMEG Home

NEUROMEG  June 2009

NEUROMEG June 2009

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Leadfield Correction for SSS

From:

Samu Taulu <[log in to unmask]>

Reply-To:

Samu Taulu <[log in to unmask]>

Date:

Fri, 26 Jun 2009 17:11:28 +0300

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (350 lines)

Dear Rik,

I discussed your request with Jukka. We will produce means to get the 
matrix to be used for leadfield investigations but we still have to 
think about the implementation a little bit. The task is straightforward 
in principle, but it might be better to do it as a separate software 
module instead of implementing it into the official MaxFilter release. 
Another possibility is a Matlab program that reads the relevant 
information, such as the basis vector selection used by MaxFilter and 
the appropriate fine calibration, and computes the matrix based on that. 
We will get back to you about this as soon as possible but there may be 
a delay because the Finnish summer holiday season is just about to 
start. I am sorry about the inconvenience.

Regarding the SSS operation, the signal returned by MaxFilter is of the 
form B_in = S_in*P*pinv(S)*B, where S and S_in are the full (in+out) and 
internal SSS-bases, respectively, P is a matrix that only picks the 
multipole moments related to the internal basis, and B is the measured 
signal. In Olaf's idea, B is the identity matrix and in that case 
MaxFilter returns S_in*P*pinv(S), which is the matrix that you are 
looking for. If I understand correctly, your Matlab code repeatedly 
initializes B to the zero vector until n=306 leaving a vector with 
nonzero entry only for the last element. If this is the case, you will 
not get the correct matrix, unfortunately. It is a pity that it is not 
feasible to use the identity matrix as input for MaxFilter.

I will get back to you with help for calculating the projection matrix, 
which, by the way, is an oblique projection with built-in reconstruction 
for the effect of non-orthogonality between the neural leadfields and 
the external SSS basis. I would like to emphasize this because of your 
concern in the correspondence below: "I would also hope that the SSS 
components reflecting environmental noise sources in the outer sphere 
are only a small part of the sensor space spanned by the leadfield 
matrix, so their removal would have little affect on that matrix." This 
can be easily checked, e.g., by measuring signal from the deepest 
phantom dipole, which is spatially quite similar to homogeneous 
interference, and verifying that MaxFilter does not distort its signal.

Best regards,
Samu


Rik Henson wrote:
>
> Dear Neuromag (Jukka/Samu?)
>
> Following the previous discussion below, I was wondering if it would 
> be possible for the next release of MaxFilter to return (e.g, write to 
> a file) a matrix that is effectively the one used to project the 
> "noise" components (in outer sphere) out of the data. This would be 
> generally useful, e.g, to adjust our leadfields (even if the 
> adjustment should be negligible, given Samu's comments below about 
> noise levels).
>
> Rik
>
> PS I have tried Olaf's idea below of running MaxFilter on a dummy FIF 
> file containing just an identity matrix, using the FIFFACCESS 
> "writeraw" command. Firstly, if I just try to write a 306x306 identity 
> matrix, MaxFilter will not run because it thinks the channels have 
> saturated. However, if I write each column (sample) with a separate 
> call to "writeraw", MaxFilter does now work (for reasons that are 
> unclear; separate buffers?) - but the resulting output (projection 
> matrix?) looks suspicious - is it in fact correct? (Matlab code below; 
> am sure I have done something stupid!):
>
>    FIFfile = 'realdata_raw.fif';
>    megmodel('head',FIFfile);
>
>    [ChanName,ChanType,ChanNum,CoilType,T] = channames(FIFfile);
>    chs = ChanName(1:306,:);
>
>    Fout = 'iid.fif';
>    T0 = 1; SF = 1000;
>
>    writeraw(Fout,chs,SF,T0,'IID');
>
>    %B = eye(306)*1e-12;  % doesn't work because MaxFilter thinks
>    channels saturated
>    %writeraw(B);
>
>    Z = zeros(306,1);
>    for n=1:306
>     B = Z; B(n) = 1e-12;
>     writeraw(B);
>    end
>
>    writeraw('close')
>
>    Sout = 'iid-sss.fif';
>    logfile = 'iid-sss.log';
>    delete(Sout); delete(logfile)
>    eval(sprintf('!/neuro/bin/util/maxfilter -f %s -o %s -ctc
>    /neuro/databases/ctc/ct_sparse.fif -cal
>    /neuro/databases/sss/sss_cal.dat -autobad off -v | tee
>    %s',Fout,Sout,logfile))
>
>    [d, SF] = rawchannels(Sout,chs);
>    figure,imagesc(d),colormap('gray')
>
>
>
>
>
> Samu Taulu wrote:
>> Dear Colleagues,
>>
>> This is a very interesting discussion. I hope I can clarify some of 
>> the questions in the previous emails.
>>
>> First of all, I would like to briefly describe the way how SSS 
>> affects the data in general. Apparently, the number of degrees of 
>> freedom of an MEG signal is very high, in the case of Elekta Neuromag 
>> Oy the rank of the data is 306 to begin with. However, due to the 
>> sampling theory of neuromagnetic fields and the relatively low signal 
>> to noise ratio, most of the dimensions in the signal space belong to 
>> random sensor noise while the dimensionality of the brain and 
>> external interference signals is much smaller. This means that only 
>> around 100 field components are needed to practically represent the 
>> signals of interest and interference. The SSS method has been 
>> designed in such a way that it models those basic components with 
>> vector spherical harmonic expansions that are truncated at the limit 
>> above which the components fall under the sensor noise level. In 
>> accordance with the sampling theory, these components correspond to 
>> very high spatial frequencies of the magnetic field. The internal 
>> (brain) and external (interference) signals are both included in the 
>> SSS matrix, and generally the angle between an arbitrarily chosen 
>> pair of internal and external basis vectors is less than 90 degrees, 
>> i.e., there is overlapping between them. The SSS basis, however, is 
>> linearly independent and the decomposition into those basis 
>> components is unique. Assuming that the sampling theory and 
>> quasistatic Maxwell's equations hold, the brain signal estimate does 
>> not leak into the external part and thus the spatial overlapping of 
>> the internal and external signals does not cause a need for leadfield 
>> corrections, unlike in the case of SSP where the orthogonal spatial 
>> projection slightly modifies the brain signals. The effect of SSP is 
>> compensated for in the Xfit software, for example.
>>
>> The potential distortion to brain signals caused by SSS would happen 
>> due to the truncation of the vector spherical harmonic expansion. We 
>> have examined the effect of the truncation by simulations in Figs. 
>> 1-4 of our paper (Taulu S, Simola J, Kajola M, IEEE Trans. Sign. 
>> Proc., vol. 53, pp. 3359-3372 (2005)) and found out that the effect 
>> is practically insignificant. In other words, manipulation of the 
>> leadfields should not be necessary after SSS. If you like, you can 
>> create the transformation matrix like Olaf suggested - MaxFilter does 
>> not return such a transformation.
>>
>> If you would like to experiment the effect of SSS on the leadfields, 
>> you could try the following simple experiment:
>> 1. Simulate the signal of any reasonable current dipole in Xfit. This 
>> step utilizes full-rank leadfields with no linear transformation 
>> performed on the data.
>> 2. Run MaxFilter on the simulated file
>> 3. Load the output file of MaxFilter into Xfit and perform source 
>> analysis
>>
>> In step 3, Xfit assumes original leadfields without any matrix 
>> manipulation and therefore the possible discrepancy is directly 
>> assessed by comparing the results obtained with the original and 
>> SSS-processed data because Xfit treats both of them in the same way: 
>> Without leadfield correction. Based on our theory and experiments, 
>> there should be no significant distortion in the field pattern or 
>> source localization even without any leadfield manipulations.
>>
>> I hope this clarifies the issue, and sorry for the length of this email.
>>
>> Best regards,
>> Samu
>>
>>
>> Olaf Hauk wrote:
>>> If there is no "built in" way: One could create an artifical data 
>>> set that
>>> contains only the identity matrix (n*n, n: number of sensors), and 
>>> apply
>>> SSS to that in order to get the transformation matrix.
>>>
>>> Olaf
>>>
>>>
>>>
>>>  
>>>> I think this is the key, Olaf.
>>>>
>>>> I apologise that my original email caused some confusion, because I 
>>>> was
>>>> not asking specifically about the temporal extension of SSS, but 
>>>> rather
>>>> the use of SSS generally.
>>>>
>>>> I would also hope that the SSS components reflecting environmental 
>>>> noise
>>>> sources in the outer sphere are only a small part of the sensor space
>>>> spanned by the leadfield matrix, so their removal would have little
>>>> affect on that matrix.
>>>>
>>>> However, my question remains: in order to compare "with and without"
>>>> leadfield correction (as Olaf suggests), how do I extract the 
>>>> necessary
>>>> correction (projection) from MaxFilter?
>>>>
>>>> Advice from MaxFilter experts (ie Neuromag?) much appreciated....
>>>>
>>>> Rik
>>>>
>>>>
>>>>   
>>>>> Hi again, and sorry: I was a bit too quick, there is of course no 
>>>>> "null
>>>>> space" in sensor space of the leadfield. But the question how much 
>>>>> the
>>>>> SSS
>>>>> components have in common with the leadfield still remains, and if 
>>>>> the
>>>>> overlap is small, how big the effect of such a leadfield 
>>>>> correction on
>>>>> source estimates really is. Has anyone tried with and without?
>>>>>
>>>>> Olaf
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>> I would say one has to think about SSSt as a temporal filtering 
>>>>>> method
>>>>>> -
>>>>>> and you don't correct your leadfield after low-pass filtering 
>>>>>> either,
>>>>>> for
>>>>>> example. But this raises another interesting question: If SSS 
>>>>>> (with or
>>>>>> without ST) only removes activity from sources outside the sensor
>>>>>> array,
>>>>>> it should only remove patterns that are in the null space of the
>>>>>> leadfield
>>>>>> - i.e. no correction would be required. If it removes patterns 
>>>>>> that are
>>>>>> NOT in the null space of the leadfield, these sources could 
>>>>>> potentially
>>>>>> be
>>>>>> generated inside the head (where the brain is) - i.e. it might 
>>>>>> remove
>>>>>> signal! I would hope that it's the former.
>>>>>>
>>>>>> Olaf
>>>>>>
>>>>>>
>>>>>>
>>>>>>       
>>>>>>> Burkhard -
>>>>>>>
>>>>>>> I thought so too, but another colleague thought this was not the 
>>>>>>> case.
>>>>>>> So if the Neuromag experts don't give the definite answer, we could
>>>>>>> have
>>>>>>> a vote?
>>>>>>>
>>>>>>> ;-)
>>>>>>> Rik
>>>>>>>
>>>>>>> Burkhard Maess wrote:
>>>>>>>
>>>>>>>         
>>>>>>>> Hi Rik,
>>>>>>>>
>>>>>>>> this is an interesting question - but I think the temporal 
>>>>>>>> projection
>>>>>>>> does not modify the spatially organized leadfield. SSSt takes 
>>>>>>>> out the
>>>>>>>> part of the data which correllates highly between both expansions,
>>>>>>>> but
>>>>>>>> you can not describe it by a certain spatial pattern as in the 
>>>>>>>> case
>>>>>>>> of
>>>>>>>> the SSP.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Burkhard
>>>>>>>>
>>>>>>>>
>>>>>>>> Rik Henson wrote:
>>>>>>>>
>>>>>>>>           
>>>>>>>>> Dear Neuromeg -
>>>>>>>>>
>>>>>>>>> Could you let me know how I can correct my leadfields for prior
>>>>>>>>> SSSt?
>>>>>>>>> In other words, I have a leadfield matrix, L, of n sensors x p
>>>>>>>>> sources, and would like to extract some form of projection matrix
>>>>>>>>> from Maxfilter that I can apply to L in order to remove those
>>>>>>>>> components of the sensor data that have been removed by SSSt.
>>>>>>>>>
>>>>>>>>> Many thanks
>>>>>>>>> Rik
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>               
>>>>>>> -- 
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>>>                  Dr Richard Henson
>>>>>>>          MRC Cognition & Brain Sciences Unit
>>>>>>>                  15 Chaucer Road
>>>>>>>                    Cambridge
>>>>>>>                   CB2 7EF, UK
>>>>>>>
>>>>>>>            Office: +44 (0)1223 355 294 x522
>>>>>>>               Mob: +44 (0)794 1377 345
>>>>>>>               Fax: +44 (0)1223 359 062
>>>>>>>
>>>>>>> http://www.mrc-cbu.cam.ac.uk/people/rik.henson/personal
>>>>>>> -------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>           
>>>>>> -- 
>>>>>>
>>>>>>
>>>>>>         
>>>>>
>>>>>       
>>>> -- 
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> DR RICHARD HENSON
>>>>
>>>> MRC Cognition & Brain Sciences Unit
>>>> 15 Chaucer Road
>>>> Cambridge, CB2 7EF
>>>> England
>>>>
>>>> EMAIL:  [log in to unmask]
>>>> URL:    http://www.mrc-cbu.cam.ac.uk/people/rik.henson/personal
>>>>
>>>> TEL     +44 (0)1223 355 294 x522
>>>> FAX     +44 (0)1223 359 062
>>>> MOB     +44 (0)794 1377 345
>>>>
>>>> -------------------------------------------------------
>>>>
>>>>     
>>>
>>>
>>>   
>>
>>
>

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
May 2023
January 2023
March 2022
January 2022
December 2021
November 2021
May 2021
September 2020
August 2020
July 2020
May 2020
April 2020
January 2020
December 2019
June 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
January 2018
November 2017
October 2017
September 2017
August 2017
March 2017
December 2016
September 2016
July 2016
April 2016
January 2016
August 2015
July 2015
June 2015
March 2015
December 2014
August 2014
May 2014
April 2014
January 2014
December 2013
November 2013
October 2013
September 2013
June 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
July 2012
May 2012
March 2012
February 2012
September 2011
July 2011
June 2011
May 2011
April 2011
March 2011
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
February 2010
January 2010
December 2009
November 2009
October 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
March 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007


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