Skip to content

Commit bb2a083

Browse files
author
Jon Schlipf
committed
sign reversal
1 parent 7e3ba91 commit bb2a083

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Common/Common.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ function getfields(ain,bout,em::Eigenmodes,grd::RCWAGrid,xypoints,zpoints,λ,win
327327
#convert amplitude vectors to electric fields
328328
ex,ey=a2e2d(a+b,em.W)
329329
hx,hy=a2e2d(a-b,em.V)
330-
ez=-1im*(grd.Kx*hy-grd.Ky*hx)
331-
hz=-1im*(grd.Kx*ey-grd.Ky*ex)
330+
ez=1im*(grd.Kx*hy-grd.Ky*hx)
331+
hz=1im*(grd.Kx*ey-grd.Ky*ex)
332332
#convert from reciprocal lattice vectors to real space distribution
333333
efield[:,:,zind,1]=recipvec2real(Array(grd.nx),Array(grd.ny),Array(ex),nx,ny,windowfunction)
334334
efield[:,:,zind,2]=recipvec2real(Array(grd.nx),Array(grd.ny),Array(ey),nx,ny,windowfunction)

0 commit comments

Comments
 (0)