[yt-users] Clump finder error
Caroline Van Borm
borm at astro.rug.nl
Thu Jan 16 07:52:54 PST 2014
Hi Britton,
Great, that did the trick! Thanks!
Cheers,
Caroline
On 01/15/2014 06:52 PM, Britton Smith wrote:
> Hi Caroline,
>
> If Matt is correct (and I think he is) that this is an issue with
> trying to get particle data when there is none, then you should be
> able to resolve this by providing the keyword
> argument, include_particles=False, to the IsBound function.
>
> Please, let us know if this works. If not, we'll take a closer look
> and see if there is another bug.
>
> Britton
>
>
> On Mon, Jan 13, 2014 at 7:42 PM, Matthew Turk <matthewturk at gmail.com
> <mailto:matthewturk at gmail.com>> wrote:
>
> Hi Caroline,
>
> I think that's the trouble -- for some reason, the clump finder is
> assuming there are particles and attempting to deposit them into the
> fields before computing the mass. Could you file a bug, and we will
> triage it there and work through it? I think we should be able to
> resolve it quickly.
>
> Thanks,
>
> Matt
>
> On Mon, Jan 13, 2014 at 1:34 PM, Caroline Van Borm
> <borm at astro.rug.nl <mailto:borm at astro.rug.nl>> wrote:
> > Hi Matt,
> >
> > Thanks for your reply. There shouldn't be particles in my
> simulation, as far
> > as I can tell.
> >
> > Cheers,
> > Caroline
> >
> >
> >
> >
> > On 01/13/2014 06:21 PM, Matthew Turk wrote:
> >>
> >> Hi Caroline,
> >>
> >> Sorry you're having trouble! Do you have particles in your
> simulation?
> >>
> >> -Matt
> >>
> >> On Fri, Jan 10, 2014 at 12:18 PM, Caroline Van Borm
> <borm at astro.rug.nl <mailto:borm at astro.rug.nl>>
> >> wrote:
> >>>
> >>> Hi all,
> >>>
> >>> I have a problem with the clump finder. When I try to run it on my
> >>> dataset
> >>> (Enzo data), using a script that mostly follows the
> find_clumps.py from
> >>> the
> >>> yt docs, I get the following, very long, error:
> >>>
> >>> Traceback (most recent call last):
> >>> File "./findclumps.py", line 44, in <module>
> >>> find_clumps(master_clump, c_min, c_max, step)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 182, in find_clumps
> >>> find_clumps(clump, min_val*d_clump, max_val, d_clump)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 191, in find_clumps
> >>> elif (child._isValid()):
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
> >>> line 145, in _isValid
> >>> self.function_value = eval(self.function)
> >>> File "<string>", line 1, in <module>
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
> >>> line 94, in __call__
> >>> return self._call_func_unlazy(args, kwargs)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
> >>> line 119, in _call_func_unlazy
> >>> retval = self.func(self._data_source, *args, **kwargs)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
> >>> line 378, in _IsBound
> >>> mass_to_use = data["TotalMass"]
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 332, in __getitem__
> >>> self.get_data(key)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 2618, in get_data
> >>> if self._generate_field(field):
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 362, in _generate_field
> >>> self[field] = self.pf.field_info[field](self)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
> >>> line 395, in __call__
> >>> dd = self._function(self, data)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/universal_fields.py",
> >>> line 444, in _TotalMass
> >>> return (data["Density"]+data["particle_density"]) *
> >>> data["CellVolume"]
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 332, in __getitem__
> >>> self.get_data(key)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 2618, in get_data
> >>> if self._generate_field(field):
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 359, in _generate_field
> >>> self._generate_field_in_grids(field,
> ngt_exception.ghost_zones)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 369, in _generate_field_in_grids
> >>> grid[field] = self.__touch_grid_field(grid, field)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 95, in save_state
> >>> tr = func(self, grid, field, *args, **kwargs)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
> >>> line 373, in __touch_grid_field
> >>> return grid[field]
> >>> File
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
> >>> line 157, in __getitem__
> >>> self.get_data(key)
> >>> File
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
> >>> line 200, in get_data
> >>> self._generate_field(field)
> >>> File
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
> >>> line 145, in _generate_field
> >>> self[field] = self.pf.field_info[field](self)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
> >>> line 395, in __call__
> >>> dd = self._function(self, data)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/universal_fields.py",
> >>> line 998, in _pdensity
> >>> if data["particle_position_x"].size == 0: return blank
> >>> File
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
> >>> line 157, in __getitem__
> >>> self.get_data(key)
> >>> File
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
> >>> line 200, in get_data
> >>> self._generate_field(field)
> >>> File
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
> >>> line 145, in _generate_field
> >>> self[field] = self.pf.field_info[field](self)
> >>> File
> >>>
> >>>
> "/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
> >>> line 396, in __call__
> >>> dd *= self._convert_function(data)
> >>> TypeError: unsupported operand type(s) for *=: 'NoneType' and
> 'float'
> >>>
> >>> The main difference is that for the function passed to Clump,
> I'm using
> >>>
> >>>
> 'self.data.quantities["IsBound"](truncate=True,include_thermal_energy=True)
> >>>>
> >>>> 1.0' to find gravitationally bound objects.
> >>>
> >>> When I run the clump finder on my data with a function that
> keeps clumps
> >>> based on the number of cells, it works fine.
> >>> I also tried running the script on the IsolatedGalaxy dataset as
> >>> demonstrated in the docs. This works fine too, also when the
> function is
> >>> set
> >>> to the one mentioned above.
> >>>
> >>> Anyone knows what's going on here?
> >>> Btw, my yt version is b118390aa42c.
> >>>
> >>> Thanks!
> >>>
> >>> Cheers,
> >>> Caroline
> >>>
> >>> _______________________________________________
> >>> yt-users mailing list
> >>> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
>
> _______________________________________________
> 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/20140116/d6c1c09f/attachment.htm>
More information about the yt-users
mailing list