Skip to content

Commit 8c813bb

Browse files
committed
Fix sign errors in ϕ_kerr_schild function calculations
1 parent 3d86737 commit 8c813bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/schemes/RayTrace.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ function ϕ_kerr_schild(metric::Kerr{T}, rBL, ϕBL) where {T}
194194

195195
term1 = a / (2temp) * log(abs(num / den))
196196
term2 = -atan(a, rBL)
197-
ans = ϕBL - term1 - term2
197+
ans = ϕBL + term1 + term2
198198
if isinf(ans)
199199
@warn "ϕ_kerr_schild is inf at rs=$rBL. This usually happens if the ray intersects the horizon."
200-
return ϕBL - term2
200+
return ϕBL + term2
201201
end
202-
return ϕBL - term1 - term2
202+
return ans
203203
end
204204

205205

0 commit comments

Comments
 (0)