When you create a halo catalog in the above manner, the field will be called "particle_position". This dataset will also be saved to disk after the call to hc.create(), so you can use yt.load to reload the new catalog without having to remake it.
On Tue, Feb 21, 2017 at 11:25 PM, Reju Sam John firstname.lastname@example.org wrote:
I am very new in YT 3.3's HaloCatalog functionality. With the following piece of code, I am able to get paerical mass and virial radius.
import yt from yt.analysis_modules.halo_analysis.api import HaloCatalog data_ds = yt.load('/run/media/john/Seagate_Expansion_Drive/cosmo- sim_20/RD0057/RedshiftOutput0057') hc = HaloCatalog(data_ds=data_ds, finder_method='hop') hc.create() ad = hc.halos_ds.all_data() pm = ad['particle_mass'][:] vr = ad['virial_radius'][:]
I would like to calculate the center of mass of the halo. I tried with the following line com = ad['center_of_mass'][:] since like virial_radius(), center_of_mass() was available in YT2.6. But this is not working.
Could you please suggest me how to calculate the center of mass of a halo in yt 3.3.3 ?
-- Reju Sam John
yt-users mailing list email@example.com http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org