[FieldTrip] How to impove dics realfilter solution (Michael Wibral)

Björn Herrmann bherrmann at cbs.mpg.de
Thu Sep 27 21:19:06 CEST 2012


Thank you Gio, Jan and Michael,

This is very helpful input. I understand that it makes sense from a biological point of view and also from thinking about leadfields that the filter should be real-valued. What I find surprising though is that just from an application point of view, the localization results really look in my case much better (auditory cortex; for a very clear auditory topography of the FFT to a 3Hz modulated sound) for the complex than the real filter. I used the standard parameters for the localization, maybe something could be impoved there, but this is what really surprises me, also following this interesting discussion here.
Just by looking into the struct in fieldtrip and what kind of data goes into the DICS beamformer, then there is mainly the CSD, which is complex, and the power, which is positive real-valued. Thus, thinking of a classical leadfield being generated by a source and which is then compared to the observed topography (i.e. biological meaningful and real-valed), does not completely fit here, at least in my current thinking. Therefore, I was not fully surprised seeing the realfilter producing the more puzzling localization result in my case. Can the DICS beamformer really be thought of in the "classical" way, i.e. that the source produces a real-value leadfield (positive and negative values)? I somehow understood it as localizing a power topography, which is only positive, thus in a way different from a classical leadfield.

All the best,

BJörn



------
Björn Herrmann

Auditory Cognition Group
Max Planck Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1a, 04103 Leipzig, Germany

phone: ++49 (0)341 9940 2606
email: bherrmann at cbs.mpg.de

----- Ursprüngliche Mail -----
Von: fieldtrip-request at science.ru.nl
An: fieldtrip at science.ru.nl
Gesendet: Donnerstag, 27. September 2012 20:04:01
Betreff: fieldtrip Digest, Vol 22, Issue 47

Send fieldtrip mailing list submissions to
	fieldtrip at science.ru.nl

To subscribe or unsubscribe via the World Wide Web, visit
	http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
or, via email, send a message with subject or body 'help' to
	fieldtrip-request at science.ru.nl

You can reach the person managing the list at
	fieldtrip-owner at science.ru.nl

When replying, please edit your Subject line so it is more specific
than "Re: Contents of fieldtrip digest..."


Today's Topics:

   1. Re: Update - transfering TF data from SPM (Vladimir Litvak)
   2. Re: Update - transfering TF data from SPM (Duncan Astle)
   3. Fwd: Re:  How to impove dics realfilter solution (Michael Wibral)


----------------------------------------------------------------------

Message: 1
Date: Thu, 27 Sep 2012 16:32:02 +0100
From: Vladimir Litvak <litvak.vladimir at gmail.com>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] Update - transfering TF data from SPM
Message-ID:
	<CACq1Bh+N5oB+bCpvpv7X8oGhv_AR3N8gvQoZPm7fNk5PR-iiNw at mail.gmail.com>
Content-Type: text/plain; charset=windows-1252

Dear Duncan,

You should look in the code how FT differentiates between different
structures and what goes wrong. For instance it might be that it is
confused by the fsample field that shouldn't be there. It's been a
while since I did something like that and FT code has evolved with
more stringent checks now.

Best,

Vladimir

On Thu, Sep 27, 2012 at 4:08 PM, Duncan Astle
<Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:
> Dear all,
>
>
>
> I keep thinking that I have done it, in that I think that I have recreated
> all the information that should be needed in a field trip TF object. I did
> this by bringing in the extra information from D.fttimelock, and creating
> the cfg field as if I had run it through FT_FREQANALYSIS. The structure has
> these fields:
>
>
>
> l5d19 =
>
>
>
>       fsample: 250.0000
>
>         label: {68x1 cell}
>
>         trial: {[68x73 single]}
>
>          time: {[1x376 double]}
>
>     trialinfo: 1
>
>           cfg: [1x1 struct]
>
>     powspctrm: [68x73x376 single]
>
>          freq: [1x73 double]
>
>        dimord: 'chan_freq_time'
>
>
>
> However, when I try and use my file in ?FT_FREQGRANDAVERAGE? , it does not
> recognise this as a TF object, and produces this error message:
>
>
>
> ??? Error using ==> ft_checkdata at 324
>
> This function requires freq data as input.
>
>
>
> Error in ==> ft_freqgrandaverage at 66
>
>   varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'freq', 'feedback',
> 'no');
>
>
>
> What is it that I am missing??
>
>
>
> Best,
>
> Duncan
>
>
>
> ________________________________________________
>
> Dr. Duncan Astle,
>
> Programme Leader Track,
>
> British Academy Research Fellow,
>
> MRC Cognition and Brain Sciences Unit,
>
> Chaucer Road,
>
> Cambridge.
>
> Duncan.Astle at mrc-cbu.cam.ac.uk
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



