[yt-dev] Issue #619: user-defined outputs with Athena (yt_analysis/yt)
Anonymous
issues-reply at bitbucket.org
Mon Aug 5 15:45:35 PDT 2013
New issue 619: user-defined outputs with Athena
https://bitbucket.org/yt_analysis/yt/issue/619/user-defined-outputs-with-athena
Anonymous:
Dear Developers,
I would like to visualize/analyze some streaming-nstability simulation outputs created with Athena with yt. The output is a user-defined variable, such as the particle density enhancement. The (2-d) data is written to a .vtk file which I tried to read with yt using the load command. I Immediately get errors.
Here is the session information:
pf = load("id0/Streaming2d.0000.difdpar.vtk")
yt : [INFO ] 2013-08-05 15:30:17,851 Temporarily setting domain_right_edge = -domain_left_edge. This will be corrected automatically if it is not the case.
yt : [INFO ] 2013-08-05 15:30:17,855 Parameters: current_time = 0
yt : [INFO ] 2013-08-05 15:30:17,855 Parameters: domain_dimensions = [64 64 1]
yt : [INFO ] 2013-08-05 15:30:17,856 Parameters: domain_left_edge = [-1. -1. 0.]
yt : [INFO ] 2013-08-05 15:30:17,857 Parameters: domain_right_edge = [ 1. 1. -0.]
yt : [INFO ] 2013-08-05 15:30:17,858 Parameters: cosmological_simulation = 0.0
yt : [WARNING ] 2013-08-05 15:30:17,860 Dimensionality less than 3: reverting to overlap_proj
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-3-fa5200178679> in <module>()
----> 1 pf = load("id0/Streaming2d.0000.difdpar.vtk")
/home/hlcapelo/.local/lib/python2.7/site-packages/yt-2.6dev-py2.7-linux-x86_64.egg/yt/convenience.pyc in load(*args, **kwargs)
75 if c._is_valid(*args, **kwargs): candidates.append(n)
76 if len(candidates) == 1:
---> 77 return output_type_registry[candidates[0]](*args, **kwargs)
78 if len(candidates) == 0:
79 if ytcfg.get("yt", "enzo_db") != '' \
/home/hlcapelo/.local/lib/python2.7/site-packages/yt-2.6dev-py2.7-linux-x86_64.egg/yt/frontends/athena/data_structures.pyc in __init__(self, filename, data_style, storage_filename, parameters)
353 # instantiated so that we can make sure we have the correct left
354 # and right domain edges.
--> 355 self.h
356
357 def _set_units(self):
/home/hlcapelo/.local/lib/python2.7/site-packages/yt-2.6dev-py2.7-linux-x86_64.egg/yt/data_objects/static_output.pyc in hierarchy(self)
201 raise RuntimeError("You should not instantiate StaticOutput.")
202 self._instantiated_hierarchy = self._hierarchy_class(
--> 203 self, data_style=self.data_style)
204 return self._instantiated_hierarchy
205 h = hierarchy # alias
/home/hlcapelo/.local/lib/python2.7/site-packages/yt-2.6dev-py2.7-linux-x86_64.egg/yt/frontends/athena/data_structures.pyc in __init__(self, pf, data_style)
129 #self.directory = os.path.dirname(self.hierarchy_filename)
130 self._fhandle = file(self.hierarchy_filename,'rb')
--> 131 AMRHierarchy.__init__(self, pf, data_style)
132
133 self._fhandle.close()
/home/hlcapelo/.local/lib/python2.7/site-packages/yt-2.6dev-py2.7-linux-x86_64.egg/yt/data_objects/hierarchy.pyc in __init__(self, pf, data_style)
70
71 mylog.debug("Parsing hierarchy.")
---> 72 self._parse_hierarchy()
73
74 mylog.debug("Constructing grid objects.")
/home/hlcapelo/.local/lib/python2.7/site-packages/yt-2.6dev-py2.7-linux-x86_64.egg/yt/frontends/athena/data_structures.pyc in _parse_hierarchy(self)
251 line = f.readline()
252 f.close()
--> 253 levels[j] = gridread['level']
254 glis[j,0] = gridread['left_edge'][0]
255 glis[j,1] = gridread['left_edge'][1]
KeyError: 'level'
More information about the yt-dev
mailing list