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: phi-slices in spherical geometries are glitchy #86

Closed
neutrinoceros opened this issue Feb 2, 2022 · 7 comments · Fixed by #87
Closed

BUG: phi-slices in spherical geometries are glitchy #86

neutrinoceros opened this issue Feb 2, 2022 · 7 comments · Fixed by #87
Labels
bug Something isn't working code: Pluto Specific to Pluto io: vtk Specific to vtk files possible upstream issue

Comments

@neutrinoceros
Copy link
Owner

In this example, results are correct (or at least expected) with normal = "r" and normal = "theta", but the poloidal slice (normal = "phi") is full of glitches

import yt
import yt_idefix

ds = yt.load("tests/data/pluto_disk_planet/data.0010.vtk")
for normal in ("r", "theta", "phi"):
    p = yt.SlicePlot(ds, normal, "density")
    p.save("/tmp/", mpl_kwargs=dict(bbox_inches="tight"))

data 0010 vtk_Slice_r_density
data 0010 vtk_Slice_theta_density

data 0010 vtk_Slice_phi_density

I note that this is currently our only spherical vtk dataset. A similar script using a spherical dataset with Idefix's dump format yields expected results
dump 0015 dmp_Slice_phi_density

I think it's possibly a bug in yt itself, but I've never seen it with any other frontend so I'll inspect a bit further before I report upstream.

@neutrinoceros neutrinoceros added the bug Something isn't working label Feb 2, 2022
@neutrinoceros
Copy link
Owner Author

this may be a bug in the pixelizer that appears only at low resolutions (here we only have 16 cells in the latitudinal direction)

@xshaokun
Copy link
Contributor

xshaokun commented Feb 3, 2022

I note that this is currently our only spherical vtk dataset.

Just remind, there's another spherical vtk dataset for idefix tests/data/FargoMHDSpherical/data.0010.vtk", and it seems normal with 64 cells in the latitudinal direction

data 0010 vtk_Slice_phi_density

Therefore, I increased the resolution of theta direction to 64 cells for pluto_disk_planet, but it's glitchy too. It seems that low resolution is not the main reason.
data 0001 vtk_Slice_phi_density

@neutrinoceros
Copy link
Owner Author

Great ! Then that is almost certainly an actual frontend bug.

@neutrinoceros neutrinoceros changed the title BUG: phi-slices in spherical geometries are glitchy BUG: phi-slices in spherical geometries are glitchy (Pluto vtk) Feb 3, 2022
@neutrinoceros neutrinoceros added code: Pluto Specific to Pluto io: vtk Specific to vtk files labels Feb 3, 2022
@neutrinoceros neutrinoceros changed the title BUG: phi-slices in spherical geometries are glitchy (Pluto vtk) BUG: phi-slices in spherical geometries are glitchy Feb 3, 2022
@neutrinoceros
Copy link
Owner Author

neutrinoceros commented Feb 3, 2022

Okay this is almost definitely a bug in yt itself.

Running with yt 4.0.1 and yt_idefix 0.10

import yt
import yt_idefix

ds = yt_idefix.load("tests/data/pluto_disk_planet/data.0010.vtk")
p = yt.SlicePlot(ds, "phi", "density")
p.save("/tmp/", mpl_kwargs=dict(bbox_inches="tight"))

I get
data 0010 vtk_Slice_phi_density

so there are a number of issues in this image that are fixed in yt 4.0.2 but the pixelizer is apparently broken now. This is almost certainly on me since I wrote most of the patches for yt 4.0.2

I'll check to see if this image is reproducible with yt-4.0.1 and a modified version of yt_idefix 11.0 that accept yt 4.0.1

@neutrinoceros
Copy link
Owner Author

indeed, can reproduce this exact image using the old yt_idefix.load function, so this is def' a regression in yt 4.0.2 :(
I'll update yt_idefix to allow yt 4.0.1 again, and I'll try to fix this in yt itself later (it's a bit complicated to patch this up right now before the release is officially announced)

@neutrinoceros
Copy link
Owner Author

Still scratching my head over this before I report it upstream but I haven't found any other dataset where this bug shows up. A potentially key difference here is that the simulation box has a minimal latitude of precisely 0.

@neutrinoceros
Copy link
Owner Author

Fixed upstream with yt-project/yt#3782
data 0010 vtk_Slice_phi_density

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code: Pluto Specific to Pluto io: vtk Specific to vtk files possible upstream issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants