[yt-users] yt isocontour flux
Nathan Goldbaum
nathan12343 at gmail.com
Wed Sep 24 11:40:18 PDT 2014
Hi Lile,
I'm able to reproduce this issue over here. Thanks for the report!
I've opened an issue to track this here:
https://bitbucket.org/yt_analysis/yt/issue/909/calculate_isocontour_flux-function-raises
-Nathan
On Wed, Sep 24, 2014 at 9:17 AM, Lile Wang <lilew at astro.princeton.edu>
wrote:
> 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
>
>
>
> _______________________________________________
> 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/20140924/58bb1dca/attachment.html>
More information about the yt-users
mailing list