<div dir="ltr">Hi Lile,<div><br></div><div>I'm able to reproduce this issue over here. Thanks for the report!</div><div><br></div><div>I've opened an issue to track this here: <a href="https://bitbucket.org/yt_analysis/yt/issue/909/calculate_isocontour_flux-function-raises">https://bitbucket.org/yt_analysis/yt/issue/909/calculate_isocontour_flux-function-raises</a></div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 24, 2014 at 9:17 AM, Lile Wang <span dir="ltr"><<a href="mailto:lilew@astro.princeton.edu" target="_blank">lilew@astro.princeton.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<font><span style="font-size:10pt">
<div>Hi All,<br>
<br>
I just got the problem when I am trying to calculate the flux
crossing an isocontour flux.<br>
<br>
The minimized example looks like this (data dumps are
generated by Enzo):<br>
<br>
>>> ds = load( ‘DD0501/data0501’ )<br>
>>> dd = ds.all_data()<br>
>>> flux = dd.calculate_isocontour_flux( 'density',
1e-, ‘x-velocity’, ‘y-velocity’, ‘z-velocity’, ‘density’ )<br>
<br>
Then I got the exception:<br>
<br>
---------------------------------------------------------------------------
[8/936]<br>
AttributeError Traceback (most
recent call last)<br>
/u/lilew/Apps/yt-x86_64/src/yt-hg/scripts/iyt in
<module>()<br>
----> 1 flux = sp.calculate_isocontour_flux( 'density',
rho, 'velocity_x', 'velocity_y', 'velocity_z', 'density' )<br>
<br>
/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)<br>
1077 """<br>
1078 flux = 0.0<br>
-> 1079 for g in self._get_grid_objs():<br>
1080 flux += self._calculate_flux_in_grid(g,
field, value,<br>
1081 field_x, field_y, field_z,
fluxing_field)<br>
<br>
/u/lilew/Apps/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc
in _get_grid_objs(self)<br>
1042 if self._distributed:<br>
1043 return ParallelObjectIterator(self, True,
attr='_grids')<br>
-> 1044 return ObjectIterator(self, True,
attr='_grids')<br>
1045<br>
1046 def get_dependencies(self, fields):<br>
<br>
/u/lilew/Apps/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc
in __init__(self, pobj, just_list, attr)<br>
123 gs = getattr(pobj, attr)<br>
124 else:<br>
--> 125 gs = getattr(pobj._data_source, attr)<br>
126 if len(gs) == 0:<br>
127 raise YTNoDataInObjectError(pobj)<br>
<br>
AttributeError: 'YTSphere' object has no attribute
'_data_source'<br>
<br>
————————————————————————————————————— <br>
<br>
Could you please help me find out what is wrong? <br>
<br>
Any ideas are appreciated. Thanks!<br>
<br>
Cheers,<br>
Lile Wang<br>
<br>
<br>
</div>
</span></font>
</div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>