<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;
mso-ligatures:none;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1523594348;
mso-list-template-ids:-983824702;}
@list l1
{mso-list-id:2027056458;
mso-list-template-ids:-532874654;}
@list l1:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style>
</head>
<body lang="NL" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Dear FieldTrip Support Team,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">I am writing to seek assistance with an issue I am encountering while using the ft_artifact_zvalue function in FieldTrip for artifact rejection.
Despite my data containing no NaN values initially, I receive an error during the bandpass filtering process indicating that the input is expected to be finite.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Here is a detailed description of the problem:</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">searching for artifacts in 2 channels</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Warning: data contains NaNs, not all processing methods are robust to NaNs, so the NaNs</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">might spread </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Warning: data contains NaN values </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error using filtfilt>efiltfilt</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error using filtfilt</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Expected input to be finite.</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error in filtfilt (line 102)</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> y = efiltfilt(b,a,x);</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error in filter_with_correction (line 73)</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> filt = filtfilt(B, A, dat')';</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error in ft_preproc_bandpassfilter (line 300)</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> filt = filter_with_correction(B,A,dat,dir,usefftfilt);</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error in preproc (line 405)</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">if strcmp(cfg.bpfilter, 'yes'), dat = ft_preproc_bandpassfilter(dat, fsample, cfg.bpfreq, cfg.bpfiltord, cfg.bpfilttype, cfg.bpfiltdir,
cfg.bpinstabilityfix, cfg.bpfiltdf, cfg.bpfiltwintype, cfg.bpfiltdev, cfg.plotfiltresp, cfg.usefftfilt); end</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> </span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Error in ft_artifact_zvalue (line 315)</span></i><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"> thisdat = preproc(thisdat, cfg.artfctdef.zvalue.channel, offset2time(0, hdr.Fs, size(thisdat,2)), cfg.artfctdef.zvalue, fltpadding,
fltpadding);<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></i></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">The code that I use:</span></b><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">frontalEye = {'EOG LOC-A2', 'EOG ROC-A2'}; % for artifact rejection</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg = [];</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.channel = frontalEye;</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.cutoff = 2.5;</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.trlpadding = 0;</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.artpadding = 0.4;</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.fltpadding = 0.1;</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.bpfilter = 'yes';</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.bpfreq = [0.5 2];</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.bpfiltord = 4;</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.bpfilttype = 'but';</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.hilbert = 'yes';</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">cfg.artfctdef.zvalue.interactive = 'no';</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">[cfg, artifact_EOG_eye] = ft_artifact_zvalue(cfg, data_segmented);</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Important notes:</span></b><span style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span lang="EN-US" style="font-size:12.0pt;mso-ligatures:none;mso-fareast-language:NL">I have checked and verified that the data does not contain any NaN values before the filtering process.</span><span lang="EN-US" style="mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></li><li class="MsoNormal" style="color:black;mso-list:l1 level1 lfo3"><span lang="EN-US" style="font-size:12.0pt;mso-ligatures:none;mso-fareast-language:NL">I have tried different configurations, including setting the padding to 0, which prevents the error</span><span lang="EN-US" style="mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></li></ol>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">It appears that NaN values are being introduced during the filtering process, but I am unable to determine the cause. I understand that the
filterpadding specifies how much extra data around each trial's segment is read from the file. This extra data (padding) is used to mitigate edge artifacts that can occur after applying filters to the data. However, given the encountered error, I am uncertain
if I am utilizing this function correctly. Could you please provide guidance on how to resolve this issue? </span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Thank you for your support!</span><span lang="EN-US" style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;color:black;mso-ligatures:none;mso-fareast-language:NL">Sophie Schubert</span><span style="color:#212121;mso-ligatures:none;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<!-- --><hr>
<p><font size="-2" face="arial" color="black"><i>
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht
ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct
te informeren door het bericht te retourneren. Het Universitair Medisch
Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W.
(Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij
de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197.
</i></font></p>
<p><font size="-2" face="arial" color="green"><i>
Denk s.v.p aan het milieu voor u deze e-mail afdrukt.
</i></font></p>
<hr>
<p><font size="-2" face="arial" color="black"><i>
This message may contain confidential information and is intended
exclusively for the addressee. If you receive this message
unintentionally, please do not use the contents but notify the sender
immediately by return e-mail. University Medical Center Utrecht is a legal
person by public law and is registered at the Chamber of Commerce for
Midden-Nederland under no. 30244197.
</i></font></p>
<p><font size="-2" face="arial" color="green"><i>
Please consider the environment before printing this e-mail.
</i></font></p>
</body>
</html>