<div dir="ltr"><div>Hi Marta,</div><div><br></div><div></div><div>Concerning your first question; I would check your (mean) baseline values for those trials that give a problem. Note that the code for ft_freqbaseline is pretty straightforward:<br></div><div><br></div><div>[line 198]<br></div><div><br></div><div>if (strcmp(baselinetype, 'absolute'))<br>  data = data - meanVals;<br>elseif (strcmp(baselinetype, 'relative'))<br>  data = data ./ meanVals;<br>elseif (strcmp(baselinetype, 'relchange'))<br>  data = (data - meanVals) ./ meanVals;<br>elseif (strcmp(baselinetype, 'normchange')) || (strcmp(baselinetype, 'vssum'))<br>  data = (data - meanVals) ./ (data + meanVals);<br><b>elseif (strcmp(baselinetype, 'db'))<br>  data = 10*log10(data ./ meanVals);</b></div><div><br></div><div>You could place a breakpoint here, inspect the baseline values, and see if that might clear things up.<br></div><div><br></div><div>I'm afraid I don't understand your second question as bandpass filtering doesn't result in TF, nor in a matrix (but a cell struct). In any case, in my limited understanding of filters, increasing the order increases the temporal width of the filter, so you might have some short/incomplete trials that might be causing the problem?<br></div><div><br></div><div>Hope this helps your debugging,</div><div>Stephen<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op ma 4 jan. 2021 om 15:02 schreef Marta Andujar <<a href="mailto:marta.andujar@uniroma1.it">marta.andujar@uniroma1.it</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear All, <div><br></div><div>I am performing a TF analysis via wavelet algorithm. I am using a db baseline normalization. For few trials and only in some channels and conditions, after this procedure  i get -inf as power value. Raw data do not contain NaN. Why I get this result? By inspecting the power at single trial level I could not see any "overnormal" noise in those trials. </div><div>A second question concerns the prerocessing: I am applying a butterwoth bandpass([0.5 1000 Hz]) filter to raw data sampled at 24 KHz. If I set the filter order to 5, the resulting TF matrix is an m by n NaN matrix. However this occurs again, only for some channels and conditions. At the moment I am applying a second order filter to avoid this problem but I would like to figure out why this occurs.</div><div>Many thanks</div><div><br></div><div>Marta</div></div>

<br>
<div style="font-size:1.3em"><font size="2"><span style="color:rgb(34,34,34);font-family:Verdana,sans-serif;background-color:rgb(255,255,255)">________________________________________________________</span></font></div><font size="1"><span style="color:rgb(34,34,34);font-family:Verdana,sans-serif;background-color:rgb(255,255,255)">Le informazioni contenute in questo messaggio di posta elettronica sono strettamente riservate e indirizzate esclusivamente al destinatario. Si prega di non leggere, fare copia, inoltrare a terzi o conservare tale messaggio se non si è il legittimo destinatario dello stesso. Qualora tale messaggio sia stato ricevuto per errore, si prega di restituirlo al mittente e di cancellarlo permanentemente dal proprio computer.</span><br style="color:rgb(34,34,34);font-family:Verdana,sans-serif;background-color:rgb(255,255,255)"><span style="color:rgb(34,34,34);font-family:Verdana,sans-serif;background-color:rgb(255,255,255)">The information contained in this e mail message is strictly confidential and intended for the use of the addressee only.  If you are not the intended recipient, please do not read, copy, forward or store it on your computer. If you have received the message in error, please forward it back to the sender and delete it permanently from your computer system.</span></font><div><hr></div>
<br>
<img src="https://drive.google.com/uc?id=1jSNW-wN76rZklfkg4rwweBp5lrX6mO9g">_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>