>  <span class="c1"># Combine n and k into a complex refractive index</span>


<span class="c1"># Define stack configuration</span>
<span class="n">n_air</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">ones_like</span><span class="p">(</span><span class="n">frequencies</span><span class="p">)</span>  <span class="c1"># Refractive index of air</span>
<span class="n">d_air</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span cl