[FieldTrip] Common Filters Question

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Wed Jul 16 09:12:59 CEST 2014


Dear Max,

I checked out both snippets of code (on the tutorial page and on the example page), and to me it seems that you should be able to get away with what you call the ‘simple common filter’. The code on the example page to me looks unnecessarily complicated (apart from the fact that it is incomplete), and seems to be designed to first create a single trial representation of the data in source space, before averaging across the trials that pertain to a certain experimental condition. If, as I suspect it to be so in your case, one is only interested in computing a per condition average in source space (in order to be able to do statistical inference across a group of subjects), computing and using the common spatial filter as per the tutorial should do the trick.
I guess that the person who wrote the example code for some reason wanted to have access to the single trial source data (as per point 3 in the section ‘how to do this in fieldtrip’ on the example script page). Projection of single trial data to the source level indeed blows up memory requirements, and may only be necessary in certain non-standard cases. I think it would be good to make this more explicit on the example page (thanks for spotting it!). Would you mind helping out with this? It’s a wiki after all ;-), and the example code is allowed to be adjusted/extended. I suggest that we adjust the page a bit so that we make explicit that we can reconstruct single trial data if needed (for this we only need to make the example code correct), but that in most cases we can work with averages across trials (for this we need to add a section that more or less duplicates the creation of the ‘simple’ complex filter). The way we usually tackle this is by creating a ‘bug’ out of this (or rather an issue) on our bugzilla.fcdonders.nl issue-tracking system to make an action list and to keep track of who’s doing what.

Best wishes,
Jan-Mathijs


On Jul 15, 2014, at 7:26 PM, Max Cantor <mcantor at umich.edu> wrote:

> In the main beamformer tutorial (http://fieldtrip.fcdonders.nl/tutorial/beamformer), the common filter is computed as follows:
> 
> cfg.grid.filter = sourceAll.avg.filter;
> sourcePre_con  = ft_sourceanalysis(cfg, freqPre );
> sourcePost_con = ft_sourceanalysis(cfg, freqPost);
> However, in the separate common filters example script (http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming), the common filter is much more complex. 
> 
> I've created working versions of both common filters for DICS, as well as a working version of the 'simple' common filter for LCMV. I have a version of the 'complex' common filter that should work, but it usually chews up my computer's RAM (I have 16gb) and crashes matlab. The DICS one is also slow, but not so bad that it crashes. However, I couldn't imagine running it on all my datasets and being able to do any stats on the data without my computer crashing.
> 
> Before I post the code to see if maybe there is something wrong with it causing the memory overloads, I was wondering if anyone could explain to me what exactly the differences between the two methods are, and if it is even necessary for me to get the more complex common filter working? The simple common filters seem to work fine, but they could be affecting the data in ways that are not obvious, so I want to make sure.
> 
> As always, thank you Fieldtrippers
> 
> -- 
> Max Cantor
> Lab Manager
> Computational Neurolinguistics Lab
> University of Michigan
> _______________________________________________
> 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
Telephone: +31-24-3614793

http://www.hettaligebrein.nl

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


More information about the fieldtrip mailing list