<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Jonathan,<div><br></div><div>(re-posting this to the list because other people may find it helpful)</div><div><br></div><div>yt is still probably your best bet for getting at the raw data and then plotting it in matplotlib. You can make raw slice and projection objects (that are not plots) and regrid them to a uniform cell spacing, which in yt parlance is called a "FixedResolutionBuffer". There is an example of how to create a FixedResolutionBuffer from a projection in yt that you can feed to matplotlib here: </div><div><br></div><div><a href="http://yt-project.org/docs/dev-3.0/visualizing/manual_plotting.html#fixed-resolution-buffers">http://yt-project.org/docs/dev-3.0/visualizing/manual_plotting.html#fixed-resolution-buffers</a></div><div><br></div><div>If you were trying to do a slice, then you would replace the logic and the call to "pf.proj" in that example with something like this:</div><div><br></div><div>slc = pf.slice(0, c[0])<br>width = (10, 'kpc') # we want a 10 kpc view<br>res = [1000, 1000] # create an image with 1000x1000 pixels<br>frb = slc.to_frb(width, res, center=c)<br><br></div><div>Best,</div><div><br></div><div>John</div><div><br><div><div>On Jun 11, 2014, at 11:16 AM, Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu">jslavin@cfa.harvard.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi John,</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">
I'm sorry I never got a chance to discuss FLASH when you were here. Beyond any particular application, I'd like to understand the data storage itself. </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">I've looked at the yt documentation and did not get any insights from that. In any case, I prefer to do my plotting within matplotlib because of its interactivity -- which is now available using the flash python module as a means to get the output into an array.</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">So could you tell me how yt or other routines translate the hdf5 dataset items into arrays? Or tell me what routines I should look at? (I do have yt installed.)</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,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
Jon </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 11, 2014 at 10:51 AM, John ZuHone <span dir="ltr"><<a href="mailto:jzuhone@milkyway.gsfc.nasa.gov" target="_blank">jzuhone@milkyway.gsfc.nasa.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Jonathan,<div><br></div><div>How that is done "under the hood" is probably pretty similar across the different analysis packages, but the implementations are still going to be rather different. </div>
<div><br></div><div>In particular, for a slice, the analysis package is going to do some version of looping over grids that intersect with the slice plane and interpolating the relevant cells to a fixed resolution buffer. </div>
<div><br></div><div>A good example is the yt project: <a href="http://yt-project.org/" target="_blank">http://yt-project.org</a>, which fully supports FLASH data. </div><div><br></div><div>Did you have a particular application in mind? </div>
<div><br></div><div>Best,</div><div><br></div><div>John Z</div><div><div class="h5"><div><br></div><div><div><div>On Jun 11, 2014, at 10:45 AM, Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi all,</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">
I'm new to using flash and just trying to understand the output in HDF5. For example, when I read in the data from a plot file via h5py:</div><div class="gmail_default"><font face="arial, helvetica, sans-serif">>>> f = h5py.File('sedov_forced_hdf5_plt_cnt_0000')</font><br>
</div><div class="gmail_default"><font face="arial, helvetica, sans-serif">I get</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">>>> dens = f['dens']</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">>>> dens.shape</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">(517, 1, 8, 8)</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif">I assume that somehow the various python or IDL output routines that create plots are using other information about grid refinement to create arrays that can be plotted directly (e.g. to create slices). I'd like to know how that is done under the hood. Any help would be appreciated.</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Jon</font></div><div><br></div>-- <br><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: <a href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>
fax: <a href="tel:%28617%29%20496-7577" value="+16174967577" target="_blank">(617) 496-7577</a> USA<br>________________________________________________________<br><br></div>
</div>
</blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><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>fax: (617) 496-7577 USA<br>________________________________________________________<br>
<br></div>
</div>
</blockquote></div><br></div></body></html>