<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Dear Fieldtrip Community,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
my name is Agnese Zazio and I<span style="font-family:Calibri,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"> would be grateful if you could help me with source analysis of </span>TMS-EEG data. </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Specifically, I am interested in source reconstruction of TMS-evoked potentials. To this am, I used the minimum-norm estimation following the Fieldtrip tutorial for source reconstruction of MEG event-related fields (http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate/).
 I don't have individual MRIs, thus I am using templates for the headmodel and the sourcemodel. <span style="font-family:Calibri,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">Importantly, I am working on the<span> </span></span><span style="margin:0px; font-family:Calibri,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">the
 grand average </span><span style="font-family:Calibri,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">at the group level.<span> </span></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Here's the code I used. </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
---</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>% create a preprocessed structure<br>
</span>
<div>cfg =[];<br>
</div>
<div>cfg.channel = {'EEG'};<br>
</div>
<div>cfg.demean = 'yes';<br>
</div>
<div>cfg.baselinewindow  = [-0.01 0];<br>
</div>
<div>data_prepr = ft_preprocessing(cfg, data);<br>
</div>
<div><br>
</div>
<div>cfg =[];<br>
</div>
<div>cfg.covariance = 'yes';<br>
</div>
<div>cfg.channel ={'EEG'};<br>
</div>
<div>cfg.covariancewindow = [0 0.4];<br>
</div>
<div>data_tlck = ft_timelockanalysis (cfg, data_prepr);<br>
</div>
<div><br>
</div>
<div>% forward solution [prepare leadfield]<br>
</div>
<div>cfg = [];<br>
</div>
<div>cfg.elec = elec;<br>
</div>
<div>cfg.channel = {'EEG'};<br>
</div>
<div>cfg.headmodel = vol;   % volume conduction model<br>
</div>
<div>cfg.grid = ft_read_headshape('cortex_5124.surf.gii');<br>
</div>
<div>cfg.grid.pos = sourcespace.pos;<br>
</div>
<div>cfg.grid.inside = 1:size(sourcespace.pos,1); % all source points are inside of the brain<br>
</div>
<div>leadfield = ft_prepare_leadfield(cfg);<br>
</div>
<div><br>
</div>
<div>% inverse solution (method: mne)<br>
</div>
<div>cfg        = [];<br>
</div>
<div>cfg.method = 'mne'; %'lcmv';<br>
</div>
<div>cfg.elec = elec;<br>
</div>
<div>cfg.channel = {'EEG'};<br>
</div>
<div>cfg.grid   = leadfield;<br>
</div>
<div>cfg.headmodel     = vol;<br>
</div>
<div>cfg.mne.prewhiten = 'yes';<br>
</div>
<div>cfg.mne.lambda    = 3;<br>
</div>
<div>cfg.mne.scalesourcecov = 'yes';<br>
</div>
<div>source_bial_mne      = ft_sourceanalysis(cfg, data_tlck);<br>
</div>
<div><br>
</div>
<div>%%plot<br>
</div>
<div>bnd.pos = sourcespace.pos;<br>
</div>
<div>bnd.tri = sourcespace.tri;<br>
</div>
<div>m=source_bial_mne.avg.pow(:,124); % point in time I want to plot<br>
</div>
<span>figure; ft_plot_mesh(bnd, 'vertexcolor', m);</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
---</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have two main questions: </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">First, is this approach correct to get sources for TMS-evoked potentials starting from the grandaverage? </span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif; font-size:12pt">Second, is it possible to use the same code but applying the beamformer method (lcmv) in "ft_sourceanalysis"? I have simply replaced the cfg.method field, but the output
 I get does not contain information about time. </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks in advance for your help. </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Agnese</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div style="color:rgb(34,34,34); font-family:Arial,Helvetica,sans-serif; font-size:small; background-color:rgb(255,255,255)">
<span><span><font color="#666666">Agnese Zazio, PhD Student</font></span></span><br>
</div>
<div style="color:rgb(34,34,34); font-family:Arial,Helvetica,sans-serif; font-size:small; background-color:rgb(255,255,255)">
<span>
<div><font color="#666666">Cognitive Neuroscience Section,</font></div>
<div><font color="#666666">IRCCS Saint John of God Clinical Research Centre</font></div>
<div><font color="#666666">Via Pilastroni 4, 25125 Brescia, Italy</font></div>
<div><font color="#666666" style="font-family:inherit; font-size:inherit; font-style:inherit; font-variant-ligatures:inherit; font-variant-caps:inherit">Site: </font><u style="font-family:inherit; font-size:inherit; font-style:inherit; font-variant-ligatures:inherit; font-variant-caps:inherit; color:rgb(17,85,204)"><a href="http://www.cognitiveneuroscience.it/" target="_blank">http://www.cognitiveneuroscience.it</a></u><br>
</div>
</span></div>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</body>
</html>