[yt-users] Cutting region confusion

Stephanie Tonnesen stonnes at gmail.com
Mon Aug 4 11:51:24 PDT 2014


Also, with the idea that "disk" is actually taking a cylinder from -0.385
to 0.385--the reason I wouldn't be getting twice the number of cells is
because 1) the tracer fraction cut (specific scalar) and 2) the box only
goes to -0.325.

-Stephanie


On Mon, Aug 4, 2014 at 2:40 PM, Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> I haven't done the projection, but changed the disk definition to
>
> disk = pf.h.disk([0.0,0.0,0.0][0.0,0.0,1.0],1.2,0.1925)
>
> (more or less what Nathan suggested) and end up with basically the same
> values for the "Ones" count.
>
> I thought that in the disk definition the z input was the total height of
> the cylinder?
>
> -Stephanie
>
>
> On Mon, Aug 4, 2014 at 2:36 PM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> So tracep25 includes about half of the cells that tdp25 does.
>>
>> What if you do this instead:
>>
>> tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] >
>> 0.25","grid['z'] < 0.385","grid['z'] > -0.385","grid['cyl_Rcode'] < 1.2"])
>>
>>
>> On Mon, Aug 4, 2014 at 11:34 AM, Stephanie Tonnesen <stonnes at gmail.com>
>> wrote:
>>
>>> Hi John,
>>>
>>> When I change the tracerp25 selections to all have <= or >= symbols, the
>>> value basically doesn't change.  With the gt/lt and equal-to "Ones" is
>>> definitely different:
>>>
>>> tracerp25 is 1099285
>>> tdp25 is 2028955
>>>
>>> So the selection criteria is definitely more stringent on
>>> tracerp25 = alld.cut_region(["grid['
>>> specific_scalar[0]'] > 0.25","grid['z'] <= 0.1925","grid['z'] >=
>>> -0.1925","grid['cyl_Rcode'] <= 1.2"])
>>>
>>> -Stephanie
>>>
>>>
>>>
>>> On Mon, Aug 4, 2014 at 2:11 PM, John ZuHone <jzuhone at gmail.com> wrote:
>>>
>>>> Hi Stephanie,
>>>>
>>>> I suspect the problem is that these are not *exactly* the same regions.
>>>> Have you tried checking the result of:
>>>>
>>>> tdp25["Ones"].sum()
>>>>
>>>> tracerp25["Ones"].sum()
>>>>
>>>> which would be a quick way to determine the number of cells in each
>>>> region.
>>>>
>>>> What might be going on (but I have yet to verify) is that the disk
>>>> selection container object is using >= and <= for the zone selection,
>>>> whereas you used > and < in the definition of your cut region. You might
>>>> try swapping those out and seeing if that changes things.
>>>>
>>>> Best,
>>>>
>>>> John Z
>>>>
>>>> On Aug 4, 2014, at 1:15 PM, Stephanie Tonnesen <stonnes at gmail.com>
>>>> wrote:
>>>>
>>>> > Hi all,
>>>> >
>>>> > I am trying to get the total mass in a disk region of my simulation.
>>>>  I am using athena data and yt 2.7-dev.  I thought I was defining the
>>>> region in the same way using two methods:
>>>> >
>>>> > alld = pf.h.all_data()
>>>> > tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] >
>>>> 0.25","grid['z'] < 0.1925","grid['z'] > -0.1925","grid['cyl_Rcode'] < 1.2"])
>>>> >
>>>> > disk = pf.h.disk([0.0,0.0,0.0],[0.0,0.0,1.0],1.2,0.385)
>>>> > tdp25 = disk.cut_region(["grid['specific_scalar[0]'] > 0.25"])
>>>> >
>>>> > but when I print the total mass I get answers that differ by 10%
>>>> >
>>>> > print tracerp25.quantities["TotalQuantity"]("CellMassMsun")
>>>> > print tdp25.quantities["TotalQuantity"]("CellMassMsun")
>>>> >
>>>> > >>[8019047231.5192223]
>>>> > >>[8886968784.4710732]
>>>> >
>>>> > Can someone point out where my difference is?
>>>> >
>>>> > Thanks!
>>>> >
>>>> > Stephanie
>>>> > _______________________________________________
>>>> > 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/20140804/885ae172/attachment.html>


More information about the yt-users mailing list