[yt-users] What does create_profile do?

Matthew Turk matthewturk at gmail.com
Mon Oct 5 11:36:08 PDT 2015


Hi Yuan,

You're not applying any averaging when scattering, so you can really just
get the shape, not the colors, from the particle plotting.

Matt

On Mon, Oct 5, 2015, 11:23 AM Yuan Li <bear0980 at gmail.com> wrote:

> Hi Matt,
>
> Arithmetic average is what I want. It would be more meaningful to do a
> volume weighted average, but am trying to compare the profile I get from
> AMR simulation itself and the one I get from tracer particles, and tracer
> particles do not know their cell volume (I guess I can use
> find_field_value_at_point but I am worried about it taking too long for 1
> million particles).
>
> What confuses me is that the particles give me a different profile. If I
> make the phase plot of temperature vs density, it seems that there are a
> lot of particles at high density and low-ish temperatures (the plot with
> the blue points) that do not show up on the other plot that is made with
> the simulation output. The particles are injected to the center of each
> cell (the original scrip is from you I think), so I thought that every cell
> should be represented on both plots the same way.
>
>
> Yuan
>
>
> On Mon, Oct 5, 2015 at 12:51 PM, Matthew Turk <matthewturk at gmail.com>
> wrote:
>
>> 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
>> >
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
> _______________________________________________
> 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/20151005/1e2ad9e9/attachment.htm>


More information about the yt-users mailing list