<div dir="ltr"><div>Dear all,</div><div>I have a question concerning source localization implementation. I need help in the very last step of visualizing a <span style="color:rgb(0,0,0);font-family:Calibri,Geneva,Arial,Verdana,sans-serif;font-size:15px;line-height:22.5px;text-align:justify">difference between 2 conditions</span> over time:</div>
<div><br></div><div>I get there by using the tutorial steps on single subject functional EEG data (<i>fieldtrip-20130914; </i>tried both WIN and MAC):</div><div><br></div><div><i>clear all;</i></div><div><i>load('F:\fieldtrip-20130914\EEG1_HC35_GA_XY_ICA_rHFdemeanktkt.mat')</i></div>
<div><i>load('F:\fieldtrip-20130914\EEG1_HC35_GA_XY_ICA_lHFdemeanktkt.mat')</i></div><div><i>load leadfield;</i></div><div><i>load vol;</i></div><div><i>load elec_aligned;</i></div><div><i><br></i></div><div><i><br>
</i></div><div><i>cfg = [];</i></div><div><i>
cfg.method = 'mne';</i></div><div><i>cfg.elec = elec_aligned;</i></div><div><i>cfg.grid = leadfield;</i></div><div><i>cfg.vol = vol;</i></div><div><i>cfg.mne.prewhiten = 'yes';</i></div><div><i>cfg.mne.lambda = 3;</i></div>
<div><i>cfg.mne.scalesourcecov = 'yes';</i></div>
<div><i>cfg.mne.normalize = 'yes';</i></div><div><i>sourcerHF = ft_sourceanalysis(cfg, EEG1_HC35_GA_XY_ICA_rHFdemeanktkt);</i></div><div><i>sourcelHF = ft_sourceanalysis(cfg, EEG1_HC35_GA_XY_ICA_lHFdemeanktkt);</i></div>
<div><i><br></i></div>
<div><i>save source sourcerHF sourcelHF;</i></div><div><i><br></i></div><div><i>clear all;</i></div><div><br></div><div><i>load source;</i></div><div><i>load sourcespace;</i></div><div><i><br></i></div><div><i>bnd.pnt = sourcespace.pnt;</i></div>
<div><i>bnd.tri = sourcespace.tri;</i></div>
<div><i>m=sourcerHF.avg.pow(:,1200);</i></div><div><i>ft_plot_mesh(bnd, 'vertexcolor', m);</i></div><div>
<i><br></i></div><div><i><br></i></div><div><i><br></i></div><div><div><i>> In ft_defaults at 74</i></div><div><i> In ft_sourceanalysis at 146</i></div><div><i>the input is timelock data with 32 channels and 7000 timebins</i></div>
<div><i>using headmodel specified in the configuration</i></div>
<div><i>using electrodes specified in the configuration</i></div><div><i>determining source compartment (3)</i></div><div><i>projecting electrodes on skin surface</i></div><div><i>combining electrode transfer and system matrix</i></div>
<div><i>creating dipole grid based on user specified dipole positions</i></div>
<div><i>using headmodel specified in the configuration</i></div><div><i>using gradiometers specified in the configuration</i></div><div><i>8196 dipoles inside, 0 dipoles outside brain</i></div><div><i>the call to "ft_prepare_sourcemodel" took 0 seconds</i></div>
<div><i>estimating current density distribution for repetition 1</i></div><div><i>using pre-computed leadfields: some of the specified options will not have an effect</i></div><div><i>computing the solution where the noise covariance is used for regularisation</i></div>
<div><i>prewhitening the leadfields using the noise covariance</i></div><div><i>scaling the source covariance</i></div><div><i>the call to "ft_sourceanalysis" took 10 seconds</i></div><div><i>the input is timelock data with 32 channels and 7000 timebins</i></div>
<div><i>using headmodel specified in the configuration</i></div><div><i>using electrodes specified in the configuration</i></div><div><i>determining source compartment (3)</i></div><div><i>projecting electrodes on skin surface</i></div>
<div><i>combining electrode transfer and system matrix</i></div>
<div><i>creating dipole grid based on user specified dipole positions</i></div><div><i>using headmodel specified in the configuration</i></div><div><i>using gradiometers specified in the configuration</i></div><div><i>8196 dipoles inside, 0 dipoles outside brain</i></div>
<div><i>the call to "ft_prepare_sourcemodel" took 0 seconds</i></div><div><i>estimating current density distribution for repetition 1</i></div><div><i>using pre-computed leadfields: some of the specified options will not have an effect</i></div>
<div><i>computing the solution where the noise covariance is used for regularisation</i></div><div><i>prewhitening the leadfields using the noise covariance</i></div><div><i>scaling the source covariance</i></div><div><i>the call to "ft_sourceanalysis" took 87 seconds</i></div>
<div><i>>> </i></div></div><div><i><br></i></div><div><div><i>cfg = [];</i></div><div><i>cfg.projectmom = 'yes';</i></div><div><i>sdrHF = ft_sourcedescriptives(cfg,sourcerHF);</i></div><div><i>sdlHF = ft_sourcedescriptives(cfg, sourcelHF);</i></div>
<div><i><br></i></div><div><i>sdDIFF = sdrHF;</i></div><div><i>sdDIFF.avg.pow = sdrHF.avg.pow - sdlHF.avg.pow;</i></div><div><i>sdDIFF.tri = sourcespace.tri;</i></div><div><i><br></i></div><div><i>save sd sdrHF sdlHF sdDIFF;</i></div>
<div><br></div><div>Then I tried different suggestions from the tutorial or the mailing list:</div><div><br></div><div><i>cfg = [];</i></div>
<div><i>cfg.mask = 'avg.pow';</i></div><div><i>ft_sourcemovie(cfg,sdDIFF);</i></div><div><i><br></i></div><div><i>the input is source data with 8196 positions</i></div><div><i>baseline correcting dipole moments [--------------------------------------\]</i></div>
<div><i>
projecting dipole moment [------------------------------------------------/]</i></div><div><i>computing power [---------------------------------------------------------|]</i></div><div><i>the call to "ft_sourcedescriptives" took 32 seconds</i></div>
<div><i>the input is source data with 8196 positions</i></div><div><i>baseline correcting dipole moments [---------------------------------------]</i></div><div><i>projecting dipole moment [------------------------------------------------\]</i></div>
<div><i>computing power [----------------------------------------------------------]</i></div><div><i>the call to "ft_sourcedescriptives" took 33 seconds</i></div><div><i>the input is source data with 8196 vertex positions and 16384 triangles</i></div>
<div><i>Warning: use cfg.maskparameter instead of cfg.mask </i></div><div><i>> In ft_checkconfig at 120</i></div><div><i> In ft_sourcemovie at 48</i></div><div><i>??? Error using ==> set</i></div><div><i>Bad property value found.</i></div>
<div><i>Object Name : axes</i></div>
<div><i>Property Name : 'CLim'</i></div><div><i>Values must be increasing and non-NaN.</i></div><div><i><br></i></div><div><i>Error in ==> caxis at 80</i></div><div><i> set(ax,'CLim',arg);</i></div>
<div><i><br></i></div><div><i>Error in ==> ft_sourcemovie at 263</i></div>
<div><i>caxis(cfg.zlim);</i></div></div><div><br></div><div><br></div><div><br></div><div>If I set a break before this point I can see that "arg" indeed contains two NaNs only.</div><div><br></div><div>Do you have any suggestions why the script above fails to determine the axes properties?</div>
<div><br></div><div>Alternatively I tried:</div><div><br></div><div><div><i>figure</i></div><div><i>sdDIFF.tri = sourcespace.tri;</i></div><div><i>cfg = [];</i></div><div><i>cfg.alim = [0 0.5];</i></div><div><i>cfg.zlim = [0 0.5];</i></div>
<div><i>cfg.maskparameter = 'avg.pow';</i></div><div><i>ft_sourcemovie(cfg,sdDIFF);</i></div></div>
<div><br></div><div><br></div><div>That results in a GUI that does seem to work but in the time course there is no activity displayed.</div><div><br></div><div>Any advice how to visualize the difference properly?</div><div>
Thanks in advance.</div><div>Best </div><div>Leo</div><div>RWTH Aachen Neurology</div><div><br></div><div><br></div><div>P.S.</div><div>structure of the difference <i>sdDIFF</i>:</div><div><br></div><div><div><i>time: [1x7000 double]</i></div>
<div><i> pos: [8196x3 double]</i></div><div><i> inside: [8196x1 double]</i></div><div><i> outside: [1x0 double]</i></div><div><i> method: 'average'</i></div><div><i> avg: [1x1 struct]</i></div>
<div><i> cfg: [1x1 struct]</i></div><div><i> tri: [16384x3 int32]</i></div></div><div><br></div></div>