<div dir="ltr">Hi Andrea,<div><br></div><div>I *think* you could use load_semistructured_mesh for this; it can accept different coordinate systems, too.  There's an example here:</div><div><br></div><div><a href="http://yt-project.org/docs/dev/examining/loading_data.html#semi-structured-grid-data">http://yt-project.org/docs/dev/examining/loading_data.html#semi-structured-grid-data</a><br></div><div><br></div><div>-Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 3:01 AM, Andrea Negri <span dir="ltr"><<a href="mailto:negri.andre@gmail.com" target="_blank">negri.andre@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 John,<br>
<br>
unfortunately I have a cell spacing varying inside a grid. A viable<br>
way would be to interpolate my data on a regular grid, and then load<br>
it.<br>
The interpolation part is not so computationally demanding (I have<br>
already tested it), it is just the plotting which is slow process (I'm<br>
talking of plotting a slice).<br>
Maybe this can be improved by building a set of grid with lower and<br>
lower resolution. Is there any documentation on how t he grid in the<br>
grid data format should be?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Andrea<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 3 May 2016 at 01:37, John ZuHone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>> wrote:<br>
> If by "non-uniform" you mean that you have grids of differing resolutions<br>
> then yt and grid data format support that, but if you have cell spacing<br>
> varying _inside_ a grid then yt does not yet support this. We're working on<br>
> it, but it will probably take some time before it is operational.<br>
><br>
><br>
> =================================<br>
> John ZuHone, Chandra/ACIS operations<br>
> Harvard-Smithsonian Center for Astrophysics<br>
><br>
> 60 Garden St., MS-67       (w) <a href="tel:617-496-1816" value="+16174961816">617-496-1816</a><br>
> Cambridge, MA 02138.     (m) <a href="tel:781-708-5004" value="+17817085004">781-708-5004</a><br>
><br>
> <a href="mailto:john.zuhone@cfa.harvard.edu">john.zuhone@cfa.harvard.edu</a><br>
> <a href="http://hea-www.cfa.harvard.edu/~jzuhone" rel="noreferrer" target="_blank">http://hea-www.cfa.harvard.edu/~jzuhone</a><br>
> =================================<br>
><br>
> On May 2, 2016, at 7:18 PM, Andrea Negri <<a href="mailto:negri.andre@gmail.com">negri.andre@gmail.com</a>> wrote:<br>
><br>
> Dear John,<br>
><br>
> thanks for the suggestions. Do you know if the grid data format is<br>
> compatible with a non uniform mesh? I was thinking of porting my<br>
> outputs in this format.<br>
><br>
><br>
> Cheers,<br>
> Andrea<br>
><br>
> On 2 May 2016 at 18:52, John Zuhone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>> wrote:<br>
><br>
> Hi Andrea,<br>
><br>
><br>
> yt has some support for axisymmetric grids in 2D, so you won’t need to<br>
> convert to a 3D array.<br>
><br>
><br>
> The bigger issue is the logarithmic grid spacing. This is currently being<br>
> worked on, but is in a very early state. Currently what it does is use<br>
> “logr” as the coordinate instead of r, which may not be very ideal for every<br>
> situation. A lot of yt functionality is probably not compatible with this<br>
> way of doing things.<br>
><br>
><br>
> Nevertheless, if you would like to explore it further, let us know.<br>
><br>
><br>
> Best,<br>
><br>
><br>
> John Z<br>
><br>
><br>
> On May 2, 2016, at 10:53 AM, Andrea Negri <<a href="mailto:negri.andre@gmail.com">negri.andre@gmail.com</a>> wrote:<br>
><br>
><br>
> Of course. I have a 2.5D simulation in spherical coordinates. It is<br>
><br>
> axial symmetric, so the actual grid is 2D, r and theta. The grid is<br>
><br>
> structured, the grid spacing in theta is constant, while the spacing<br>
><br>
> in r follows a geometrical progression, i.e. dr[i+1] = dr[i] * factor,<br>
><br>
> where factor is a constant.<br>
><br>
><br>
> I don't know if yt supports axisymmetric grids, but I can bypass this<br>
><br>
> issue by duplicating the 2D array into a 3D one. Sure, it is not<br>
><br>
> efficient...<br>
><br>
><br>
> My ultimate goal is to produce projections, off axis projections and<br>
><br>
> mock X-ray observations.<br>
><br>
><br>
><br>
> Thanks,<br>
><br>
> Andrea<br>
><br>
><br>
> On 2 May 2016 at 16:43, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
><br>
> Can you share a little bit more detail about your grid structure? I know<br>
><br>
> that support for log-radial bins is being worked on right now, for example.<br>
><br>
><br>
> On Mon, May 2, 2016 at 3:18 AM, Andrea Negri <<a href="mailto:negri.andre@gmail.com">negri.andre@gmail.com</a>> wrote:<br>
><br>
><br>
> Hi all,<br>
><br>
><br>
> I'm trying to read ZEUS-MP 2 data, and I'm building my programs step<br>
><br>
> by step. I was able to load data regularly spaced in spherical<br>
><br>
> coordinates. However, I actually have a non-uniform radial grid.<br>
><br>
><br>
> I tried with the script in attachment, but I have got odd errors...<br>
><br>
><br>
> Also, I have found this page, is it relevant for my case (just because<br>
><br>
> my code is mentioned, the answer would be yes :) )?<br>
><br>
> <a href="https://bitbucket.org/yt_analysis/grid_data_format" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/grid_data_format</a><br>
><br>
><br>
><br>
> Thanks,<br>
><br>
> Andrea<br>
><br>
><br>
> _______________________________________________<br>
><br>
> yt-users mailing list<br>
><br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
><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>
><br>
> yt-users mailing list<br>
><br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
><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>
><br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
><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>
><br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
><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>
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>
</div></div></blockquote></div><br></div>