<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear Julia,
<div><br>
</div>
<div>I did not see your error message. Maybe, <span style="font-size: 13.3333px;">your lfp data structure is </span>still in a continuous recording format without a trial definition?</div>
<div><span style="font-size: 10pt;"> </span></div>
<div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF157303" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of Julia Coopi [juliacoopiza@gmail.com]<br>
<b>Sent:</b> Sunday, September 03, 2017 11:14 AM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Using PPC method<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>Dear<span name="Andreas Wutz" class="gmail-m_2378015618711542107gmail-gD"> Andreas,<br>
<br>
</span></div>
<span name="Andreas Wutz" class="gmail-m_2378015618711542107gmail-gD">Thanks for your response, I am going through your suggestion. did you have any problem regarding the appending spikes and lfp. I got this error:<br>
<span style="color:rgb(255,0,0)"><br>
Error using ft_appendspike (line 112)<br>
could not find the trial information in the continuous data</span><br>
<br>
</span></div>
<span name="Andreas Wutz" class="gmail-m_2378015618711542107gmail-gD">thanks. <br>
</span></div>
<span name="Andreas Wutz" class="gmail-m_2378015618711542107gmail-gD">Julia<br>
</span></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Aug 28, 2017 at 4:55 PM, Andreas Wutz <span dir="ltr">
<<a href="mailto:awutz@mit.edu" target="_blank">awutz@mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Dear Tianyang,
<div><br>
</div>
<div>maybe it's a good idea to download the accompanying sample data from the tutorial and look if you can recreate the shown data structure. Then look closer into the values of the respective fields. That should give you a better grasp on what is required
 there. </div>
<div><br>
</div>
<div>I have not fully looked into the code but my feeling is that spikeTrials.timestamp is not of any further use and is just carried from the data structure before (which was not cut into trials and where the raw timestamps were useful). The timing of spikes
 relative to the trial zero point is fully described in the fields ".time", ".trial" and ".trialtime".</div>
<div>Best,</div>
<div>Andreas </div>
<div><br>
</div>
<div><br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<div id="m_-3894158329396579113divRpF625519" style="direction:ltr"><font size="2" color="#000000" face="Tahoma"><span class=""><b>From:</b>
<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.<wbr>nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.<wbr>nl</a>] on behalf of ÂíÌìÑô [<a href="mailto:tianyangma2013@gmail.com" target="_blank">tianyangma2013@gmail.com</a>]<br>
</span><b>Sent:</b> Monday, August 28, 2017 5:31 PM<br>
<b>To:</b> FieldTrip discussion list<span class=""><br>
<b>Subject:</b> Re: [FieldTrip] Using PPC method<br>
</span></font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div dir="ltr">Dear Andreas,
<div><br>
</div>
<div>I still don't quite understand the tutorial.</div>
<div>
<pre class="m_-3894158329396579113gmail-code m_-3894158329396579113gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)"><font size="1">spikeTrials = 
         label: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">{</span><span class="m_-3894158329396579113gmail-co2" style="color:rgb(51,153,51)">'sig002a_wf'</span>  <span class="m_-3894158329396579113gmail-co2" style="color:rgb(51,153,51)">'sig003a_wf'</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">}</span>
     timestamp: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">{</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/int32.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">int32</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/int32.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">int32</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">}</span>
      waveform: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">{</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x32x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x32x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">}</span>
          unit: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">{</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">}</span>
           hdr: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x1 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/struct.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">struct</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>
        dimord: <span class="m_-3894158329396579113gmail-co2" style="color:rgb(51,153,51)">'{chan}_lead_time_spike'</span>
           cfg: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x1 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/struct.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">struct</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>
          time: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">{</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">}</span>
         trial: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">{</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x83601 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span>  <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>1x61513 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">}</span>
     trialtime: <span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">[</span>600x2 <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/double.html" style="color:rgb(51,153,243); text-decoration:none; background-color:transparent" target="_blank"><span class="m_-3894158329396579113gmail-kw2" style="color:rgb(0,0,0); font-weight:bold">double</span></a><span class="m_-3894158329396579113gmail-br0" style="color:rgb(102,204,102)">]</span></font></pre>
<pre class="m_-3894158329396579113gmail-code m_-3894158329396579113gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials?</pre>
<pre class="m_-3894158329396579113gmail-code m_-3894158329396579113gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">I feel I am quite lost. </pre>
<pre class="m_-3894158329396579113gmail-code m_-3894158329396579113gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">Best,</pre>
<pre class="m_-3894158329396579113gmail-code m_-3894158329396579113gmail-matlab" style="overflow:auto; font-family:Menlo,Monaco,Consolas,"Courier New",monospace; padding:9.5px; margin-top:0px; margin-bottom:10px; line-height:1.42857; word-break:break-all; word-wrap:break-word; color:rgb(51,51,51); border:1px solid rgb(204,204,204); white-space:pre-wrap; background-color:rgb(245,245,245)">Tianyang</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>