[yt-users] What does create_profile do?

Yuan Li bear0980 at gmail.com
Wed Oct 7 12:10:05 PDT 2015


Hi all,

Sorry for spamming the yt list again because this really is not a yt
problem. After removing the CIC interpolation for the particles in Enzo
(reading information from the local cells instead of doing any
interpolation), the plot made with the particles agrees with the one from
the simulation well.

Thank you!

Yuan

On Tue, Oct 6, 2015 at 1:33 PM, Yuan Li <bear0980 at gmail.com> wrote:

> Hi Greg,
>
> Thank you! You were right! Yes, they are from the Enzo tracer particle
> values. I thought that they were just the values of their host cells, and
> did not know that they were CIC interpolated.
>
> If I want to compare the different heating/cooling rates (as a function of
> radius for example) calculated from the thermal history of the particles
> with the rates from the simulation itself, what is the best way of doing it
> so that I am comparing apples to apples?
>
> Yuan
>
> On Tue, Oct 6, 2015 at 8:30 AM, Greg Bryan <gbryan at astro.columbia.edu>
> wrote:
>
>> Yuan — How are you getting the density/temperature values for the tracer
>> particle plot?  If it is from the Enzo tracer particle values, note that
>> they are CIC interpolated from the grid, and so may differ from the cell
>> values (in particular, the high-T, high-rho values you are seeing might be
>> from interpolation between hot and cold cells).
>>
>> Greg
>>
>> On Oct 5, 2015, at 3:23 PM, Yuan Li <bear0980 at gmail.com> wrote:
>>
>> 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
>>>>
>>>>
>>>
>> <0_phase_particles_color.png>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>> ----------------------------------
>> Greg Bryan
>> Professor of Astronomy
>> Department of Astronomy, Columbia University
>> 1325 Pupin Physics Laboratories, Mail Code 5246
>> 550 West 120th Street
>> New York, New York 10027 (USA)
>>
>> email: gbryan at astro.columbia.edu
>> phone: +1(212)854-6837
>> fax  : +1(212)854-8121
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/20151007/3b89fc88/attachment.html>


More information about the yt-users mailing list