[yt-users] How to find densest point in subvolume of Gadget data

Desika Narayanan dnarayan at haverford.edu
Sat May 2 16:20:23 PDT 2015


Hey Joseph,

I don't know if this will work, but maybe try (sorry about the weird
indenting...trying to type while also watching the kids in bath)


   1. ds = load('myfile.hdf5',over_refine_factor=1)
   2.  bbox_lim = 50
    center = whatever_your_desired_center

        bbox1 = [[center[0]-bbox_lim,center[0]+bbox_lim],
               [center[1]-bbox_lim,center[1]+bbox_lim],
               [center[2]-bbox_lim,center[2]+bbox_lim]]
   3.         ds1 = load(fname,bounding_box=bbox1,n_ref = 64
   ,over_refine_factor=1)


>ad1 = ds1.all_data()
and search within ad1?

you might need to force periodicity off
>    ds1.periodicity = (False,False,False)

but maybe not.

Anyways, I hope this works!
-d


On Sat, May 2, 2015 at 6:27 PM, Joseph Smidt <josephsmidt at gmail.com> wrote:

> Hey everyone,
>
>     I am trying to find the densest point in Gadget data in the
> subvolume with left edge [700]*3 and right edge [800]*3 where 700 and
> 800 are in code units.
>
>      This is what I do [1],  which was inspired by this page [2],
> except I try and take the all_data confined to a region.  The output
> [3] says however where you will note the center is not inside the
> region. It found the densest point in the whole data set, not the
> region.
>
>     So how would I do this instead for a subvolume of Gadget data?  Thanks.
>
>
> [1] http://pastebin.com/kyUgEi3a
>
> [2] http://yt-project.org/doc/cookbook/gadget_notebook.html
>
> [3]  http://pastebin.com/E4aLb5VC
>
>
>
> --
> ------------------------------------------------------------------------
> Joseph Smidt <josephsmidt at gmail.com>
>
> Theoretical Division
> P.O. Box 1663, Mail Stop B283
> Los Alamos, NM 87545
> Office: 505-665-9752
> Fax:    505-667-1931
> _______________________________________________
> 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/20150502/b8d59491/attachment.htm>
-------------- next part --------------
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org


More information about the yt-users mailing list