------------------------------

Message: 2
Date: Thu, 27 Sep 2012 15:55:12 +0000
From: Duncan Astle <Duncan.Astle at mrc-cbu.cam.ac.uk>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] Update - transfering TF data from SPM
Message-ID:
	<B8B69AFC9DFA1B428EAF97E5EB02266B31F3A904 at WSR21.mrc-cbsu.local>
Content-Type: text/plain; charset="us-ascii"

Dear Vladimir,

Thanks for your help; I worked out what it wanted. 

Anyone who is interested should contact me and I will take them through it. 

Best,
Duncan

________________________________________________
Dr. Duncan Astle,
Programme Leader Track,
British Academy Research Fellow,
MRC Cognition and Brain Sciences Unit,
Chaucer Road,
Cambridge.
Duncan.Astle at mrc-cbu.cam.ac.uk


-----Original Message-----
From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Vladimir Litvak
Sent: 27 September 2012 16:32
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Update - transfering TF data from SPM

Dear Duncan,

You should look in the code how FT differentiates between different structures and what goes wrong. For instance it might be that it is confused by the fsample field that shouldn't be there. It's been a while since I did something like that and FT code has evolved with more stringent checks now.

Best,

Vladimir

On Thu, Sep 27, 2012 at 4:08 PM, Duncan Astle <Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:
> Dear all,
>
>
>
> I keep thinking that I have done it, in that I think that I have 
> recreated all the information that should be needed in a field trip TF 
> object. I did this by bringing in the extra information from 
> D.fttimelock, and creating the cfg field as if I had run it through 
> FT_FREQANALYSIS. The structure has these fields:
>
>
>
> l5d19 =
>
>
>
>       fsample: 250.0000
>
>         label: {68x1 cell}
>
>         trial: {[68x73 single]}
>
>          time: {[1x376 double]}
>
>     trialinfo: 1
>
>           cfg: [1x1 struct]
>
>     powspctrm: [68x73x376 single]
>
>          freq: [1x73 double]
>
>        dimord: 'chan_freq_time'
>
>
>
> However, when I try and use my file in 'FT_FREQGRANDAVERAGE' , it does 
> not recognise this as a TF object, and produces this error message:
>
>
>
> ??? Error using ==> ft_checkdata at 324
>
> This function requires freq data as input.
>
>
>
> Error in ==> ft_freqgrandaverage at 66
>
>   varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'freq', 
> 'feedback', 'no');
>
>
>
> What is it that I am missing??
>
>
>
> Best,
>
> Duncan
>
>
>
> ________________________________________________
>
> Dr. Duncan Astle,
>
> Programme Leader Track,
>
> British Academy Research Fellow,
>
> MRC Cognition and Brain Sciences Unit,
>
> Chaucer Road,
>
> Cambridge.
>
> Duncan.Astle at mrc-cbu.cam.ac.uk
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



------------------------------

Message: 3
Date: Thu, 27 Sep 2012 20:03:43 +0200
From: Michael Wibral <michael.wibral at web.de>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: [FieldTrip] Fwd: Re:  How to impove dics realfilter solution
Message-ID: <506494FF.7070308 at web.de>
Content-Type: text/plain; charset="iso-8859-1"




-------- Original Message --------
Subject: 	Re: [FieldTrip] How to impove dics realfilter solution
Date: 	Thu, 27 Sep 2012 20:01:22 +0200
From: 	wibral <wibral at em.uni-frankfurt.de>
Reply-To: 	wibral at em.uni-frankfurt.de
To: 	FieldTrip discussion list <fieldtrip at science.ru.nl>




Dear Filedtrip users,

I fully agree with jan Mathijs,

in principle when using DICS to reconstruct source power, the nature of
the physical processes (forward model) should guarantee that filters are
automatically real-valued, because this reflects the quasi-static
approximation of maxwell's equations which holds pretty well in MEG. In
practice filter coeffcients only deviate from being real because of
sensor noise, which is not a desirable effect.

Best,
Michael

