<div dir="ltr">This mapped grid capability is similar to what Sam Jones e-mailed the list about a week or two ago.  Their grid is logically Cartesian, but a mapping function transforms it to a different shape.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 4, 2016 at 5:13 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yan-Fei,<br>
<br>
I've thought about this a bunch.  I *think* that it's feasible, with<br>
only very minor modifications to the existing system, as long as<br>
there's a mapping we can construct for the spacing, and that mapping<br>
is unique across the grids at fixed levels.<br>
<br>
What I mean by that is, if we can have a function that operates such<br>
that it's given a set of integer values (integer coordinate [xyz],<br>
resolution level) and it can return a position and a width (in linear<br>
space), we can implement this without too much trouble.  I can see<br>
some tricky things relating to how to switch between log/lin<br>
visualization, but they should be surmountable. (And presumably, if<br>
you have a log spaced dataset, you won't want linear viz terribly<br>
frequently anyway.)  Generating the integer coordinate might be the<br>
funniest part; in linear space it's just<br>
(pos-domain_left_edge)/local_dx, but I don't know the specifics of<br>
your data format.<br>
<br>
-Matt<br>
<br>
On Thu, Mar 31, 2016 at 9:55 AM, Jonah Miller<br>
<<a href="mailto:jonah.maxwell.miller@gmail.com">jonah.maxwell.miller@gmail.com</a>> wrote:<br>
> Hi Yan-Fei,<br>
><br>
> I don't think this will work out of the box. Matt may have more insight<br>
> here.<br>
><br>
> Best,<br>
> Jonah<br>
><br>
><br>
> On 16-03-31 01:03 AM, Jiang, Yanfei wrote:<br>
><br>
> Hi Matt and Jonah,<br>
><br>
>     I think I can use load_hexahedral_mesh to load data from each mesh<br>
> block. But it cannot use three arrays (xgrid, ygrid, zgrid) to define the<br>
> whole mesh due to mesh refinement. I guess I can create a dict to collect<br>
> the data from each mesh block, as in load_amr_grids (but not the same). The<br>
> question is will such a data structure (a dict of hexahedral_mesh) be<br>
> recognized by yt?<br>
><br>
> On Wed, Mar 30, 2016 at 6:01 PM, Jonah Miller<br>
> <<a href="mailto:jonah.maxwell.miller@gmail.com">jonah.maxwell.miller@gmail.com</a>> wrote:<br>
>><br>
>> Hi Yanfei,<br>
>><br>
>> To add to Matt's comment. Here is the documentation for using<br>
>> load_hexahedral_mesh.<br>
>><br>
>> <a href="http://yt-project.org/doc/examining/loading_data.html#semi-structured-grid-data" rel="noreferrer" target="_blank">http://yt-project.org/doc/examining/loading_data.html#semi-structured-grid-data</a><br>
>><br>
>> <a href="http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.load_hexahedral_mesh.html" rel="noreferrer" target="_blank">http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.load_hexahedral_mesh.html</a><br>
>><br>
>> Best,<br>
>> Jonah<br>
>><br>
>><br>
>> On 16-03-30 05:15 PM, Matthew Turk wrote:<br>
>>><br>
>>> Hi Yanfei,<br>
>>><br>
>>> This is possible -- but it will also slow some things down.  You can<br>
>>> use the load_hexahedral_mesh function, and there're examples of this.<br>
>>> This takes away some of the optimizations that regular grids can do,<br>
>>> but we're hoping to add them back in shortly.  Like the other<br>
>>> functions it too takes a geometry argument.<br>
>>><br>
>>> -Matt<br>
>>><br>
>>> On Wed, Mar 30, 2016 at 2:49 PM, Jiang, Yanfei<br>
>>> <<a href="mailto:yanfei.jiang@cfa.harvard.edu">yanfei.jiang@cfa.harvard.edu</a>> wrote:<br>
>>>><br>
>>>> Hi Jonah,<br>
>>>><br>
>>>>     I am able to load the data to yt now using load_amr_grids(). I<br>
>>>> notice<br>
>>>> that it can also set geometry to spherical. This is great. But to make<br>
>>>> life<br>
>>>> more complicate. Is it possible to let yt know that the grid is<br>
>>>> logarithmic?<br>
>>>> Currently, load_amr_grids() just take left and right edges of each<br>
>>>> block. I<br>
>>>> guess yt assumes the grid is uniform between left and right edges. Is it<br>
>>>> possible to provide arrays of coordinate values for each cell in each<br>
>>>> block?<br>
>>>><br>
>>>> Thanks.<br>
>>>><br>
>>>> On Tue, Mar 29, 2016 at 6:58 PM, Jonah Miller<br>
>>>> <<a href="mailto:jonah.maxwell.miller@gmail.com">jonah.maxwell.miller@gmail.com</a>> wrote:<br>
>>>>><br>
>>>>> Hi Yan-Feng,<br>
>>>>><br>
>>>>> I haven't tried it, but I think there is functionality for this. You<br>
>>>>> can<br>
>>>>> use the load_amr_grids() function which can load amr data in Cartesian,<br>
>>>>> spherical, or polar coordinates. Here's the documentation:<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> <a href="http://yt-project.org/doc/examining/generic_array_data.html#loading-numpy-array" rel="noreferrer" target="_blank">http://yt-project.org/doc/examining/generic_array_data.html#loading-numpy-array</a><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> <a href="http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.load_amr_grids.html#yt.frontends.stream.data_structures.load_amr_grids" rel="noreferrer" target="_blank">http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.load_amr_grids.html#yt.frontends.stream.data_structures.load_amr_grids</a><br>
>>>>><br>
>>>>> Best,<br>
>>>>> Jonah<br>
>>>>><br>
>>>>> On Tue, Mar 29, 2016, 6:35 PM Jiang, Yanfei<br>
>>>>> <<a href="mailto:yanfei.jiang@cfa.harvard.edu">yanfei.jiang@cfa.harvard.edu</a>><br>
>>>>> wrote:<br>
>>>>>><br>
>>>>>> Hi,<br>
>>>>>>           I have some data from a new version of Athena simulations.<br>
>>>>>> It is<br>
>>>>>> in spherical polar coordinate with mesh refinement written in HDF5.<br>
>>>>>> The data<br>
>>>>>> structure is similar to flash data but not the same. Does anyone have<br>
>>>>>> suggestions to load such data to yt directly?<br>
>>>>>><br>
>>>>>> Thank you.<br>
>>>>>> --<br>
>>>>>> Yan-Fei Jiang<br>
>>>>>><br>
>>>>>> Einstein Fellow<br>
>>>>>> Harvard-Smithsonian Center for Astrophysics<br>
>>>>>> 60 Garden Street, Cambridge MA USA 02138<br>
>>>>>> _______________________________________________<br>
>>>>>> yt-users mailing list<br>
>>>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>>><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> yt-users mailing list<br>
>>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Yan-Fei Jiang<br>
>>>><br>
>>>> Einstein Fellow<br>
>>>> Harvard-Smithsonian Center for Astrophysics<br>
>>>> 60 Garden Street, Cambridge MA USA 02138<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> yt-users mailing list<br>
>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>><br>
>>> _______________________________________________<br>
>>> yt-users mailing list<br>
>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Yan-Fei Jiang<br>
><br>
> Einstein Fellow<br>
> Harvard-Smithsonian Center for Astrophysics<br>
> 60 Garden Street, Cambridge MA USA 02138<br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div><div><i>phone</i>:  631-632-8225</div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div><div>github: <a href="http://github.com/zingale" target="_blank">http://github.com/zingale</a></div><div><br></div></div></div></div>
</div>