[yt-users] What does create_profile do?

Matthew Turk matthewturk at gmail.com
Mon Oct 5 09:51:17 PDT 2015


Hi Yuan,

This does do the average temperature as a function of radius, although
note that you're weighting by ones, so it is the arithmetic average --
i.e., unweighted by any volume or mass.  So for any AMR simulation,
this favors the higher resolution data in a way that is
non-conservative.

On Fri, Oct 2, 2015 at 3:03 PM, Yuan Li <yuan at astro.columbia.edu> wrote:
> Hi all,
>
> I have a really basic dumb question: what does yt do when it creates a
> profile?
>
> For example, if I do this:
> prof=yt.create_profile(sp,"radius",["temperature"],
> accumulation=False,n_bins=n_bins,weight_field="ones")
>
> Is prof["temperature"].value the arithmetic average of the temperatures of
> all the cells within each radius bin?
>
> The reason why I ask is because when I create a profile plot of
> "CoolingRate" (my derived field) using yt, and compare that with the one I
> create with tracer particles, they look different at low temperatures. Since
> I put one particle in the center of each cell, I assume that the two methods
> should give the same results. Did I make a silly mistake somewhere or does
> yt do some sort of smoothing to the data?
>
>
> Thank you!
> Yuan
>
>
>
> _______________________________________________
> 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