I am +1 on this provided that prof.x_bins, etc. remains with the values of the fields at bin edges. On Mon, Feb 3, 2014 at 4:43 PM, j s oishi <jsoishi@gmail.com> wrote:
+1 on this change.
On Mon, Feb 3, 2014 at 4:42 PM, John ZuHone <jzuhone@gmail.com> wrote:
Hi all,
So Matt and I are using the pressure of the yt / Athena workshop coming up in a few days to get some things ironed out with unitrefactor, and I've come up on an issue that I'd like to get feedback on with regard to the setup of ProfileND objects.
Let's take Profile1D as an example:
prof = Profile1D(sp, "density", 32, rho_min, rho_max, True, weight_field="density") prof.add_fields(["temperature","velocity_magnitude"])
You can access the dependent fields dict-like, as you should:
prof["temperature"]
which gives you the average value of that field in the bin. However, we have no "easy" way to get the values of the independent field (in this case, "density") at the bin centers. There are a couple of attributes for the values of this field, but oddly they give the same thing:
prof.x_bins == values of the field at bin edges
prof.x == values of the field at bin edges
Is there a reason for this? My proposal is to make prof.x (and the corresponding prof.y and prof.z for Profile2D and Profile3D) the values at the bin centers.
Best,
John Z _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org