[fdfd.waveguide*] misc fixes

This commit is contained in:
Jan Petykiewicz 2025-01-28 19:54:48 -08:00
commit 83f4d87ad8
2 changed files with 6 additions and 6 deletions

View file

@ -946,7 +946,7 @@ def inner_product( # TODO documentation
# Find time-averaged Sz and normalize to it
dxes_real = [[numpy.real(dxyz) for dxyz in dxeh] for dxeh in dxes]
if integrate:
if trapezoid:
Sz_a = numpy.trapezoid(numpy.trapezoid(E1[0] * H2[1], numpy.cumsum(dxes_real[0][1])), numpy.cumsum(dxes_real[1][0]))
Sz_b = numpy.trapezoid(numpy.trapezoid(E1[1] * H2[0], numpy.cumsum(dxes_real[0][0])), numpy.cumsum(dxes_real[1][1]))
else: