<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
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:<br>
<blockquote><small>Traceback (most recent call last):<br>
File "./findclumps.py", line 44, in <module><br>
find_clumps(master_clump, c_min, c_max, step)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 182, in find_clumps<br>
find_clumps(clump, min_val*d_clump, max_val, d_clump)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 191, in find_clumps<br>
elif (child._isValid()):<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py",
line 145, in _isValid<br>
self.function_value = eval(self.function)<br>
File "<string>", line 1, in <module><br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
line 94, in __call__<br>
return self._call_func_unlazy(args, kwargs)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
line 119, in _call_func_unlazy<br>
retval = self.func(self._data_source, *args, **kwargs)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py",
line 378, in _IsBound<br>
mass_to_use = data["TotalMass"]<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 332, in __getitem__<br>
self.get_data(key)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 2618, in get_data<br>
if self._generate_field(field):<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 362, in _generate_field<br>
self[field] = self.pf.field_info[field](self)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 395, in __call__<br>
dd = self._function(self, data)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/universal_fields.py",
line 444, in _TotalMass<br>
return (data["Density"]+data["particle_density"]) *
data["CellVolume"]<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 332, in __getitem__<br>
self.get_data(key)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 2618, in get_data<br>
if self._generate_field(field):<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 359, in _generate_field<br>
self._generate_field_in_grids(field,
ngt_exception.ghost_zones)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 369, in _generate_field_in_grids<br>
grid[field] = self.__touch_grid_field(grid, field)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 95, in save_state<br>
tr = func(self, grid, field, *args, **kwargs)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 373, in __touch_grid_field<br>
return grid[field]<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
line 157, in __getitem__<br>
self.get_data(key)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
line 200, in get_data<br>
self._generate_field(field)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
line 145, in _generate_field<br>
self[field] = self.pf.field_info[field](self)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 395, in __call__<br>
dd = self._function(self, data)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/universal_fields.py",
line 998, in _pdensity<br>
if data["particle_position_x"].size == 0: return blank<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
line 157, in __getitem__<br>
self.get_data(key)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
line 200, in get_data<br>
self._generate_field(field)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py",
line 145, in _generate_field<br>
self[field] = self.pf.field_info[field](self)<br>
File
"/home/uni05/cborm/YT/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 396, in __call__<br>
dd *= self._convert_function(data)<br>
TypeError: unsupported operand type(s) for *=: 'NoneType' and
'float'</small><br>
</blockquote>
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. <br>
When I run the clump finder on my data with a function that keeps
clumps based on the number of cells, it works fine. <br>
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. <br>
<br>
Anyone knows what's going on here?<br>
Btw, my yt version is b118390aa42c.<br>
<br>
Thanks!<br>
<br>
Cheers, <br>
Caroline<br>
</body>
</html>