[yt-users] Loading ASCII VTK data
John Zuhone
jzuhone at gmail.com
Thu Jun 2 12:49:45 PDT 2016
Hi Lukas,
So I was actually able to convert your file to binary VTK and get started with it in yt, but I hit a roadblock.
Your data is “vertex-centered” in our parlance, but we don’t as of yet support vertex-centered data.
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.
For example, here is what the header for an Athena VTK file looks like:
# vtk DataFile Version 3.0
PRIMITIVE vars at time= 2.700111e+03, level= 0, domain= 0
BINARY
DATASET STRUCTURED_POINTS
DIMENSIONS 257 257 257
ORIGIN -2.000000e+00 -2.000000e+00 -2.000000e+00
SPACING 1.562500e-02 1.562500e-02 1.562500e-02
CELL_DATA 16777216
SCALARS density float
LOOKUP_TABLE default
Let us know…
John
> On May 16, 2016, at 10:04 PM, Lukas Bystricky <lukasbystricky at gmail.com> wrote:
>
> Hi all,
>
> I'm trying to load in some data from an ASCII VTK file (attached for reference) that I created following the guidelines here: http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf <http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf>. I can load this file into Visit and I was hoping that to load it into yt would be as simple as :
>
> ds = yt.load("lid_driven_cavity_20.vtk")
>
> When I try that however I get the error message:
>
> Traceback (most recent call last):
> File "visualization.py", line 3, in <module>
> ds = yt.load("lid_driven_cavity_20.vtk")
> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\convenience.py", line 84, in load
> return candidates[0](*args, **kwargs)
> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\frontends\athena\data_structures.py", line 470, in __init__
> Dataset.__init__(self, filename, dataset_type, units_override=units_override)
> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\data_objects\static_output.py", line 190, in __init__
> self._parse_parameter_file()
> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\frontends\athena\data_structures.py", line 528, in _parse_parameter_file
> self.domain_left_edge = grid['left_edge']
> KeyError: 'left_edge'
>
> 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?
>
> Thanks in advance,
>
> Lukas
> <lid_driven_cavity_20.vtk>_______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/4150793a/attachment-0001.htm>
More information about the yt-users
mailing list