[FieldTrip] Getting unrealistic results or artifacts using beamforming

m.goeldi at psychologie.uzh.ch m.goeldi at psychologie.uzh.ch
Fri Oct 3 11:02:02 CEST 2014

 Hi fieldtrippers

I am trying to do source localization for my EEG data with beamforming, but my results seem to indicate something has gone wrong.
The subjects were exposed to a flickering screen of 14Hz so I expect atleast some activity in the visual cortex. 
The topoplot of a frequency analysis showed a 15Hz peak in the parietal area.

The Problem:
I always get extreme activity in a few voxels, usually around the fringes of my volume, several orders of magnitude larger than the rest.
See attached figure 1.
If I adjust the colorscale of my plot drastically i only get activity at the fringes of the brain/along the skull.
See figure 2.

This seems like a systematic error but at this point I am not sure where my error is. 
I am suspecting the forward/inverse model, the frequency analysis or my preprocessing pipeline. (So basically everything)

I have created my source model using .\fieldtrip-20140225\template\headmodel\standard_bem.mat provided in fieldtrip 
and I have also tried to create the headmodel myself using .\fieldtrip-20140225\template\headmodel\standard_mri.mat.
The results are slightly different as in where the extreme activities are, but qualitatively they are the same.
A plot of the head and source model with the electrodes is attached in figure3. Source, head and electrodes seem to math up fine.

The Questions:
Is there something obviously wrong with my head/source model?

Is there something wrong with how i calculate the cross spectral density matrix? 
And is there a way to visualize the output of ft_freqanalysis to do a sanity-check?
Since there is no time dimension the ft plotting options don't work.

Is there something wrong with my preprocessing pipeline? (Artifact rejection was done before using VisionAnalyzer2)

Thanks in advance for your thoughts and inputs


PS: Before submitting this I updated to the newest version of ft (20141002) to see if it was a version issue. 
It turns out that all the template files I had been using from my previous install (20140225) have vanished sometime inbetween.
Is there a reason for this?
Btw. I ran it with the new version and the old template files and the result is the same.

Some Code:

%% Preprocessing:
cfg = [];                                           % empty configuration
cfg.dataset                 = '..\Data\9 20131105 0928_Segmentation 3.dat';       % dataset  
cfg.trialdef.eventtype      = 'Comment';
cfg.trialdef.prestim        = 0.3;
cfg.trialdef.poststim       = 2;
cfg.trialdef.eventvalue     = {'14HZ'}; 

cfg = ft_definetrial(cfg);

% baseline correction
cfg.demean = 'yes';
cfg.baselinewindow = [-0.3 0];

% rereference to avg over all
cfg.reref = 'yes';
cfg.refchannel = 'all';

data = ft_preprocessing(cfg);

% shifts and scales all channles of the the input data
% to a mean of zero and a standard deviation of one.
cfg = [];
data = ft_channelnormalise(cfg,data);

% load the manually realigned electrodes

% Time window of interest
cfg = [];                                           
cfg.toilim = [0 2];                       
dataPost = ft_redefinetrial(cfg, data);

%% Calculating the cross spectral density matrix
cfg            = [];
cfg.method     = 'mtmfft';
cfg.taper = 'dpss';
cfg.output     = 'powandcsd';
cfg.keeptrials = 'yes';
cfg.tapsmofrq  = 2;
cfg.foi        = 15;
freqPost      = ft_freqanalysis(cfg, dataPost);

%% The forward model and lead field matrix
% load mri
load('C:\Program Files\MATLAB\fieldtrip-20140225\template\headmodel\standard_mri.mat')

% make segments
cfg          = [];
segmentedmri = ft_volumesegment(cfg, mri);
segmentedmri.transform = mri.transform;
segmentedmri.anatomy   = mri.anatomy;

%load template sourcemodel
template = load('C:\Program Files\MATLAB\fieldtrip-20140225\template\sourcemodel\standard_sourcemodel3d8mm'); 
% compute source model
cfg                = [];
cfg.grid.warpmni   = 'yes';
cfg.grid.template  = template.sourcemodel;
cfg.grid.nonlinear = 'yes'; % use non-linear normalization
cfg.mri            = mri;
sourcemodel        = ft_prepare_sourcemodel(cfg);

% make headmodel
cfg        = [];
cfg.method = 'openmeeg'; 
hdm        = ft_prepare_headmodel(cfg, segmentedmri);
vol = ft_convert_units(hdm, 'cm');

% lead field
cfg                 = [];
cfg.grid            = sourcemodel;
cfg.elec            = elec;
cfg.vol             = vol;
cfg.channel = 'all';
cfg.normalize = 'yes';       % normalize instead of contrasting to noise estimate
[grid] = ft_prepare_leadfield(cfg,freqPost);

%% Source Analysis
cfg              = []; 
cfg.elec         = elec;
cfg.method       = 'dics';
cfg.frequency    = freqPost.freq;  
cfg.grid         = grid; 
cfg.vol          = vol;
cfg.keeptrials        = 'yes';
cfg.dics.lambda       = '10%';
cfg.dics.keepfilter   = 'yes';
cfg.dics.fixedori     = 'yes';
cfg.dics.realfilter   = 'yes';
sourcePost_nocon = ft_sourceanalysis(cfg, freqPost);

cfg              = [];
cfg.voxelcoord   = 'no';
cfg.parameter    = 'avg.pow';
cfg.interpmethod = 'nearest';
sourcePostInt_nocon  = ft_sourceinterpolate(cfg, sourcePost_nocon ,mri);

% plot
cfg              = [];
cfg.method       = 'slice';
cfg.funparameter = 'avg.pow';
cfg.maskparameter = cfg.funparameter;
% cfg.funcolorlim   = [0.0 0.08];
% cfg.opacitylim    = [0.0 0.2]; 
cfg.opacitymap    = 'rampup'; 

University of Zürich
Maurice Göldi
Department of Psychology
Binzmühlestr. 14 / Box 5
CH - 8050 Zrich

Tel. +41 (0)44 635 74 55
maurice.goeldi at uzh.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141003/918184bc/attachment-0001.html>

More information about the fieldtrip mailing list