Hi Marc,<div><br></div><div>Thanks for providing that sample dataset. I just submitted a pull request that should add basic support for reading in Pluto datasets, provided they are in the Chombo HDF5 output format. You should be able to get it once it's accepted. This isn't super well-tested yet, but at least I can make slices and projections from the dataset you sent in:</div>
<div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>from yt.mods import *</div><div><br></div><div>pf = load('data.0000.hdf5')</div><div>sl = SlicePlot(pf, 0, 'Density')</div>
<div>sl.annotate_grids()</div><div>sl.save()</div></div><div><br></div></blockquote>and</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>from yt.mods import *</div><div><br></div><div>
pf = load('data.0000.hdf5')</div><div>proj = ProjectionPlot(pf, 0, 'Density')</div><div>proj.save()</div></blockquote><div><br></div><div>You'll probably want to modify things a bit, but that should at least get you started. The files you'll most likely need to change are these three:</div>
<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>yt/frontends/pluto/data_structures.py </div><div>yt/frontends/pluto/fields.py</div><div>yt/frontends/pluto/io.py</div></blockquote><div><br>
</div><div>"data_structures.py" is where the grid levels and locations are read in from the hdf5 file, and also where the pluto.ini file is parsed for the domain dimensions. "fields.py" is where the basic fields are set up. Right now it mostly just includes the ones in the hdf5 file, but you'll probably want to modify this to define some derived fields and also if you have a data dump with another set of physics options. Finally, "io.py" contains the methods that actually read the data from the hdf5 file. </div>
<div><br></div><div>You can look at the other frontends to see how all this stuff works. You might also find these pieces of documentation helpful:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><a href="http://yt-project.org/doc/analyzing/creating_derived_fields.html">http://yt-project.org/doc/analyzing/creating_derived_fields.html</a></div>
<div><a href="http://yt-project.org/doc/advanced/creating_frontend.html">http://yt-project.org/doc/advanced/creating_frontend.html</a></div></blockquote><div><br></div><div>Good luck, and please feel free to email the list if you need any help.</div>
<div><br></div><div>Andrew</div><div><br><div class="gmail_quote">On Thu, Mar 7, 2013 at 12:38 AM, Marc Schartmann <span dir="ltr"><<a href="mailto:schartmann@mpe.mpg.de" target="_blank">schartmann@mpe.mpg.de</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"><div>Dear Jeff, Andrew, Nathan and all,</div><div><br></div><div>thanks a lot.</div><div>
<br></div><div>I have put a sample data file here (including parameter files, at least the pluto.ini </div><div>seems to be read):</div><div><br></div><div><a href="http://www.mpe.mpg.de/~mschartm/download/" target="_blank">http://www.mpe.mpg.de/~mschartm/download/</a></div>
<div><br></div><div>data.0000.hdf5</div><div>pluto.ini</div><div>definitions.h</div><div><br></div><div>And the error message I receive:</div><div><br></div><div><div>>>> pf = load("data.0000.hdf5")</div>
<div>yt : [WARNING ] 2013-03-07 09:16:19,293 Setting 1.0 in code units to be 1.0 cm</div><div>yt : [WARNING ] 2013-03-07 09:16:19,293 No time units. Setting 1.0 = 1 second.</div><div>Traceback (most recent call last):</div>
<div> File "<stdin>", line 1, in <module></div><div> File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/convenience.py", line 77, in load</div><div> return output_type_registry[candidates[0]](*args, **kwargs)</div>
<div> File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/data_structures.py", line 225, in __init__</div><div> StaticOutput.__init__(self,filename,data_style)</div><div> File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 97, in __init__</div>
<div> self._set_units()</div><div> File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/data_structures.py", line 249, in _set_units</div><div> self.units['unitary'] = 1.0 / (self.domain_right_edge - self.domain_left_edge).max()</div>
<div>AttributeError: 'ChomboStaticOutput' object has no attribute 'domain_right_edge'</div></div><div><br></div><div>It would be great if you could point me to the locations where I need to adapt the code. This would save me a lot of time.</div>
<div><br></div><div>Thanks a lot and best wishes,</div><div><br></div><div>Marc</div><div><div class="h5"><div><br></div><div><br></div><div><br></div><div><br></div><br><div><div>On Mar 7, 2013, at 3:45 AM, Nathan Goldbaum wrote:</div>
<br><blockquote type="cite"><div style="word-wrap:break-word"><div>Or, if possible, a sample dataset.</div><br><div><div>On Mar 6, 2013, at 6:41 PM, Andrew Myers <<a href="mailto:atmyers@berkeley.edu" target="_blank">atmyers@berkeley.edu</a>> wrote:</div>
<br><blockquote type="cite">Hi Marc,<div><br></div><div>I'm not surprised that yt doesn't work quite out-of-the box with Pluto data, but the Chombo HDF5 frontend definitely works, and could probably be made to handle Pluto data with minimal hassle. Probably you just need to do things like specifying the field names, where to find stuff like 'gamma', etc. If you want help with that, I'd be happy to point you to the right places in the code. It would also help if you could provide the traceback for the error you are seeing when you try to load the dataset. </div>
<div><br></div><div>Best,</div><div>Andrew <br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 8:54 AM, j s oishi <span dir="ltr"><<a href="mailto:jsoishi@gmail.com" target="_blank">jsoishi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Marc (cc: yt-users),<br>
<br> Thanks for your interest in yt! I have not used yt and pluto, but I<br> have used yt with some other Chombo data in the past. I would strongly<br> suggest you join the yt-users mailing list, which you can do here:<br>
<br> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br> <br> or dropping by our IRC chat room,<br> <br> <a href="http://yt-project.org/irc.html" target="_blank">http://yt-project.org/irc.html</a><br>
<br> I believe Andrew Myers, who is active on yt-users, has the most<br> experience using Chombo data in yt. However, the mailing list is the<br> best way to get help. If you do post to yt-users, please include some<br> details about exactly what is going wrong when you try to load your<br>
Pluto data. This will help get you going faster.<br> <br> take care, and welcome to yt!<br> <br> yours,<br> <br> Jeff<br> <br> On Wed, Mar 6, 2013 at 8:43 AM, Marc Schartmann <<a href="mailto:schartmann@mpe.mpg.de" target="_blank">schartmann@mpe.mpg.de</a>> wrote:<br>
> Dear Jeff Oishi,<br> ><br> > I would very much like to use yt for analyzing my PLUTO simulations. I saw<br> > that there is supposed to be support for the Chombo hdf5 files, but it does<br> > not seem to work for me<br>
> (maybe not for PLUTO 4.0?).<br> > Do you know of anybody who is working with PLUTO + yt, I might contact?<br> ><br> > Thanks a lot.<br> ><br> > Best regards from Munich,<br> ><br> > Marc<br> ><br>
><br> > --<br> ><br> > **********************************************************************<br> > Marc Schartmann | Tel. 089-30000-3712<br> > Max-Planck-Institut für | (Tuesday-Thursday)<br> > extraterrestrische Physik |<br>
> Giessenbachstrasse | Fax: 089-30000-3569<br> > 85748 Garching | <a href="mailto:schartmann@mpe.mpg.de" target="_blank">schartmann@mpe.mpg.de</a><br> > **********************************************************************<br>
> and<br> > **********************************************************************<br> > Universitätssternwarte | Tel. 089-2180-6028<br> > Scheinerstrasse 1 | (Monday & Friday)<br> > 81679 München |<br>
> **********************************************************************<br> ><br> ><br> ><br> ><br> _______________________________________________<br> yt-users mailing list<br> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br> </blockquote></div><br></div> _______________________________________________<br>
yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div></blockquote></div><br><div> <div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div><br></div></div></div></div><br> </div><br></div></div></div>
<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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>