Halo properties analysis

The halo properties analysis is designed to compute halo properties that depend on the particle distribution and tracer properties, but not advanced tracer results such as splashback.

Algorithm for SO masses and radii

The analysis computes SO masses by creating a sorted array of particle radii and comparing the overdensity enclosed within each particle’s radius to one or multiple density thresholds. Moreover, the particle distribution may be a sub-selection of all particles. Thus, there are a number of fundamentally different SO masses:

  • all: All particles. These masses correspond to a strict overdensity criterion for both host and subhalos. For subhalos, strict SO masses may not be very sensible as they likely include a large contribution from the host mass. In such cases, the mass at infall or peak is often used instead of the instantaneous subhalo mass. For all-particle masses, we do not tolerate cases where the density never decreases to the threshold; for such halos, we set an error code.

  • bnd: Gravitationally bound particles. Here, the distribution of particles is taken inside a certain radius determined through config parameters (see below). Then, that distribution is subjected to (possibly iterative) unbinding, where a particle is considered unbound if its kinetic energy with respect to the halo center is larger than some factor times its gravitational binding energy (computed approximately by using a tree potential). Note that the result is strongly dependent on the radius within which particles are considered: if that radius is very large, e.g., multiple times R200m, then almost all particles will be bound. If the radius is small, no particles may be bound, in which case a halo mass and radius of zero are output. Generally, one should not expect that the bound masses match bound masses from a halo finder. For example, Rockstar uses a friends-of-friends group as the initial halo membership, which cannot be reproduced with any SO definition. For bound masses, we tolerate SO masses where the density never decreases to the threshold because the bound particle distribution can be very compact. In that case, multiple SO definitions can agree on the same mass (but different radii).

  • tcr: Tracer masses. This definition applies only to subhalos when sub-particle tracking is on (see Tracers). At subhalo infall, particles are tagged if they are deemed to physically belong to the subhalo. The tracer mass is then defined as an SO mass only for those particles, while no new particles are added to the subhalo (because they are thought to likely belong to the host). For host halos, the all-particle mass is substituted for completeness. As for bound masses, we tolerate cases where the density never decreases to the threshold (which is a fairly common case for tracer masses).

Thus, valid definitions include R200m_all, R500c_all, M500c_all, M200c_tcr, M200c_bnd, or any other combination of those elements.

Compile-time parameters




Write halo properties analyses to output file


Compute spherical overdensity radii and masses for definitions selected by the user


The maximum number of snapshots that can be requested by the user


The maximum number of definitions that can be requested by the user

If memory is an issue, the ANALYSIS_HALOPROPS_MAX_SNAPS and ANALYSIS_HALOPROPS_MAX_DEFINITIONS parameters should be adjusted close to the values they must have to accommodate a given simulation and user preferences.

Run-time parameters








Redshifts where halo properties are output; list of floats, or -1 for all




Spherical overdensity definitions to be computed




Maximum radius within which particles are considered for hosts, in units of R200m




Maximum radius within which particles are considered for subs, in units of R200m




Radius within which host particles are considered for unbinding, in units of R200m




Rad. within which subhalo ptl are considered for unbinding, in units of R200m at infall




Unbind once or iteratively, taking new halo membership into account

Note that choosing redshifts using the anl_hps_redshifts parameter saves memory and disk space, but can lead to issues when creating halo catalogs with MORIA. If in doubt, it is probably best to output the analysis for all snapshots.

The anl_hps_r_max_so_host and anl_hps_r_max_sub parameters give the maximum radius to which all-particle SO radii are allowed. These radii do contribute to the particle search radius, that is, we guarantee that all particles are available within those radii. Thus, if they are set to a value larger than other radii (such as tracer radii), they may slow down the code.

However, for hosts, the anl_hps_r_max_so_host parameter can safely be left at a value near 1 as long as no definition with a larger radius than R200m is chosen. If a larger radius is chosen, e.g., 180m, then this radius can be slightly larger than R200m at high redshift (note that Rvir approaches R178m at high redshift). Importantly, making anl_hps_r_max_so_host or anl_hps_r_max_sub larger does not affect run time if there are other, larger radii already forcing the code to look for particles further out. Conversely, we do not use any particles beyond those radii even if they are available, for example for density profiles, in order to prevent any dependence on extraneous factors.

If the threshold cannot be reached within the search radius, i.e., if the density is higher than the threshold at all considered radii, the mass/radius cannot be computed and the status field will indicate that (see below). When the search radius is near 200m, some small (typically less than 100 particle) halos may not be assigned a valid 200m by this analysis due to numerical reasons. If you care about such halos, please increase anl_hps_r_max_so_host.

The corresponding parameter for subhalos, anl_hps_r_max_sub, sets the search radius in units of R200m at infall. Note that SO radii are generally not well-defined for subhalos due to the contribution of mass from the host. Thus, it is not recommended to increase anl_hps_r_max_sub to large values only to get SO radii that are more or less meaningless anyway, unless that is the specific purpose of the calculation. We do not output radii/masses if the threshold was not reached as they are physically meaningless and will totally depend on anl_hps_r_max_sub.

For tcr masses, however, we do allow radii/masses where the outer threshold was not reached, as we consider their particle set to be finite (unlike the overall particle distribution). Thus, their total mass is well-defined even if they never formally reach a threshold.

If anl_hps_iterative_unbinding is on, the unbinding procedure (for _bnd masses) is performed iteratively, meaning that the potential is recomputed without particles that have previously been unbound. This procedure should, in principle, lead to more accurate results, but can also be very time-consuming. In practice the results are not different enough to warrant the computational cost. See also the potential_err_tol parameter in the general configuration (Run-time configuration parameters).

Output fields




Exists if






The index of the first analysis for each halo (or -1 if none exists for a halo).





The number of analyses of this type for each halo (can be 0).





The (original, first-snapshot) halo ID to which this analysis refers.

<halo defn>


n_al_haloprops * n_snaps


One field for each halo definition (see above)

status_<halo defn>


n_al_haloprops * n_snaps


Status for each definition and redshift

Here, n_snaps is, of course, the number of redshifts chosen by the user of the number of snapshots in the simulation if anl_rsp_redshifts is -1. The status field can take on the following values:






Placeholder, should never occur in output file



The analysis succeeded, all output values can be used



Halo could not be analyzed at this snapshot, e.g. because it didn’t exist



Halo was not saved to the SPARTA output file at all (used in MORIA)



Analysis not found for this halo (used in MORIA)



The density was lower than the SO threshold everywhere within the search radius



The density was higher than the SO threshold everywhere within the search radius

The ANL_HPS_STATUS_SO_TOO_LARGE status occurs frequently for subhalos, where an SO boundary can often not be obtained because the mass profile is dominated by the host halo.