[yt-users] possible bug in cut_region

Nathan Goldbaum nathan12343 at gmail.com
Fri Apr 7 21:04:00 PDT 2017


Hi Stephanie,

Any chance you can demonstrate this using one of the public datasets on
yt-project.org/data? Alternatively you could share one of your datasets
that you're having trouble with. Either way, can you please open an issue
about it on bitbucket so we don't lose track?

Nathan

On Fri, Apr 7, 2017 at 10:17 PM Stephanie Tonnesen <stonnes at gmail.com>
wrote:

> Hi all,
>
> So I think I found a bug in cut_region.  Right now the directions say you
> can chain cut regions in two ways:  either listing several cut_regions or
> using one call and an "&".
> http://yt-project.org/doc/analyzing/filtering.html
> However, for some extremely mysterious reason, when I do a multi-call to
> cut_region I get wackadoo numbers, like too high by a couple orders of
> magnitude.
>
> Here is the quick check that should work on IsoGal:
>
> ds =
> yt.load("/data001/stonnes/BPr16vs30arcfo/DD"+loop[i]+"/BPr16vs30arcfo"+loop[i])
>
>     disk3 = ds.disk([0.5,0.5,0.5],[0,0,-1.0],(40,"kpc"),(10,"kpc"))
>
>     diskn = disk3.cut_region(["obj['Metal_Density']/obj['density'] > 0.5"])
>     diska = diskn.cut_region(["obj['density'] > 1e-25"])
>     diskd = disk3.cut_region(["(obj['Metal_Density']/obj['density'] > 0.5)
> & (obj['density'] > 1e-25)"])
>
>     print diska.quantities.total_quantity([("gas","cell_mass")])
>     print disk3.quantities.total_quantity([("gas","cell_mass")])
>     print diskn.quantities.total_quantity([("gas","cell_mass")])
>     print diskd.quantities.total_quantity([("gas","cell_mass")])
>
> I am also attaching my whole code, which is a loop, just in case.  So here
> the diska mass is two orders of magnitude larger than any of the others,
> and diskd is what I would expect with the two selection criteria.
>
> Best,
> Stephanie
> --
> Dr. Stephanie Tonnesen
> Alvin E. Nashman Postdoctoral Fellow
> Carnegie Observatories, Pasadena, CA
> stonnes at gmail.com
> _______________________________________________
> 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/20170408/c1b859ac/attachment-0001.html>


More information about the yt-users mailing list