[yt-users] What does create_profile do?

Yuan Li bear0980 at gmail.com
Mon Oct 5 12:23:33 PDT 2015


Sorry! I lied. The color range is different. Though if I make the range
similar to the yt plot, then I do not see any particles at high densities.

I should probably figure out how to make the volume weighted plot for
particles.

Yuan

On Mon, Oct 5, 2015 at 2:57 PM, Yuan Li <bear0980 at gmail.com> wrote:

> Hi Matt,
>
> Ok. I was being lazy :P. Here is a 2d histogram (without labels but the
> range is the same as the yt plot). It still shows more points at density of
> 1e-23 and temperature of 1e5. These should be particles in and around
> cooling/cold clumps.
>
> It is 10 thousand years after the particles are injected (the first
> particle output). Maybe somehow the particles move very very quickly from
> the cell center to strange locations...?
>
> Yuan
>
> On Mon, Oct 5, 2015 at 2:36 PM, Matthew Turk <matthewturk at gmail.com>
> wrote:
>
>> 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
>>>
>>
>> _______________________________________________
>> 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/240127e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0_phase_particles_color.png
Type: image/png
Size: 12909 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151005/240127e1/attachment.png>


More information about the yt-users mailing list