[yt-users] field parameters (you know I want to use them everywhere...)

Matthew Turk matthewturk at gmail.com
Wed Nov 30 06:39:04 PST 2011


Hi Elizabeth,

I can't reproduce your first error.  I am using this script:

http://paste.yt-project.org/show/1973/

and I am using revision a519b8754ba8.

For your second error, it's a mystery to me; it's grabbing the path to
your plugins file for some reason.  Can you maybe show a script that
you use that produces this error?

-Matt

On Wed, Nov 30, 2011 at 3:31 AM, Elizabeth Tasker
<tasker at astro1.sci.hokudai.ac.jp> wrote:
> 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
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org



More information about the yt-users mailing list