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
16 stars 2 forks source link

Tolerance in geometry intersection #173

Closed fjebaker closed 9 months ago

fjebaker commented 9 months ago

The gtol parameter is a mess. Trying to do something "sophisticated" like in #172 has led to terrible impulse response functions:

Screenshot 2023-09-16 at 22 57 05

Using the old linear gtol * r scaling is already much much better:

Screenshot 2023-09-16 at 22 57 48

Looking at the 2d integrated heatmap:

Screenshot 2023-09-16 at 22 58 45

"Tuning" (read: randomizing) the magic constants in the _gtol_error function gives this

Screenshot 2023-09-16 at 22 58 50

This is most likely due to Jacobians going all over the place at the boundaries of _gtol_error, which means we either need any old $C^\infty$ function, or just go back to the linear scaling.