pan> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">abs</span><span class="p">(</span><span class="n">xiw</span><span class="p">))</span>
            <span class="n">xiw</span> <span class="o">=</span> <span class="n">xiw</span> <span class="o">*</span> <span class="p">(</span><span class="n">xi_energy</span><span class="o">/</span><span class="p">(</span><span class=