<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Jonathon,
<div class=""><br class="">
</div>
<div class="">I don’t know what is going wrong. I have never used this functionality myself, so I would need to dig into it in order to check whether 1) I can reproduce your problem, and 2) to look for a solution.</div>
<div class=""><br class="">
</div>
<div class="">Have you tried a different type of filter (e.g. ‘firws’) to check whether your issue is filter type dependent? As a background note, the ‘plotfiltresp’-option has been contributed by Andreas Widmann, who also contributed few advanced digital filters
 (which work much better than the default butterworth IIR filter), one of which being the ‘firws’. It could be that the plotfiltresp functionality has only been correctly implemented for the firws filter. If this happens to be the case, we can think about supporting
 this option for the other filters as well, provided the lower level code allows for this in principle. We look forward to any code improvement suggestions as PRs on github.</div>
<div class=""><br class="">
</div>
<div class="">Besides, I’d recommend to use the matlab debugger, to investigate what’s going on. You can place a breakpoint somewhere in the code, and then step through it line by line. This way you can investigate whether cfg options are passed on correctly,
 and whether they are used to begin with. This is the strategy we would use to look into potential issues</div>
<div class="">
<div><br class="">
</div>
<div><br class="">
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 25 Apr 2020, at 01:18, Jonathon James Parker <<a href="mailto:parkerjo@stanford.edu" class="">parkerjo@stanford.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Hi Jan:<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Not sure of the proper etiquette<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">here if I should reply all to the thread.<span class="Apple-converted-space"> </span><br class="">
<br class="">
<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Sincerest apologies, that was a transcription typo in the e-mail. I triple checked my code, and re-ran a couple test cases, and I can still not get the filter response curve to plot.<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Any thoughts?<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Best,<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Jonathon<o:p class=""></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div>
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><span style="font-size: 12pt;" class="">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;" class="">"Schoffelen, J.M. (Jan Mathijs)" <<a href="mailto:jan.schoffelen@donders.ru.nl" style="color: blue; text-decoration: underline;" class="">jan.schoffelen@donders.ru.nl</a>><br class="">
<b class="">Date:<span class="Apple-converted-space"> </span></b>Wednesday, April 22, 2020 at 11:29 AM<br class="">
<b class="">To:<span class="Apple-converted-space"> </span></b>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" style="color: blue; text-decoration: underline;" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: [FieldTrip] Difficulty using "plotfiltresp" --- trying to plot frequency response curve on my data<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 13.5pt;" class="">Hi Jonathon,</span><o:p class=""></o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 13.5pt;" class="">There’s a typo in the cfg specification: cfg.poltfiltresp should read: cfg.plotfiltresp.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 13.5pt;" class="">Best wishes,</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 13.5pt;" class="">JM</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
<br class="">
<o:p class=""></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
On 22 Apr 2020, at 20:12, Jonathon James Parker <<a href="mailto:parkerjo@stanford.edu" style="color: blue; text-decoration: underline;" class="">parkerjo@stanford.edu</a>> wrote:<o:p class=""></o:p></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Hi Fieldtrippers:</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">I am interested in looking at the Frequency response curve after applying different filter types to extract high-gamma band (70-170Hz) in my dataset.</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">I have used the cfg.plotfiltresp = ‘yes’ flag in running preprocessing on a subset of my data. The call to ft_preprocessing runs without issue, but there is no plot of the filter response curve.</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Here is an example of the cfg I am using for the call to ft_preprocessing</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="apple-converted-space"><span style="font-size: 7.5pt; font-family: Helvetica;" class=""> </span></span><span style="font-size: 7.5pt; font-family: Helvetica;" class="">cfgi = [];<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="apple-converted-space"><span style="font-size: 7.5pt; font-family: Helvetica;" class="">    </span></span><span style="font-size: 7.5pt; font-family: Helvetica;" class="">cfgi.bpfilter =<span class="apple-converted-space"> </span><span class="s1"><span style="color: rgb(160, 32, 240);" class="">'yes'</span></span>;<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="apple-converted-space"><span style="font-size: 7.5pt; font-family: Helvetica;" class="">    </span></span><span style="font-size: 7.5pt; font-family: Helvetica;" class="">cfgi.bpfreq = [l70 170];<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="apple-converted-space"><span style="font-size: 7.5pt; font-family: Helvetica;" class="">    </span></span><span style="font-size: 7.5pt; font-family: Helvetica;" class="">cfgi.bpfilttype =<span class="apple-converted-space"> </span><span class="s1"><span style="color: rgb(160, 32, 240);" class="">'but'</span></span>;<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="apple-converted-space"><span style="font-size: 7.5pt; font-family: Helvetica;" class="">    </span></span><span style="font-size: 7.5pt; font-family: Helvetica;" class="">cfgi.bpinstabilityfix =<span class="apple-converted-space"> </span><span class="s1"><span style="color: rgb(160, 32, 240);" class="">'reduce'</span></span>;<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="apple-converted-space"><span style="font-size: 7.5pt; font-family: Helvetica;" class="">    </span></span><span style="font-size: 7.5pt; font-family: Helvetica;" class="">cfgi.bpfiltrord = 8;<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 7.5pt; font-family: Helvetica;" class="">    cfgi.poltfiltresp = ‘yes’;<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 7.5pt; font-family: Helvetica;" class=""> <o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 7.5pt; font-family: Helvetica;" class=""> <o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">I searched the code of ft_preprocessing and only see the “plotfiltresp” referenced in handling the cfg. flag, thus I am guessing this parameter is simply passed to a lower level pre_proc function depending
 on the filter type.</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Has anyone else had this problem and can offer advice on how to get this functionality to work?</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">I am running Fieldtrip August 2019 build.</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Hope everyone is staying healthy.</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Kindest regards and thank you,</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class="">Jonathon</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 9pt; font-family: Arial, sans-serif;" class="">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 9pt; font-family: Arial, sans-serif;" class="">Jonathon “JP" Parker MD, PhD</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 9pt; font-family: Arial, sans-serif;" class="">Resident in Neurosurgery | PGY5<br class="">
Morgridge Endowed Postdoctoral Fellow <br class="">
Maternal & Child Health Research Institute<br class="">
Department of Neurosurgery<br class="">
Stanford University <br class="">
E:<span class="apple-converted-space"> </span><a href="mailto:parkerjo@stanford.edu" style="color: blue; text-decoration: underline;" class="">parkerjo@stanford.edu</a><br class="">
<br class="">
<br class="">
</span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-family: Arial, sans-serif;" class=""> </span><span style="font-size: 12pt;" class=""><o:p class=""></o:p></span></div>
</div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10.5pt; font-family: Helvetica;" class="">_______________________________________________<br class="">
fieldtrip mailing list<br class="">
</span><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="color: blue; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</span></a><span style="font-size: 10.5pt; font-family: Helvetica;" class=""><br class="">
</span><a href="https://doi.org/10.1371/journal.pcbi.1002202" style="color: blue; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica;" class="">https://doi.org/10.1371/journal.pcbi.1002202</span></a></div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>