<div dir="ltr">Hello fellow fieldtrippers,<br><br>I'm using fieldtrip to do a MNE for
EEG data with no subject MRIs and I have a few questions to which I
can't get a straight answer from tutorials or from mailing list history.
I guess this is sort of a sanity check.<br><br>First, I'm wondering
about the correct sourcemodel, as loading the standard_bem and setting
the third mesh as the source points in ft_prepare_leadfield gives an
error: Warning: dipole lies on boundary of volume model.<br><br>Code:<br>% Electrodes, vol, sourcemodel all set in same scale with ft_convert_units<br><br>vol = load('standard_bem');<br>cfg = [];<br>cfg.elec = elec_aligned; <div dir="ltr"> % electrodes aligned to skin surface<br>cfg.grid.pos = vol.bnd(3).pnt; % source points<br>cfg.grid.inside = 1:size(vol.bnd(3).pnt,1);<br>cfg.vol = vol;<br>cfg.reducerank = 3;<br>leadfield = ft_prepare_leadfield(cfg);<br><br>Using the code below works:<br><br>vol = load('standard_bem');<br>sourcemodel = ft_read_headshape('cortex_8196.surf.gii');<br>cfg = [];<br>cfg.elec = elec_aligned; % electrodes aligned to skin surface<br>cfg.grid.pos = sourcemodel; % source points<br>cfg.grid.inside = 1:size(sourcemodel,1);<br>cfg.vol = vol;<br>cfg.reducerank = 3;<br>leadfield = ft_prepare_leadfield(cfg);<br><br>But as the <a href="http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg" target="_blank">http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg</a>
seems to suggest the third mesh in vol should be the brain? Or is the third compartment there just for conduction
calculations?<br><br>As using the sourcemodel 'cortex_8196.surf.gii' at
least gave an output I went forward with those for now, to see what
other problems I'd encounter. Running the MNE:<br><br>cfg = [];<br>cfg.elec = elec_aligned;<br>cfg.method = 'mne';<br>cfg.grid = leadfield;<br>cfg.vol = vol;<br>cfg.mne.prewhiten = 'yes';<br>cfg.mne.lambda = 60; %Hmmm?<br>cfg.mne.scalesourcecov = 'yes';<br>cfg.mne.normalize = 'yes';<br>cfg.channel = 'all';<br>cond_12_source{subject_id} = ft_sourceanalysis(cfg,cond_12{subject_id});<br><br><br>So
secondly, I'm concerned with the lambda value, as different tutorials
give very different advice ranging from 3 to 1e8. Running the MNE with 3
seems to give very unstable results when comparing the results between
subjects or conditions. The data is somewhat contaminated with leftover
eye-movement artefacts (removed with ICA). And that 3 is from the
tutorial where the data is from MEG. So a bigger lambda is in order, but
how big? Or just let the minimumnormestimate.m calculate it from the
data? I have to point out that the eye-movements are somewhat spread
around the trial durations and not present in the calculation window of
the .cov field from ft_timelockanalysis. Should I maybe calculate the
.cov field from the whole trial?<br><br>Third, there has been talk of
MNE statistics in the mailing list, and it seems that the
ft_timelockstatistics will do the job if a neighbours structure is
provided. I build the neighbours structure from the sourcemodel mesh
like this:<br><br>sourcemodel = ft_read_headshape('cortex_8196.surf.gii');<br>nsources = length(sourcemodel.pnt);<br>neighbours=struct;<br>for i=1:nsources<br> neighbours(i).label = num2str(i);<br> neighb_nodes = sourcemodel.tri((sourcemodel.tri(:,1)==i | sourcemodel.tri(:,2)==i | sourcemodel.tri(:,3)==i),:);<br> neighb_nodes = unique(neighb_nodes)';<br> idx = (neighb_nodes ~= i);<br> neighb_nodes = neighb_nodes(idx);<br> for k=1:length(neighb_nodes)<br> neighbours(i).neighblabel{k} = num2str(neighb_nodes(k));<br> end<br>end<br><br>This
seemed to give reasonable neighbours and just going by distance gave
some sources that were on the other side of a gyrus. Although now the distances are not uniform.<br><br></div><div>I also had to tweak the data structures a little bit, labels and such.<br></div><div>Then I ran the tests with:<br><br>cfg=[];<br>cfg.parameter = 'avg.pow';<br>cfg.method = 'montecarlo';<br>cfg.statistic = 'depsamplesT';<br>cfg.parameter = 'avg';<br>cfg.correctm = 'cluster';<br>cfg.clusterstatistic = 'maxsum';<br>cfg.minnbchan = 2;<br>cfg.numrandomization = 1000;<br>cfg.tail = 1;<br>cfg.correcttail ='alpha';<br>cfg.alpha = 0.05;<br>cfg.latency = [0.4 0.5];<br>cfg.avgovertime = 'yes';<br><br>cfg.neighbours = neighbours;<br><br>cfg.design = [1:15 1:15;ones(1,15), ones(1,15)*2];<br>cfg.uvar = 1;<br>cfg.ivar = 2;<br></div><div dir="ltr">cond1_stat = ft_timelockstatistics(cfg, cond_11_source{:}, cond_12_source{:});<br><br>Looking at the resulting clusters from
ft_timelockstatistics there were clusters that when plotted showed
disconnected sources. For example, plotted like this for the first cluster:<br><br>paint = ones(8196,3);<br>indx = find(cond1_stat.posclusterslabelmat == 1);<br>paint(indx,2) = 0;<br>ft_plot_mesh(sourcemodel,'vertexcolor',paint);<br></div><div><br></div><div dir="ltr"><br>Gave the output in the attachment, in that case the third source is atleast close, but still not a neighbour to the two next to it. Is there maybe something I'm missing with using the
ft_timelockstatistics like this?<br><br>I hope someone can clarify some of these issues.<br><br>Thank you already in advance!<br><br>Tatu</div></div>