[FieldTrip] MNE Source Reconstruction Sanity Check

Roey Schurr roeysc at gmail.com
Mon Sep 8 14:22:13 CEST 2014


Dear fieldtrippers,

I am reposting this question in hope someone could help me use the template
BEM head model in EEG source reconstruction.

Any help would be greatly appreciated!
Thank you all,
roey


On Wed, Aug 20, 2014 at 5:23 PM, Roey Schurr <roeysc at gmail.com> wrote:

> Dear fieldtrippers, dear Jörn,
>
>
>
> I am currently trying to use the standard BEM head model provided in the
> fieldtrip toolbox (on a 19 electrodes EEG recording, segmented into
> 10-seconds trials, not time-locked), but I have encountered a problem I
> could not resolve:
>
>
>
> Error using svd
>
> Input to SVD must not contain NaN or Inf.
>
>
>
> Error in pinv (line 29)
>
>    [U,S,V] = svd(A,0);
>
>
>
> Error in pinv (line 27)
>
>    X = pinv(A',varargin{:})';
>
>
>
> Error in minimumnormestimate (line 151)
>
>     w = pinv(lf);
>
>
>
> Error in ft_sourceanalysis (line 876)
>
>         dip(i) = minimumnormestimate(grid, sens, vol, squeeze_avg,
> optarg{:});
>
>
>
> Following some old posts in the mailing list I made sure the electrodes
> data structure of the data is the same as that given in the cfg
> of ft_sourceanalysis.  However, it is still possible that using a 19
> electrodes recording is not possible using the source model I am using?
>
>
>
> I am also afraid computing the source reconstruction on such continuous
> data, that is not time-locked, could be a problem. For example, having to
> calculate the “avg” field artificially seems a little fishy.
>
>
>
> I also tried running the code on the EEG data of the continuous data
> preprocessing tutorial (after choosing only 19 of its electrodes, though
> possibly not the right ones).
>
>
>
> Any advice would be greatly appreciated!
>
> Thank you all,
>
> Roey
>
>
>
>
>
>
> THE CODE
>
> ---------------
>
> % Load head model, “vol”
>
> hdmfile = fullfile(which('standard_bem.mat'));
>
> load(hdmfile);
>
>
>
> % Create grid
>
> gridcfg = [];
>
> gridcfg.grid.xgrid = -20:1:20;
>
> gridcfg.grid.ygrid = -20:1:20;
>
> gridcfg.grid.zgrid = -20:1:20;
>
> gridcfg.grid.unit = 'cm';
>
> gridcfg.grid.tight = 'yes';
>
> gridcfg.inwardshift = -1.5;
>
> gridcfg.vol = vol;
>
>
>
> gridVar = ft_prepare_sourcemodel(gridcfg);
>
>
>
> % Restrict source reconstruction to outside of the cerrebellum
>
> gridVar = getRidOfCerrebellum([], gridVar);
>
>
>
> % Source reconstruction
>
> slcfg = struct;
>
> slcfg.method = ‘mne’;
>
> slcfg.elec = data.elec;
>
> slcfg.grid = gridVar;
>
> slcfg.vol = vol;
>
> slcfg.rawtrial = 'yes';
>
> slcfg.hdmfile = hdmfile;
>
> slcfg.mne.lambda = '5%';
>
> slcfg.keepfilter = 'yes';
>
> slcfg.rawtrial = 'no'; % this is because we are now just computing the
> spatial filter
>
> slcfg.singletrial = 'no';
>
> slcfg.keeptrials = 'yes';
>
>
>
> % calculate the avg of each trial, for use in ft_sourceanalysis
>
> for trialI = 1:length(data.trial)
>
>     data.avg(:,trialI) = mean(data.trial{trialI}')';
>
> end
>
>
>
> source_for_filter = ft_sourceanalysis(slcfg, data); %this source structure
> is used to compute the filter to be used later
>
>
>
> On Fri, Jul 25, 2014 at 9:46 AM, "Jörn M. Horschig" <
> jm.horschig at donders.ru.nl> wrote:
>
>> Dear Roey,
>>
>> I agreet that this is a bad idea - independently of what result you will
>> get, the error is just too big to draw any reliable conclusions. Imho, you
>> can better try using ICA to decompose your data into components.
>>
>> Concerning the headmodel, there is a standard BEM headmodel template
>> available in FieldTrip.
>>
>> Best,
>> Jörn
>>
>>
>> On 7/24/2014 8:50 PM, Roey Schurr wrote:
>>
>>> Dear Jim,
>>> Thank you for drawing my attention to this problem. I have actually
>>> tried building a realistic head model using OPENMEG but encountered some
>>> compitability problems since our lab does not use Linux. This is indeed one
>>> of the most important (short) future tasks - being able to use such
>>> realistic head models.
>>> Best,
>>> roey
>>>
>>>
>>> On Thu, Jul 24, 2014 at 6:34 PM, E688205 <j.herring at fcdonders.ru.nl
>>> <mailto:j.herring at fcdonders.ru.nl>> wrote:
>>>
>>>     Dear Roey,
>>>
>>>     To add to Diego's comments, since you are dealing with EEG data a
>>>     single sphere headmodel is not a good idea because it does not
>>>     take into account the differences in conductivity between the
>>>     skull, scalp, and brain. This is not a problem for MEG but is
>>>     important for EEG. Therefore it is better to use, for example, a
>>>     BEM head model.
>>>
>>>     Best,
>>>
>>>     Jim
>>>
>>>     On 23 jul. 2014, at 16:38, "Lozano Soldevilla, D. (Diego)"
>>>     <d.lozanosoldevilla at fcdonders.ru.nl
>>>     <mailto:d.lozanosoldevilla at fcdonders.ru.nl>> wrote:
>>>
>>>      Dear Roey,
>>>>
>>>>     In my opinion it's definitely not a good idea to compute MNE
>>>>     using 19 sensors. There are studies that have found a drastic
>>>>     localization precision from 31 to 63 electrodes and further
>>>>     improvements till 123:
>>>>
>>>>     http://www.ncbi.nlm.nih.gov/pubmed/15351361 (see figure 1)
>>>>     http://www.ncbi.nlm.nih.gov/pubmed/12495765
>>>>
>>>>     Although it's very difficult to know the "minimum" number of
>>>>     electrodes needed to accurately localize a given source (it
>>>>     depends on the strength of the source you want to localize,
>>>>     source reconstruction algorithm, data noise...), 19 electrodes
>>>>     are too low to trust the results you can get.
>>>>
>>>>     best,
>>>>
>>>>     Diego
>>>>
>>>>
>>>>     ------------------------------------------------------------
>>>> ------------
>>>>      From roeysc atgmail.com  <http://gmail.com>   Mon Jul 21 11:21:32
>>>> 2014
>>>>     From: roeysc atgmail.com  <http://gmail.com>  (Roey Schurr)
>>>>
>>>>     Date: Mon, 21 Jul 2014 12:21:32 +0300
>>>>     Subject: [FieldTrip] MNE Source Reconstruction Sanity Check
>>>>     Message-ID: <CAHm4wZBRYo4fV63EL9yXaAQ_W43cHF_8J2b+rNyzd55x4aRviw@
>>>> mail.gmail.com  <mailto:CAHm4wZBRYo4fV63EL9yXa
>>>> AQ_W43cHF_8J2b+rNyzd55x4aRviw at mail.gmail.com>>
>>>>
>>>>
>>>>     Dear fieldtrippers,
>>>>
>>>>
>>>>
>>>>     I want to do a sanity check on mne source reconstruction.
>>>>
>>>>     I'm working on continuous EEG recordings (19 electrodes),
>>>> estimating the
>>>>     source reconstruction activity using the *mne* (minimum norm
>>>> estimate)
>>>>     method, a *template MRI* (Colin27) and a *singlesphere* headmodel.
>>>> As a
>>>>     sanity check for the source reconstruction itself, I wanted to
>>>> compare
>>>>     conditions in which I could estimate the loci of significant
>>>> changes, e.g.:
>>>>     rest vs movement of the hand, moving the right hand vs the left
>>>> hand, etc.
>>>>     I have about 60 seconds of recording for each condition.
>>>>
>>>>
>>>>
>>>>     What I did was:
>>>>
>>>>     1) Segment the recording of each condition into many "trials" of 2
>>>> seconds
>>>>     each.
>>>>
>>>>     2) For each trial, average the activity in each of the 90 ROIs of
>>>> the aal
>>>>     atlas (I excluded the cerebellum from the source reconstruction).
>>>>
>>>>
>>>>
>>>>     I was wondering what comparison would be best in this case. Since
>>>> this is
>>>>     not Evoked Responses data, I find it hard to find relevant ideas,
>>>> and would
>>>>     like to hear your thoughts.
>>>>
>>>>
>>>>
>>>>     1) I did a frequency analysis (mtmfft) in conventional bands of
>>>> interest
>>>>     and ran ft_freqstatistics on the resulting structures (using ttest2
>>>> and the
>>>>     bonferoni correction for the multiple comparison problem). This
>>>> gave some
>>>>     results, however for most conditions they are not very encouraging
>>>> (the
>>>>     ROIs that showed significant differences were not close to those
>>>> that I
>>>>     have assumed).
>>>>
>>>>
>>>>
>>>>     *QUESTION 1*: do you think this is a proper method? Note that I did
>>>> not use
>>>>     a frequency based source reconstruction in the first place, because
>>>> I'm
>>>>     ultimately interested in the time course in the source space.
>>>>
>>>>
>>>>
>>>>     2) I was wondering if a cluster based permutation test is
>>>> impossible to use
>>>>     here, since this is a continuous recording, so clustering according
>>>> to time
>>>>     adjacency seems irrelevant.
>>>>
>>>>
>>>>
>>>>     *QUESTION 2*: is it possible to use a cluster based statistical
>>>> test here?
>>>>     If so, it could be better than a-priori averaging the source
>>>> activity in
>>>>     the atlas ROIs, which could mask some of the effects, if they are
>>>> located
>>>>     in a small area.
>>>>
>>>>
>>>>
>>>>     3) Another possibility is looking at the data itself. Unfortunately
>>>> I
>>>>     encountered some problems using ft_sourcemovie, though this is a
>>>> subject
>>>>     for a different thread.
>>>>
>>>>
>>>>
>>>>     Any thoughts and advice are highly appreciated!
>>>>
>>>>     Thank you for taking the time,
>>>>
>>>>     roey
>>>>     _______________________________________________
>>>>
>>>>     fieldtrip mailing list
>>>>     fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>>>>     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>>
>>>
>>>     _______________________________________________
>>>     fieldtrip mailing list
>>>     fieldtrip at donders.ru.nl <mailto: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
>>>
>>
>>
>> --
>> Jörn M. Horschig
>> PhD Student
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognitive Neuroimaging
>> Radboud University Nijmegen
>> Neuronal Oscillations Group
>> FieldTrip Development Team
>>
>> P.O. Box 9101
>> NL-6500 HB Nijmegen
>> The Netherlands
>>
>> Contact:
>> E-Mail: jm.horschig at donders.ru.nl
>> Tel:    +31-(0)24-36-68493
>> Web: http://www.ru.nl/donders
>>
>> Visiting address:
>> Trigon, room 2.30
>> Kapittelweg 29
>> NL-6525 EN Nijmegen
>> The Netherlands
>>
>>
>> _______________________________________________
>> 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/20140908/d7c3d5a5/attachment-0001.html>


More information about the fieldtrip mailing list