<div dir="ltr">Hi Daniel,<div><br></div><div>Thanks for writing -- glad to hear you've had some success with writing your frontend!</div><div><br></div><div>The io.py file could be better documented, and I will use this email as the basis for such documentation at my earliest ability.  The io.py file is where the IOHandler is defined; there are a handful of methods to implement, depending on the specific type of indexing system your data uses.  If it is grid-based, then this is relatively simple (although implementing more advanced things like caching and the like requires a bit more effort) and it can simply be this:</div><div><br></div><div>class MyIOHandler(BaseIOHandler):</div><div>    _dataset_type = "my_dataset_type"</div><div>    def _read_particle_coords(self, chunks, ptf):</div><div>        # ptf is a dict, where the keys are the particle types, and the values are the fields to read</div><div>        # this routine must yield a tuple of the form (ptype_name, (x_coords, y_coords, z_coords))</div><div><br></div><div>    def _read_particle_fields(self, chunks, ptf, selector):</div><div>        # this routine is similar to the above, but it yields a selected set of particles -- for instance, using selector.select_points on the x,y,z coordinate arrays.</div><div>        # This must yield a tuple of the form ((ptype_name, field_name), data_array) </div><div><br></div><div>    def _read_fluid_selection(self, chunks, selector, fields, size):</div><div>        # this routine reads mesh values from disk.  The routine *returns* a dictionary of the form {field: value} for each field, and it uses the selectors in the chunks.gobjs to choose which values to mask.</div><div><br></div><div>The FLASH frontend is relatively short and good to use as a reference for this, and I'd suggest checking it out.  I hope that this has helped, and let us know if you run into anything else!</div><div><br></div><div>-Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 16, 2015 at 9:59 AM, Grassinger, Daniel <span dir="ltr"><<a href="mailto:d.grassinger@hzdr.de" target="_blank">d.grassinger@hzdr.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi developers,<br>
<br>
I make an internship at a German reasearcher institute. My job is to write a frontend for yt to load a special kind of HDF5 files. Most parts of the code are are working now. So the yt.load() function create a dataset without throwing errors.<br>
<br>
But I have still some erros when I wand to make a plot.<br>
The reason is I have problems with the code in the io.py.<br>
<br>
Can you please help me with further explanation of the class in io.py.<br>
<br>
<br>
Thank you for helping.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
Daniel Grassinger<br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</font></span></blockquote></div><br></div>