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

Add individual intensities #212

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

jvshields
Copy link
Contributor

@jvshields jvshields commented Sep 6, 2024

This PR implements spherical geometry in to STARDIS, and also allows for individual rays to be kept track of and returned at the end of the simulation. This allows the user to look at the different parts of the stellar disk (center-limb variation in inensity).

@jvshields jvshields force-pushed the add_individual_intensities branch from 704255f to e894d63 Compare October 8, 2024 19:06
@jvshields jvshields marked this pull request as ready for review October 23, 2024 14:25
@jvshields jvshields mentioned this pull request Nov 4, 2024
@andrewfullard
Copy link
Contributor

The new and modified functions could really use tests

@jvshields
Copy link
Contributor Author

Add a plot to this PR to show it's working

@jvshields
Copy link
Contributor Author

jvshields commented Nov 4, 2024

I want to change this PR to make the simulation only keep track of each individual ray when you request the simulation to return the radiation field. As is, we end up using a ton of memory on all of the rays.

Edit: Did this

)

# This was our original theta sampling method
# dtheta = (np.pi / 2) / num_of_thetas # Korg uses Gauss-Legendre quadrature here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be kept? If so I would put it in a test for comparison purposes.

@andrewfullard
Copy link
Contributor

Need to update the regression data

@@ -253,24 +343,36 @@ def single_theta_trace(
/ (taus[gap_indices] + taus[gap_indices + 1])
)

if inward_rays:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does nothing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something worth to check -- the inward_rays condition seems like doing something slightly different in the single_theta_trace_parallel function, should these two function be computing the same thing?

* (taus[gap_index, nu_index] / taus[gap_index + 1, nu_index])
- (source[gap_index + 1, nu_index] - source[gap_index, nu_index])
* (taus[gap_index + 1, nu_index] / taus[gap_index, nu_index])
if taus[gap_index, nu_index] == 0:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part of the calculations needed for the case inward_rays = True as well or should it be in the else condition?

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.

3 participants