[yt-users] field parameters (you know I want to use them everywhere...)
Elizabeth Tasker
tasker at astro1.sci.hokudai.ac.jp
Wed Nov 30 00:31:25 PST 2011
Hi,
Two small problems:
1. Another issue with field parameters. I can't pass them to a slice
if the derived field also needs ValidateSpatial.
i.e.
def _EffectivePotential(field, data):
center = na.array(data.get_field_parameter("disk_center"))
h_vec = na.array(data.get_field_parameter("disk_vector"))
omega = na.array(data.get_field_parameter("thiscore_omega"))
.
.
blah
.
.
add_field("EffectivePotential", function=_EffectivePotential,
validators=[ValidateSpatial(1, ["x-velocity", "y-velocity",
"z-velocity", "x", "y", "z"])])
p = pc.add_slice("EffectivePotential", 2,
field_parameters={"disk_vector":disk_vector,
"disk_center":disk_center, "thiscore_omega":core_omega[c]})
can't find its field parameters but if I change the end line of the function to:
add_field("EffectivePotential", function=_EffectivePotential)
everything is fine.
It actually seems to work OK even without the ValidateSpatial (I have
cross products in the function so pain has the potential to happen
without the full data) so perhaps this isn't a problem, but I think it
is a small bug?
2. For some reason, yt has decided to save all my image files in:
/home/tasker/.yt/my_plugins.py_Slice_z_EffectivePotential.png
This is less than intuitive. Does anyone know why and how I can stop it?
Thanks!
Elizabeth
More information about the yt-users
mailing list