astro-group-bristol / Gradus.jl

Extensible spacetime agnostic general relativistic ray-tracing (GRRT).
https://astro-group-bristol.github.io/Gradus.jl/dev/
GNU General Public License v3.0
18 stars 2 forks source link

Refractive metric #22

Closed fjebaker closed 2 years ago

fjebaker commented 2 years ago

Added the BoyerLindquist + Refraction metric from Chainakun et al. (2022) with the AD backend.

There exists an issue with this 2nd order approach, namely that a direct discontinuity between the region of n > 1 and n = 1 means the AD has no gradient to compute, and the trajectories lose energy. To avoid this, I added an interpolated region which uses an arctan function to very closly mimic the shape of a step function, and provide a steep gradient along the corona membrane. This method keeps energy constant, and seems to yield good results.

Colouring by radial coordinate, a=1, n=1.1

m = KerrRefractiveAD(M=1.0, a=0.998, n=1.1, corona_radius=20.0)

which may be rendered as usual: ref-n-1 1

For a=1, n=0.95: ref-n-0 95

fjebaker commented 2 years ago

Also closes #20 by using the correct metric components in the impact parameter mapping.