--- you can reply above this line ---
New issue 531: "RadiusCode" field is ill-defined for periodic domains https://bitbucket.org/yt_analysis/yt/issue/531/radiuscode-field-is-ill-defin...
Kacper Kowalik:
As per ml thread following script:
#!python
from yt.mods import *
from yt.testing import *
from yt.data_objects.universal_fields import get_radius
from yt.data_objects.field_info_container import ValidateParameter
@derived_field(name="invrad", validators = [ValidateParameter("center")])
def _invrad(field, data):
data.set_field_parameter("center", [1.0, 1.0, 1.0])
return 1.0/data["RadiusCode"]
pf = fake_random_pf(64)
sp = pf.h.sphere([1.0, 1.0, 1.0], 0.25)
r = get_radius(sp, "")
if hasattr(sp, "size"):
v = 3
p1 = pf.h.proj("invrad", 0, data_source = sp, style="mip")
p2 = pf.h.proj("Density", 0, data_source = sp)
else:
v = 2
p1 = pf.h.proj(0, "invrad", source = sp, proj_style="mip")
p2 = pf.h.proj(0, "Density", source = sp)
pw1 = p1.to_pw()
pw1.save("yt_v%s" % v)
pw2 = p2.to_pw()
pw2.set_zlim("Density", 0, 0.32)
pw2.save("yt_v%s" % v)
produces   while it should yield  
--
This is an issue notification from bitbucket.org. You are receiving this either because you are the owner of the issue, or you are following the issue.