[yt-users] optimal resolution for frb
Nathan Goldbaum
nathan12343 at gmail.com
Fri Sep 25 12:00:13 PDT 2015
Making it easy to lock the FRB resolution to the simulation resolution or
some factor-of-two multiple would be a great improvement, and something
that would be not too hard I think. Right now you're right that it's not
very obvious how to do this. If you'd be interested in coming up with a UI
for making FRBs that are locked to the simulation resolution, I think that
would be a fun first yt project that many people would like to use.
One easy way to get the size of the smallest computational element is the
`ds.index.get_smallest_dx()` function, which will return the size of the
smallest cell width in code units. The ds.index object is the main way to
access information about the geometrical or mesh properties of a dataset.
For patch AMR datasets like FLASH, you can access the grid objects like so:
for grid in ds.index.grids:
print grid.LeftEdge, grid.RightEdge # left and right edge of the grid
in code units
print grid.ActiveDimensions # the dimensions of the grid patch (i.e.
number of zones along x, y, and z)
print grid.Level # AMR leve
print grid.Children # references to child grid objects, if any
print grid.Parent # reference to parent grid
print grid['dens'] # the on-disk gas density field
You can access any yt field on the grid object using a dictionary-like
lookup, just like any other yt data object.
-Nathan
On Fri, Sep 25, 2015 at 1:18 PM, Slavin, Jonathan <jslavin at cfa.harvard.edu>
wrote:
> Hi all,
>
> I've been doing FLASH runs in 2D and using yt to manipulate the data for
> display -- that is, I've been creating frb objects from slices (which are
> not really slices since the data is 2D anyways). One thing that bothers me
> about this is the need to specify the dimensions of the frb. For some
> reason 800 x 800 seems to be preferred in the yt docs, but it seems to me
> that there are certain optimal dimensions that depend on the grid
> structure. For example an frb that uses pixels the size of the smallest
> resolution element/cell or some integer multiple of that (of course less
> refined cells would be split into multiple pixels). How would one find
> what that grid size would be? I guess what I'd need to know is the
> dimensions of that most refined cell in the computational grid. How does
> one access the grid structure information in a dataset?
>
> Jon
>
> --
> ________________________________________________________
> Jonathan D. Slavin Harvard-Smithsonian CfA
> jslavin at cfa.harvard.edu 60 Garden Street, MS 83
> phone: (617) 496-7981 Cambridge, MA 02138-1516
> cell: (781) 363-0035 USA
> ________________________________________________________
>
>
> _______________________________________________
> 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/20150925/baec143d/attachment.html>
More information about the yt-users
mailing list