Hi Marc,

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:

from yt.mods import *

pf = load('data.0000.hdf5')
sl = SlicePlot(pf, 0, 'Density')
sl.annotate_grids()
sl.save()

and

from yt.mods import *

pf = load('data.0000.hdf5')
proj = ProjectionPlot(pf, 0, 'Density')
proj.save()

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:

yt/frontends/pluto/data_structures.py 
yt/frontends/pluto/fields.py
yt/frontends/pluto/io.py

"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. 

You can look at the other frontends to see how all this stuff works. You might also find these pieces of documentation helpful:
http://yt-project.org/doc/analyzing/creating_derived_fields.html
http://yt-project.org/doc/advanced/creating_frontend.html

Good luck, and please feel free to email the list if you need any help.

Andrew

On Thu, Mar 7, 2013 at 12:38 AM, Marc Schartmann <schartmann@mpe.mpg.de> wrote:
Dear Jeff, Andrew, Nathan and all,

thanks a lot.

I have put a sample data file here (including parameter files, at least the pluto.ini 
seems to be read):

http://www.mpe.mpg.de/~mschartm/download/

data.0000.hdf5
pluto.ini
definitions.h

And the error message I receive:

>>> pf = load("data.0000.hdf5")
yt : [WARNING  ] 2013-03-07 09:16:19,293 Setting 1.0 in code units to be 1.0 cm
yt : [WARNING  ] 2013-03-07 09:16:19,293 No time units.  Setting 1.0 = 1 second.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/convenience.py", line 77, in load
    return output_type_registry[candidates[0]](*args, **kwargs)
  File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/data_structures.py", line 225, in __init__
    StaticOutput.__init__(self,filename,data_style)
  File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 97, in __init__
    self._set_units()
  File "/data01/mschartm/software/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/data_structures.py", line 249, in _set_units
    self.units['unitary'] = 1.0 / (self.domain_right_edge - self.domain_left_edge).max()
AttributeError: 'ChomboStaticOutput' object has no attribute 'domain_right_edge'

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.

Thanks a lot and best wishes,

Marc





On Mar 7, 2013, at 3:45 AM, Nathan Goldbaum wrote:

Or, if possible, a sample dataset.

On Mar 6, 2013, at 6:41 PM, Andrew Myers <atmyers@berkeley.edu> wrote:

Hi Marc,

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. 

Best,
Andrew 

On Wed, Mar 6, 2013 at 8:54 AM, j s oishi <jsoishi@gmail.com> wrote:
Hi Marc (cc: yt-users),

Thanks for your interest in yt! I have not used yt and pluto, but I
have used yt with some other Chombo data in the past. I would strongly
suggest you join the yt-users mailing list, which you can do here:

http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

or dropping by our IRC chat room,

http://yt-project.org/irc.html

I believe Andrew Myers, who is active on yt-users, has the most
experience using Chombo data in yt. However, the mailing list is the
best way to get help. If you do post to yt-users, please include some
details about exactly what is going wrong when you try to load your
Pluto data. This will help get you going faster.

take care, and welcome to yt!

yours,

Jeff

On Wed, Mar 6, 2013 at 8:43 AM, Marc Schartmann <schartmann@mpe.mpg.de> wrote:
> Dear Jeff Oishi,
>
> I would very much like to use yt for analyzing my PLUTO simulations. I saw
> that there is supposed to be support for the Chombo hdf5 files, but it does
> not seem to work for me
> (maybe not for PLUTO 4.0?).
> Do you know of anybody who is working with PLUTO + yt, I might contact?
>
> Thanks a lot.
>
> Best regards from Munich,
>
> Marc
>
>
> --
>
> **********************************************************************
> Marc Schartmann |    Tel. 089-30000-3712
> Max-Planck-Institut für | (Tuesday-Thursday)
> extraterrestrische Physik |
> Giessenbachstrasse |  Fax: 089-30000-3569
> 85748 Garching |  schartmann@mpe.mpg.de
> **********************************************************************
> and
> **********************************************************************
> Universitätssternwarte | Tel. 089-2180-6028
> Scheinerstrasse 1 | (Monday & Friday)
> 81679 München |
> **********************************************************************
>
>
>
>
_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org






_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org