<div dir="ltr">Hi all,<div><br></div><div>I'm running into more issues with Halo Catalogs and units. I'm not sure if the <a href="https://bitbucket.org/yt_analysis/yt/pull-requests/2208/">last PR</a> is causing this or not. I'm running the latest code from the repo as of right now (fd8796c8e06d). Here's the error, generated on <a href="https://drive.google.com/open?id=0BwK-7Z3S5X_yMDNyZ1RTcG56SFU">this data</a> with <a href="https://gist.github.com/rasmi/6cf6017b50277390735dd484c120855f">this script</a>.</div>







<div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><font face="monospace, monospace">/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/units/yt_array.py:976: RuntimeWarning: divide by zero encountered in divide<br>  return super(YTArray, self).__div__(ro)<br>Traceback (most recent call last):<br>  File "/work/03330/tg826294/applications/scripts/findhalos.py", line 65, in <module><br>    hc.create()<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/analysis_modules/halo_analysis/halo_catalog.py", line 335, in create<br>    self._run(save_halos, save_catalog, njobs=njobs, dynamic=dynamic)<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 302, in barrierize<br>    return func(*args, **kwargs)<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/analysis_modules/halo_analysis/halo_catalog.py", line 427, in _run<br>    action(new_halo)<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/analysis_modules/halo_analysis/halo_callbacks.py", line 60, in __call__<br>    self.function(halo, *self.args, **self.kwargs)<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/analysis_modules/halo_analysis/halo_callbacks.py", line 571, in iterative_center_of_mass<br>    sphere = halo.halo_catalog.data_ds.sphere(center_orig, halo.quantities[radius_field])<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/data_objects/selection_data_containers.py", line 649, in __init__<br>    if radius < self.index.get_smallest_dx():<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/units/yt_array.py", line 1095, in __lt__<br>    return super(YTArray, self).__lt__(oth)<br>  File "/work/03330/tg826294/applications/pythonenv/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg/yt/units/yt_array.py", line 1225, in __array_wrap__<br>    raise YTUfuncUnitError(context[0], unit1, unit2)<br>yt.utilities.exceptions.YTUfuncUnitError: The NumPy <ufunc 'less'> operation is only allowed on objects with identical units. Convert one of the arrays to the other's units first. Received units (code_length) and (code_length).</font></blockquote><div><br></div><div>Has anyone run into this before? yt seems to think these two units aren't the same -- is it possible the HaloCatalog unit import is being done incorrectly? At this point, I haven't written anything to the disk, so I'm not sure what the issue might be.</div></div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Rasmi</div></div>