Skip to content

Commit

Permalink
Fixed sign-error in gaussian mode B.real term.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryancole committed Mar 1, 2021
1 parent 86c89b5 commit 04c8e9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raypier/core/cfields.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ cdef void evaluate_one_mode(np_.npy_complex128[:] out, double[:] x, double[:] y,
a12 = a01*a01 #reuse a12 as an optimisation

out[0].real = (-a12*b2 + a01*a22*b1 + b0*(a12 - a11*a22))/(a00*a12 - a00*a11*a22 + a12*a22)
out[1].real = (a00*a01*b2 - a00*a22*b1 + a01*a22*b0)/(a00*a12 - a00*a11*a22 + a12*a22)
out[1].real = -(a00*a01*b2 - a00*a22*b1 + a01*a22*b0)/(a00*a12 - a00*a11*a22 + a12*a22)
out[2].real = (a00*a01*b1 - a12*b0 - b2*(a00*a11 - a12))/(a00*a12 - a00*a11*a22 + a12*a22)

return
Expand Down

0 comments on commit 04c8e9e

Please sign in to comment.