Projections and field parameters
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? Best, John Z
Hi John,
On Jul 3, 2012 4:55 PM, "John ZuHone"
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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
John ZuHone
-
Matthew Turk