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 ?