yt-project / yt

Main yt repository
http://yt-project.org
Other
455 stars 272 forks source link

HEALpixCamera.snapshot() produces incorrect images. #570

Closed yt-fido closed 7 years ago

yt-fido commented 11 years ago

Originally reported by: Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum)


Using a slightly modified example from the docs:

#!python

from yt.mods import *
import yt.visualization.volume_rendering.camera as camera

Nside = 32
pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
cam = camera.HEALpixCamera([0.5,0.5,0.5], 0.2, Nside, pf = pf, log_fields = [False])
bitmap = cam.snapshot('test')

Produces the following image:

A workaround is to use plot_allsky_healpix (discussed here in the docs), which uses alternative machinery to produce a correct image.


yt-fido commented 11 years ago

Original comment by Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum):


Change HEALpix camera to use interpolated projection sampler.

Because the partitioned grids in the HEALpix camera (in contrast to allsky_projection) use interpolated, vertex-centered values, there was a size-of-brick issue causing a nasty-looking bug. This fixes that by (as-needed) swapping to using the interpolated projection sampler.

It also adds the inner_radius (default 10dx) to avoid multipole moments when starting in dense regions, and it removes a bit of code that duplicated logic from the plot_allsky_projection routine.

Fixes #570 .

yt-fido commented 11 years ago

Original comment by Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum):


Nope, healpix snapshot is still broken, only allsky_projection is fixed.

yt-fido commented 11 years ago

Original comment by Matt Turk (Bitbucket: MatthewTurk, GitHub: MatthewTurk):


@ngoldbaum this is now fixed, isn't it? With the change to using four channels?

yt-fido commented 11 years ago

Original comment by gsiisg (Bitbucket: gsiisg, GitHub: gsiisg):


The image looks like it has features matching up at the boundary of the grids, but the colors do not. So I'm not sure if its the grid order being wrong or each of the grids have a different colorbar.

script: http://paste.yt-project.org/show/3469/ image: garbled image From G.S.