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

Feat: transfer functions for thick discs #141

Merged
merged 10 commits into from
Aug 19, 2023

Conversation

fjebaker
Copy link
Member

Transfer functions can now be obscured on the disc:

Screenshot 2023-08-18 at 14 18 43

Since part of the disc may be obscured, we instead root find a radius on
a datum plane at the height of the disc. This is **not a perfect**
solution, since it technically only works for well-defined cross section
functions. Furthermore, obscuration must then be later recalculated.

This does however allow the minima and maxima of the redshift to be
determined for a given ring, and therefore for transfer functions to
later be calculated for thick discs.
Instead of having to pass around a bunch of arrays, this commit changes
the transfer function calculations to use a utility accumulator struct
with a handful of methods. Also simplifies the API and paves the way to
obscured transfer functions nicely.

Added a utils file to `src/transferfunctions` to keep verbose utility
methods in.
@codecov-commenter
Copy link

Codecov Report

Merging #141 (3d170d1) into main (bb0be8a) will increase coverage by 0.22%.
The diff coverage is 78.19%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
+ Coverage   68.41%   68.64%   +0.22%     
==========================================
  Files          56       57       +1     
  Lines        2454     2497      +43     
==========================================
+ Hits         1679     1714      +35     
- Misses        775      783       +8     
Files Changed Coverage Δ
src/Gradus.jl 28.57% <ø> (ø)
src/plotting-recipes.jl 0.00% <0.00%> (ø)
src/tracing/precision-solvers.jl 72.15% <14.28%> (+0.54%) ⬆️
src/geometry/discs.jl 57.74% <69.23%> (+1.81%) ⬆️
src/transfer-functions/utils.jl 75.00% <75.00%> (ø)
...ransfer-functions/cunningham-transfer-functions.jl 96.26% <98.11%> (+7.66%) ⬆️
src/redshift.jl 96.22% <100.00%> (ø)

@fjebaker fjebaker merged commit 796512a into main Aug 19, 2023
1 check passed
@fjebaker fjebaker deleted the fergus/thick-disc-transfer-functions branch August 19, 2023 14:17
fjebaker added a commit that referenced this pull request Aug 22, 2023
…ansfer-functions

Feat: transfer functions for thick discs
@fjebaker fjebaker mentioned this pull request Sep 6, 2023
13 tasks
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.

None yet

2 participants