Hi yt users, I'm having a problem generating streamlines. I'm following the cookbook script and it works fine for the IsolatedGalaxy dataset, but not for my own data (also Enzo). The error I'm getting is the following: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-20-d3a0fa7307d4> in<module>() 5 pos= c+pos_dx 6 ----> 7 streamlines = Streamlines(pf,pos,'x-velocity', 'y-velocity', 'z-velocity', length=1.0) 8 #streamlines = Streamlines(pf,pos,'x-velocity', 'y-velocity', 'z-velocity', length=pf.domain_width[0]) 9 streamlines.integrate_through_volume() /data/users/borm/YT/yt-x86_64/src/yt-hg/yt/visualization/streamlines.pyc in__init__(self, pf, positions, xfield, yfield, zfield, volume, dx, length, direction, get_magnitude) 102 volume = AMRKDTree(self.pf, fields=[self.xfield,self.yfield,self.zfield], 103 log_fields=[False,False,False]) --> 104 volume.join_parallel_trees() 105 self.volume= volume 106 if dxis None: /data/users/borm/YT/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.pyc injoin_parallel_trees(self) 456 nid= np.array(nid) 457 new_tree = self.rebuild_tree_from_array(nid, pid, lid, --> 458 rid, les, res, gid, splitdims, splitposs) 459 460 def get_node_arrays(self): /data/users/borm/YT/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.pyc inrebuild_tree_from_array(self, nids, pids, lids, rids, les, res, gids, splitdims, splitposs) 505 N= nids.shape[0] 506 for iin xrange(N): --> 507 n = self.get_node(nids[i]) 508 n.set_left_edge(les[i]) 509 n.set_right_edge(res[i]) /data/users/borm/YT/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.pyc inget_node(self, nodeid) 212 for depthin range(1,len(path)): 213 if path[depth] == '0': --> 214 temp = temp.left 215 else: 216 temp= temp.right AttributeError: 'NoneType' object has no attribute 'left' Though sometimes with a different dataset I also get AttributeError: 'NoneType' object has no attribute 'right' I'm using yt 2.6, but I've also tried with yt 3.1 and I get the same error there (only it takes much, much longer before it crashes?) My datasets do not have particles, not sure if that may be relevant. Any help is much appreciated! Cheers, Caroline
Hi Caroline, I can’t help with the crash, but the huge slowdown in streamlining in 3.x versus 2.x is a known issue <https://bitbucket.org/yt_analysis/yt/pull-request/1514/speed-up-amrkdtree-if...>, which is not yet been fixed unfortunately.
On Jul 1, 2015, at 8:35 AM, Caroline Van Borm <borm@astro.rug.nl> wrote:
Hi yt users,
I'm having a problem generating streamlines. I'm following the cookbook script and it works fine for the IsolatedGalaxy dataset, but not for my own data (also Enzo). The error I'm getting is the following:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-20-d3a0fa7307d4> in <module>() 5 pos = c+pos_dx 6 ----> 7 streamlines = Streamlines(pf,pos,'x-velocity', 'y-velocity', 'z-velocity', length=1.0 ) 8 #streamlines = Streamlines(pf,pos,'x-velocity', 'y-velocity', 'z-velocity', length=pf.domain_width[0]) 9 streamlines.integrate_through_volume()
/data/users/borm/YT/yt-x86_64/src/yt-hg/yt/visualization/streamlines.pyc in __init__(self, pf, positions, xfield, yfield, zfield, volume, dx, length, direction, get_magnitude) 102 volume = AMRKDTree(self.pf, fields=[self.xfield,self.yfield,self.zfield], 103 log_fields=[False,False,False]) --> 104 volume.join_parallel_trees() 105 self.volume = volume 106 if dx is None:
/data/users/borm/YT/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.pyc in join_parallel_trees(self) 456 nid = np.array(nid) 457 new_tree = self.rebuild_tree_from_array(nid, pid, lid, --> 458 rid, les, res, gid, splitdims, splitposs) 459 460 def get_node_arrays(self):
/data/users/borm/YT/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.pyc in rebuild_tree_from_array(self, nids, pids, lids, rids, les, res, gids, splitdims, splitposs) 505 N = nids.shape[0] 506 for i in xrange(N): --> 507 n = self.get_node(nids[i]) 508 n.set_left_edge(les[i]) 509 n.set_right_edge(res[i])
/data/users/borm/YT/yt-x86_64/src/yt-hg/yt/utilities/amr_kdtree/amr_kdtree.pyc in get_node(self, nodeid) 212 for depth in range(1,len(path)): 213 if path[depth] == '0': --> 214 temp = temp.left 215 else: 216 temp = temp.right
AttributeError: 'NoneType' object has no attribute 'left' Though sometimes with a different dataset I also get AttributeError: 'NoneType' object has no attribute 'right' I'm using yt 2.6, but I've also tried with yt 3.1 and I get the same error there (only it takes much, much longer before it crashes?) My datasets do not have particles, not sure if that may be relevant.
Any help is much appreciated!
Cheers, Caroline
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Mark Krumholz
participants (2)
-
Caroline Van Borm
-
Mark Krumholz