On 09/27/2012 01:39 PM, jan-mathijs schoffelen wrote:
> Dear Bj?rn, caro Gio,
>
> I don't agree with you, Gio, that one should use complex-valued
> filters. The reason for this is that they don't make sense from a
> biophysical point of view. The mixing from sources to channels (as
> represented in the leadfields) is strictly real-valued, because it is
> (near-)instantaneous. I think that the unmixing from channels to
> sources also should be real-valued, for the same argument. When you
> allow filter coefficients to be complex-valued, this is equivalent to
> allowing the sensor-level signals to be shifted in time with respect
> to one another. I consider this a bit odd. In Joachim's seminal paper
> (on which FieldTrip's initial DICS implementation is based), this was
> not really explicit in the methods description. However, based on
> personal communications with said Joachim, I at least distilled that
> the filters should be real-valued. The complex-valued filters were
> kept in (as default) for backward compatibilitiy reasons. Although
> mathematically possible (perhaps even more strictly answering to the
> minimum variance and unit gain constraints), and sometimes seemingly
> giving nicer subjective results, I'd advice against using them.
>
> Cheers,
>
> JM
>
>
>
> On Sep 25, 2012, at 12:21 PM, Gio Piantoni wrote:
>
>> Hi Bj?rn,
>>
>> It's not surprising that the results are pretty bad after using real
>> filters. The fourier transform and DICS are intrinsically
>> complex-valued, so using only the real part means throwing away half
>> of the information (and getting meaningless results).
>>
>> The realfilter option was implemented in order to allow to pass the
>> time-domain signal through the complex-value spatial filter and obtain
>> a "virtual electrode". A virtual electrode with complex values is
>> "weird to say the least", see:
>> http://mailman.science.ru.nl/pipermail/fieldtrip/2006-May/000510.html
>> Robert considered it an error in the algorithm and fixed it by
>> providing the realfilter option. However, to me it seems more correct
>> to think that complex spatial filters requires complex input (i.e.
>> frequency-domain signal), so don't use DICS spatial filters on
>> time-domain real-valued MEG recordings to generate time-domain virtual
>> electrodes. If you want time-domain virtual electrodes, use LCMV
>> spatial filters centered at the location of interest. Other smart
>> people might disagree though.
>>
>> I suggest not to use realfilter option at all, but I'd be happy to
>> hear other meaningful applications of this option.
>>
>> Hope this helps,
>>
>> Gio
>>
>> On Fri, Sep 14, 2012 at 10:23 AM, Bj?rn Herrmann
>> <bherrmann at cbs.mpg.de> wrote:
>>> Dear fieldtrip user,
>>>
>>> I am using the DICS beamformer to localize a 3Hz FFT power
>>> topographical distribution (using a neuromag system). The
>>> topographies are very clear auditory in single subjects, thus it
>>> shouldn't be a problem finding the "right" solution. When I use the
>>> beamformer to obtain complex-value spatial filters, the solution
>>> looks very good (using NAI). No problem here. However, using
>>> cfg.dics.realfilter = 'yes', i.e. the spatial filter will have real
>>> values, the localization completely breaks down, sometimes even
>>> finding a strong peak in the opposite hemisphere than visible in the
>>> sensor topography (the head is centered in the sensor array).
>>>
>>> Does someone have a suggestion how to improve the solution using
>>> realfilter = 'yes'. I use the following settings. They are rather
>>> standard I guess.
>>>
>>> cfg = [];
>>> cfg.method            = 'dics';
>>> cfg.frequency         = 3;
>>> cfg.dics.projectnoise = 'yes';
>>> cfg.dics.lambda       = '5%';
>>> cfg.dics.keepfilter   = 'yes';
>>> cfg.dics.realfilter   = 'yes';
>>> cfg.dics.fixedori     = 'no';
>>>
>>>
>>> If someone has a suggestion, I would appreciate it.
>>> Thanks in advance,
>>> best,
>>>
>>> Bj?rn
>>>
>>>
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> Jan-Mathijs Schoffelen, MD PhD 
>
> Donders Institute for Brain, Cognition and Behaviour, 
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
>
> Max Planck Institute for Psycholinguistics,
> Nijmegen, The Netherlands
>
> J.Schoffelen at donders.ru.nl <mailto:J.Schoffelen at donders.ru.nl>
> Telephone: +31-24-3614793
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120927/e382da33/attachment.html>

------------------------------

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

End of fieldtrip Digest, Vol 22, Issue 47
*****************************************




More information about the fieldtrip mailing list