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: fix a bug in pixelize_cylinder where buffer shape was read backwards #3795

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

neutrinoceros
Copy link
Member

PR Summary

Welp, that was easy.
Fix #3794

Just to make it flagrant I'll make an even more drastic version of the script therein

import numpy as np
import yt

shape = (32, 16, 1)
a = np.linspace(1, 100, 16)
b = np.ones((32, 16))
c = np.reshape(a * b, shape)
data = {("gas", "density"): c}

ds = yt.load_uniform_grid(
    data,
    shape,
    bbox=np.array([[0.0, 5.0], [np.pi / 2 - 0.2, np.pi / 2 + 0.2], [-0.1, +0.1]]),
    geometry="spherical",
)

p = yt.SlicePlot(ds, "phi", "density")
p.save("/tmp/buff_default.png")
p.set_buff_size((10, 800))
p.save("/tmp/buff_10_800.png")

p.set_buff_size((10, 10))
p.save("/tmp/buff_10_10.png")

buff_default
buff_10_800
buff_10_10

@neutrinoceros
Copy link
Member Author

I checked that this also fixes a similar issue in plotting "z" normal slice plots in cylindrical geometry.

@matthewturk
Copy link
Member

This looks like it will fix a bunch of stuff.

@matthewturk matthewturk merged commit 7cd03e2 into yt-project:main Feb 9, 2022
meeseeksmachine pushed a commit to meeseeksmachine/yt that referenced this pull request Feb 9, 2022
@neutrinoceros neutrinoceros deleted the hotfix_3794 branch February 9, 2022 15:49
neutrinoceros added a commit that referenced this pull request Feb 9, 2022
…5-on-yt-4.0.x

Backport PR #3795 on branch yt-4.0.x (BUG: fix a bug in pixelize_cylinder where buffer shape was read backwards)
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: set_buffer_size is broken in spherical geometries
3 participants