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

[BUG] Ensure positions are dimensionless in plot callbacks #5063

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cphyc
Copy link
Member

@cphyc cphyc commented Nov 22, 2024

PR Summary

Fixes #5062. The bug was caused by conversion mistakes when converting from physical units to plot coordinates.

The sphere callback (and others) multiply input units by a factor, expressed in 1/length. When the input units depend on the Hubble factor (e.g., Mpc/h), the multiplication yields a value in units of 1/h, so an extra conversion to remove the h factor is required. This is what this PR does.

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.

@cphyc
Copy link
Member Author

cphyc commented Nov 22, 2024

I am unsure how to best test this. Maybe an answer test would be best?

@neutrinoceros
Copy link
Member

how about a new image test in visualization/tests/test_image_comp_2D_plots.py ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] annotate_sphere radius depends on choice of center
2 participants