[yt-users] Projections and field parameters

Matthew Turk matthewturk at gmail.com
Tue Jul 3 14:16:20 PDT 2012


Hi John,
On Jul 3, 2012 4:55 PM, "John ZuHone" <jzuhone at milkyway.gsfc.nasa.gov>
wrote:
>
> Hi all,
>
> Does anybody know how exactly projections work with field parameters?
Suppose I have a field called "ProjectedVelocity" that takes a field
parameter "axis" that chooses between the velocity components depending on
the axis of projection.
>
> The code goes like this:
>
> proj = pf.h.proj(axis, "ProjectedVelocity", weight_field="DensitySquared")
> proj.set_field_parameter("axis", axis)
>
> But it looks like this field is being projected before the field
parameter is set. Will I get the correct behavior when I do something later
with the proj object, like generate an FRB?

As it stands right now, you can specify field parameters through the kwarg
interface.  Unfortunately that's going to have a collision with the axis
argument as is, so you might need to change the field parameter to
something like "projection_axis".  You can do this with:

proj( ... , projection_axis=axis)

In the future I want this to be more specified, as is done with the
PlotCollection, so what works now will look differently in the future.
Specifically, I don't like the leftover kwargs being fed to
field_parameters, and in the *future* (i.e., 3.0) it will look like:

proj(..., field_parameters = {'projection_axis':0})

for instance.

-Matt

>
> Best,
>
> John Z
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20120703/76e2d627/attachment.html>


More information about the yt-users mailing list