[yt-dev] ProfileND: soliciting opinions

j s oishi jsoishi at gmail.com
Mon Feb 3 13:43:03 PST 2014


+1 on this change.


On Mon, Feb 3, 2014 at 4:42 PM, John ZuHone <jzuhone at 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 at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140203/2f8caa0b/attachment.htm>


More information about the yt-dev mailing list