yt_astro_analysis.halo_analysis.halo_catalog.halo_callbacks.iterative_center_of_mass

yt_astro_analysis.halo_analysis.halo_catalog.halo_callbacks.iterative_center_of_mass(halo, radius_field='virial_radius', inner_ratio=0.1, outer_radius=1.0, step_ratio=0.9, units='pc')

Adjust halo position by iteratively recalculating the center of mass while decreasing the radius.

Parameters
  • halo (Halo object) – The Halo object to be provided by the HaloCatalog.

  • radius_field (string) – The halo quantity to be used as the radius for the sphere. Default: “virial_radius”

  • inner_ratio (float) – The ratio of the smallest sphere radius used for calculating the center of mass to the initial radius. The sphere radius is reduced and center of mass recalculated until the sphere has reached this size. Default: 0.1

  • outer_radius (float) – Sets the starting radius to begin testing the iterative technique in units of the radius field. When outer_radius starts out too large, sometimes the iterative algorithm wanders into a different halo. Default: 1.0

  • step_ratio (float) – The multiplicative factor used to reduce the radius of the sphere after the center of mass is calculated. Default: 0.9

  • units (str) – The units for printing out the distance between the initial and final centers. Default : “pc”