-
Notifications
You must be signed in to change notification settings - Fork 280
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] Fix off-axis rendering when center is not [0.5, 0.5, 0.5], fix periodicity #5059
Conversation
@yt-fido test this please |
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.
LGTM now assuming tests are green again.
well hmmm....
Maybe that check I made you add is too restrictive? |
So part of the trickiness is that the test is highly variable between runs: I just ran the code from I did check what the diffs look like, the large differences are always at cell edges. e.g., for one case: for which the standard axis aligned |
ya, I'm thoroughly confused now. that is a weird number to be off by... and looking at projections of index fields like ('index', 'ones') or ('index', 'y'), the cell edges pop out very clearly and the projected values are all larger than they should be by a pretty big fraction, even in cell interiors (example notebook). |
@chrishavlin I think fixing this bug above is definitely important, but may be part of another PR. Would you be fine with the following plan?
Regarding point 1, it think it is possible to correct the cell-edges effects, but I don't have the time to think carefully about it. If you are adamant this should be done, I'm happy to open another issue to keep track of it. |
@cphyc sounds like a good plan to me! |
Fix units for older versions of unyt Move comment about periodic boundary close to statement
@chrishavlin, I have opened the issue and rebased this PR. |
… is not [0.5, 0.5, 0.5], fix periodicity
PR Summary
The off-axis renderer introduced in #4741 has an issue when the center and the center in rotated frame do not coincide (which happens when it isn't 0.5, 0.5, 0.5 afaik).
In addition, it wraps around the boundaries of the width of the plotting window rather than the simulation domain (if required).
This PR fixes both.
PR Checklist
Bug reproduction: