[yt-users] yt isocontour flux
Lile Wang
lilew at astro.princeton.edu
Wed Sep 24 09:17:21 PDT 2014
Hi All,
I just got the problem when I am trying to calculate the flux crossing
an isocontour flux.
The minimized example looks like this (data dumps are generated by Enzo):
>>> ds = load( 'DD0501/data0501' )
>>> dd = ds.all_data()
>>> flux = dd.calculate_isocontour_flux( 'density', 1e-, 'x-velocity',
'y-velocity', 'z-velocity', 'density' )
Then I got the exception:
---------------------------------------------------------------------------
[8/936]
AttributeError Traceback (most recent call last)
/u/lilew/Apps/yt-x86_64/src/yt-hg/scripts/iyt in <module>()
----> 1 flux = sp.calculate_isocontour_flux( 'density', rho,
'velocity_x', 'velocity_y', 'velocity_z', 'density' )
/u/lilew/Apps/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.pyc in
calculate_isocontour_flux(self, field, value, field_x, field_y, field_z,
fluxing_field)
1077 """
1078 flux = 0.0
-> 1079 for g in self._get_grid_objs():
1080 flux += self._calculate_flux_in_grid(g, field, value,
1081 field_x, field_y, field_z, fluxing_field)
/u/lilew/Apps/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc
in _get_grid_objs(self)
1042 if self._distributed:
1043 return ParallelObjectIterator(self, True,
attr='_grids')
-> 1044 return ObjectIterator(self, True, attr='_grids')
1045
1046 def get_dependencies(self, fields):
/u/lilew/Apps/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc
in __init__(self, pobj, just_list, attr)
123 gs = getattr(pobj, attr)
124 else:
--> 125 gs = getattr(pobj._data_source, attr)
126 if len(gs) == 0:
127 raise YTNoDataInObjectError(pobj)
AttributeError: 'YTSphere' object has no attribute '_data_source'
---------------------------------------------------------------------------------------------------------------
Could you please help me find out what is wrong?
Any ideas are appreciated. Thanks!
Cheers,
Lile Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140924/3d09f3b0/attachment.htm>
More information about the yt-users
mailing list