From 3887a8804f7767214fe2244f3ade32f60c9b9e75 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 26 Aug 2019 00:28:19 -0700 Subject: [PATCH] fix phase in expand_wgmode --- meanas/fdfd/waveguide_mode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meanas/fdfd/waveguide_mode.py b/meanas/fdfd/waveguide_mode.py index cd59b5f..bda7fcf 100644 --- a/meanas/fdfd/waveguide_mode.py +++ b/meanas/fdfd/waveguide_mode.py @@ -458,7 +458,7 @@ def expand_wgmode_e(E: field_t, a_shape = numpy.roll([1, -1, 1, 1], axis) a_E = numpy.real(dxes[0][axis]).cumsum() r_E = a_E - a_E[slices[axis]] - iphi = polarity * 1j * wavenumber + iphi = polarity * -1j * wavenumber phase_E = numpy.exp(iphi * r_E).reshape(a_shape) # Expand our slice to the entire grid using the phase factors