-
Notifications
You must be signed in to change notification settings - Fork 279
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
[FIX] Correctly normalize off-axis projections for octree datasets #5077
Conversation
With the code from #5071 (adapted so that the same colorbar is used):
The results are now unbiased (within a few percent) and show only minor deviations (at cell edges, as one would expect due to the projection strategy). |
@cphyc we haven't been backporting anything to the "stable" branch for years at this point, and backport- labels are not necessary with proper milestoning :) |
Oopsy sorry! I keep on forgetting how the labels work :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! glad this turned out to be a relatively small fix!
@@ -483,6 +485,10 @@ def temp_weightfield(field, data): | |||
Nx=resolution[0], | |||
Ny=resolution[1], | |||
) | |||
# Note: since dx was divided by wmax, we need to rescale by it | |||
projected_weighted_qty *= wmax.d / np.sqrt(3) | |||
projected_weight *= wmax.d / np.sqrt(3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah! that explains the mostly constant factor that values were off by! nice catch.
Co-authored-by: Chris Havlin <[email protected]>
…ctions for octree datasets
PR Summary
Fixes #5071.
PR Checklist