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

Restructure/estimators #2500

Closed
wants to merge 199 commits into from

Conversation

wkerzendorf
Copy link
Member

@wkerzendorf wkerzendorf commented Dec 31, 2023

An attempt at restructuring the estimator code.

requires #2492 to be merged.

astropy_helpers Outdated Show resolved Hide resolved
tardis.code-workspace Outdated Show resolved Hide resolved
@@ -44,4 +46,6 @@ def calculate_mean_intensity(self, nu):
intensity : u.Quantity
Intensity of the radiation field at the given frequency
"""
return self.dilution_factor * intensity_black_body(nu, self.t_radiative)
return self.dilution_factor * intensity_black_body(
nu[np.newaxis].T, self.t_radiative
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this transpose happening here?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is the number of nues vs the number of shells - what comes out is a 2D frame

2D array with integrated values.
"""
integrated = np.zeros((len(block_references) - 1, f.shape[1]))
for i in prange(f.shape[1]): # columns
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't respect the nthreads setting!

Only causes issues if JIT is disabled, but this is more consistent anyway.
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