Skip to content

Conversation

fjebaker
Copy link
Member

No description provided.

Revert "feat: new bracket minimization routine based on Golden Section"

This reverts commit 53ccffe.

Revert "fixup! feat: new bracket minimization routine based on Golden Section"

This reverts commit bd1d24f.

And fix a missing line.
Since the comparison is to zero, it must be an atol, but it should scale
with radius on the disc, since it's harder to get the same accuracy at
greater distances.
Add a few more steps to the adaptive refine solve to try and smoothen
out the disc plane.
This lets the block-based refinement strategy also use periodic blocks
in the phi coordinate, by allowing them to wrap round.

I haven't rigorously tested this to make sure it's doing what it is
supposed to (thesis stress), but the results seem better.
For pre-computation, added a few new binning functions that can be used
to bin up the timing and redshift data, as well as the emissivities
without including any redshift factors.
Can now read out the status code for each photon traced in the adaptive
sky, which makes it easier to calculate things like the reflection
fractions.

This commit will need revisiting at a later date, as I put it together
quite hackily.
@fjebaker fjebaker mentioned this pull request Oct 13, 2025
This should be ammended with the use of `@spawn` and tasks in the
future, but I want to merge the `thesis` branch before addressing that.

Julia 1.12 has interactive threads, so the thread IDs no longer behave
as expected. This was always an anti-pattern I suppose, so should
switch to the better semantics.
There have been a few definition changes that have affected some of the
regression test values, such as changes to how the geometric grid is
defined.

The changes is flux in the 2D transfer functions is slightly more
alarming, but I've checked that the documentation examples can be
reproduced, as well as the figures from the paper, so I think it might
just be some noise artifact. Those tests should probably be updated.

Also removed the Voronoi tessellation tests, since that part of the code
is no longer used and the underlying library keeps changing its
primitives.

All dependencies on that library should be removed in the future.
The new algorithm is extremely sensitive to having the right beta_0
offset parameter, and if it's too big, will take along time to fail,
spurting "exceeded maxiters" warnings. That is obviously not ideal and
should be examined in more detail in the future, but my priority at the
moment is to get these commits merged in.

Another aspect that was driving the CTF solving time up was running the
root-solver twice, once over the datum plane and again against the
actual thick disc. This commit removes that, and just checks if the
impact parameters from the datum plane actually hit close enough on the
thick disc.

Updated the regression test values.
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 9.19540% with 237 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.61%. Comparing base (e502fa3) to head (a12ed5e).
⚠️ Report is 282 commits behind head on main.

Files with missing lines Patch % Lines
src/corona/adaptive-sample.jl 0.00% 106 Missing ⚠️
src/image-planes/adaptive-plane.jl 0.00% 77 Missing ⚠️
src/interpolations.jl 0.00% 41 Missing ⚠️
src/utils.jl 16.66% 5 Missing ⚠️
src/corona/models/ring.jl 0.00% 4 Missing ⚠️
src/image-planes/adaptive-sky.jl 0.00% 3 Missing ⚠️
src/tracing/precision-solvers.jl 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #220       +/-   ##
===========================================
- Coverage   68.75%   43.61%   -25.15%     
===========================================
  Files          66       75        +9     
  Lines        2810     4228     +1418     
===========================================
- Hits         1932     1844       -88     
- Misses        878     2384     +1506     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fjebaker fjebaker merged commit f862f2e into main Oct 13, 2025
1 of 3 checks passed
@fjebaker fjebaker deleted the fergus/thesis branch October 13, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant