<div dir="ltr"><div class="gmail_extra"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Hi Nathan,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks very much for the detailed response.  I had no idea that ds.index contains so much information.  I've looked at the grid data for a simulation I did and it's quite revealing.  Unfortunately for my case, a 2D simulation, it seems that ds.index.get_smallest​_dx() includes the third (unused) dimension, which for some reason is given a (very small) thickness in FLASH data.  As a result, I get that very small dimension from ds.index.get_smallest_dx().  Nevertheless, it seems that it should possible to get the smallest grid dimension in each direction via  the use of <span style="font-family:arial,helvetica,sans-serif">ds.index.grids.RightEdge and ds.index.grids.LeftEdge.  I'm working on it now.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Jon​</div><br><div class="gmail_quote"><br></div><div class="gmail_quote">On Sat, Sep 26, 2015 at 11:25 AM,  <span dir="ltr"><<a href="mailto:yt-users-request@lists.spacepope.org" target="_blank">yt-users-request@lists.spacepope.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":f5" class="a3s" style="overflow:hidden">Date: Fri, 25 Sep 2015 14:00:13 -0500<br>
From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] optimal resolution for frb<br>
Message-ID:<br>
        <CAJXewO=<a href="mailto:1rW7E%2BVkFeVqogWV%2B8Uq_Tq_rkufLDZ3xaA8tWuQzWg@mail.gmail.com">1rW7E+VkFeVqogWV+8Uq_Tq_rkufLDZ3xaA8tWuQzWg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Making it easy to lock the FRB resolution to the simulation resolution or<br>
some factor-of-two multiple would be a great improvement, and something<br>
that would be not too hard I think. Right now you're right that it's not<br>
very obvious how to do this. If you'd be interested in coming up with a UI<br>
for making FRBs that are locked to the simulation resolution, I think that<br>
would be a fun first yt project that many people would like to use.<br>
<br>
One easy way to get the size of the smallest computational element is the<br>
`ds.index.get_smallest_dx()` function, which will return the size of the<br>
smallest cell width in code units. The ds.index object is the main way to<br>
access information about the geometrical or mesh properties of a dataset.<br>
<br>
For patch AMR datasets like FLASH, you can access the grid objects like so:<br>
<br>
for grid in ds.index.grids:<br>
    print grid.LeftEdge, grid.RightEdge  # left and right edge of the grid<br>
in code units<br>
    print grid.ActiveDimensions  # the dimensions of the grid patch (i.e.<br>
number of zones along x, y, and z)<br>
    print grid.Level  # AMR leve<br>
    print grid.Children  # references to child grid objects, if any<br>
    print grid.Parent # reference to parent grid<br>
    print grid['dens'] # the on-disk gas density field<br>
<br>
You can access any yt field on the grid object using a dictionary-like<br>
lookup, just like any other yt data object.<br>
<br>
-Nathan</div></blockquote></div><br><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">________________________________________________________<br>Jonathan D. Slavin                 Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>       60 Garden Street, MS 83<br>phone: (617) 496-7981       Cambridge, MA 02138-1516<br>cell: (781) 363-0035             USA<br>________________________________________________________<br><br></div></div></div></div>
</div></div>