[yt-users] Clump finder error

Matthew Turk matthewturk at gmail.com
Mon Jan 13 09:21:32 PST 2014


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> 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
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list