class="p">(</span><span class="n">n_stack</span><span class="p">,</span> <span class="n">d_stack</span><span class="p">,</span> <span class="n">frequencies</span><span class="p">)</span>

<span class="c1"># Calculate average R and T</span>
<span class="n">SE_TE</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="n">T_TE</span><span class="p