Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix thick disc transfer functions #203

Merged
merged 7 commits into from
Jun 27, 2024
Merged

Conversation

fjebaker
Copy link
Member

@fjebaker fjebaker commented Jun 27, 2024

Closes #202 and does a little bit towards #198, noting that the old Roots solver is a little better for Thick Discs because of the method for checking visibility.

Added tests for 3D grid interpolations. Also fixed a bug where the
tuples were not being correctly unpacked when updating the grid indices.
It is now possible to select the root solving algorithm in the
`root_solve` wrapper.

Thick discs now by default use the Roots.jl solver, since it seems to
converge significantly faster for those discs.
When trying to determine if a patch of a thick disc is visible, we run
through the root solver again to determine whether the point on the
datum plane and the point on the thick accretion disc are within some
distance of eachother.

It is not guarunteed that the root solver will be able to find the
correct point for some emission radius when tracing over the thick disc.
This is because that point might be obscured, which is effectively the
whole point of re-tracing. So we wrap the root solving attempt with a
try-catch, ignore any error that might occur, and just set the radius to
NaN so that the point is later classed as not visible.
@fjebaker fjebaker merged commit 4ff82e9 into main Jun 27, 2024
1 check passed
@fjebaker fjebaker deleted the fergus/fix-thick-disc-tf branch June 27, 2024 20:18
This pull request was closed.
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.

Regression: thick disc transfer functions
1 participant