Issue #1320: Annotating halos fails in yt-3.3.4 (yt_analysis/yt)
New issue 1320: Annotating halos fails in yt-3.3.4 https://bitbucket.org/yt_analysis/yt/issues/1320/annotating-halos-fails-in-y... Kacper Kowalik: Following code: ``` #!python import yt from yt.analysis_modules.halo_analysis.halo_catalog import HaloCatalog data_ds = yt.load('Enzo_64/RD0006/RedshiftOutput0006') halos_ds = yt.load('rockstar_halos/halos_0.0.bin') hc = HaloCatalog(halos_ds=halos_ds) hc.create() prj = yt.ProjectionPlot(data_ds, 'z', 'density') prj.annotate_halos(hc, annotate_field='particle_identifier') prj.save() ``` yields: ``` #!bash Traceback (most recent call last): File "yt/visualization/plot_window.py", line 1007, in run_callbacks callback(cbw) File "yt/visualization/plot_modifications.py", line 54, in _check_geometry return func(self, plot) File "yt/visualization/plot_modifications.py", line 1473, in __call__ radius = halo_data[self.radius_field][:].in_units(units) AttributeError: 'HaloCatalogCallback' object has no attribute 'radius_field' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "foo.py", line 12, in <module> prj.save() File "yt/visualization/plot_container.py", line 78, in newfunc args[0]._setup_plots() File "yt/visualization/plot_window.py", line 956, in _setup_plots self.run_callbacks() File "yt/visualization/plot_window.py", line 1013, in run_callbacks sys.exc_info()[2]) File "six.py", line 685, in reraise raise value.with_traceback(tb) File "yt/visualization/plot_window.py", line 1007, in run_callbacks callback(cbw) File "yt/visualization/plot_modifications.py", line 54, in _check_geometry return func(self, plot) File "yt/visualization/plot_modifications.py", line 1473, in __call__ radius = halo_data[self.radius_field][:].in_units(units) yt.utilities.exceptions.YTPlotCallbackError: annotate_halos callback failed with the following error: 'HaloCatalogCallback' object has no attribute 'radius_field' ```
participants (1)
-
Kacper Kowalik