r than 5 times the 1-D LMS fit</span>
            <span class="c1"># finds last frequency with significance outside of cutoff</span>
            <span class="n">maxfreq</span> <span class="o">=</span> <span class="n">xf</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>
            <span class="n">check</span> <span class="o">=</span> <span class="mi">1</span>
    <span class="k">if</span> <span class="n">check</span> <span class="o">==</span> <span class="mi">0</span><span class