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

Fix: more robust transfer functions #107

Closed fjebaker closed 1 year ago

fjebaker commented 1 year ago

See also #106, since this PR still bangs its head against a number of ceilings.

fjebaker commented 1 year ago

Transfer functions are working well now, bar some anomalous downwards spike around $g^\ast \approx 0.5$ when $r_e > 150$. Unsure what is causing this, but if memory serves it appeared when modifying the Jacobian code. I'll conduct more extensive tests tomorrow.

codecov-commenter commented 1 year ago

Codecov Report

Merging #107 (e3b7811) into main (f18dad9) will decrease coverage by 1.39%. The diff coverage is 69.92%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   67.08%   65.70%   -1.39%     
==========================================
  Files          53       53              
  Lines        1993     2044      +51     
==========================================
+ Hits         1337     1343       +6     
- Misses        656      701      +45     
Impacted Files Coverage Δ
src/accretion-geometry/bootstrap.jl 72.72% <0.00%> (ø)
src/image-planes/grids.jl 51.85% <0.00%> (ø)
src/point-functions.jl 45.83% <0.00%> (ø)
src/tracing/configuration.jl 86.66% <ø> (ø)
src/tracing/constraints.jl 100.00% <ø> (ø)
src/tracing/radiative-transfer-problem.jl 0.00% <0.00%> (ø)
...ransfer-functions/cunningham-transfer-functions.jl 62.91% <58.82%> (-15.52%) :arrow_down:
src/GradusBase/geodesic-solutions.jl 51.11% <73.91%> (-1.39%) :arrow_down:
src/tracing/precision-solvers.jl 73.97% <87.50%> (-1.75%) :arrow_down:
src/corona-to-disc/disc-profiles.jl 58.22% <100.00%> (ø)
... and 7 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

fjebaker commented 1 year ago

Found the source of the error:

debug-bad

The dip aligns precisely when $\theta = \pi / 2$, which corresponds to rays pointing directly at the coordinate singularity of the BL coordinates. The fix is to just offset by some $\epsilon$:

debug