<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Lukas,<div class=""><br class=""></div><div class="">So I was actually able to convert your file to binary VTK and get started with it in yt, but I hit a roadblock. </div><div class=""><br class=""></div><div class="">Your data is “vertex-centered” in our parlance, but we don’t as of yet support vertex-centered data. </div><div class=""><br class=""></div><div class="">If you can convert to cell-centered data, we can probably support you out of the box, but for now vertex-centered data is not yet implemented. </div><div class=""><br class=""></div><div class="">For example, here is what the header for an Athena VTK file looks like:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""># vtk DataFile Version 3.0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">PRIMITIVE vars at time= 2.700111e+03, level= 0, domain= 0</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">BINARY</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">DATASET STRUCTURED_POINTS</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">DIMENSIONS 257 257 257</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">ORIGIN -2.000000e+00 -2.000000e+00 -2.000000e+00</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">SPACING 1.562500e-02 1.562500e-02 1.562500e-02</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CELL_DATA 16777216</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">SCALARS density float</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">LOOKUP_TABLE default</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Let us know…</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">John</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div><blockquote type="cite" class=""><div class="">On May 16, 2016, at 10:04 PM, Lukas Bystricky <<a href="mailto:lukasbystricky@gmail.com" class="">lukasbystricky@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">I'm trying to load in some data from an ASCII VTK file (attached for reference) that I created following the guidelines here: <a href="http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf" class="">http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf</a>. I can load this file into Visit and I was hoping that to load it into yt would be as simple as :</div><div class=""><br class=""></div><div class="">ds = yt.load("lid_driven_cavity_20.vtk")</div><div class=""><br class=""></div><div class="">When I try that however I get the error message:</div><div class=""><div class=""><br class=""></div><div class="">Traceback (most recent call last):</div><div class=""> File "visualization.py", line 3, in <module></div><div class=""> ds = yt.load("lid_driven_cavity_20.vtk")</div><div class=""> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\convenience.py", line 84, in load</div><div class=""> return candidates[0](*args, **kwargs)</div><div class=""> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\frontends\athena\data_structures.py", line 470, in __init__</div><div class=""> Dataset.__init__(self, filename, dataset_type, units_override=units_override)</div><div class=""> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\data_objects\static_output.py", line 190, in __init__</div><div class=""> self._parse_parameter_file()</div><div class=""> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\frontends\athena\data_structures.py", line 528, in _parse_parameter_file</div><div class=""> self.domain_left_edge = grid['left_edge']</div><div class="">KeyError: 'left_edge'</div><div class=""><br class=""></div><div class="">Is it possible to load in such a file to yt? If not, since I'm writing my own data file, how could I edit it to make it readable by yt?</div></div><div class=""><br class=""></div><div class="">Thanks in advance,</div><div class=""><br class=""></div><div class="">Lukas</div></div>
<span id="cid:4B87423F-3C8E-4D9D-9698-E9DA8556A8E4"><lid_driven_cavity_20.vtk></span>_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>