{'fraction_non_alphanumeric': 0.02984264785675529, 'fraction_numerical': 0.01475854584915898, 'mean_word_length': 4.372328021764477, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Structural properties of artificial halos in non-standard dark matter simulations

Artificial fragmentation of the matter density field causes the formation of spurious groups of particles in N-body simulations of non-standard Dark Matter (DM) models which are characterized by a small scale cut-off in the linear matter power spectrum. These spurious halos alter the prediction of the mass function in a range of masses where differences among DM models are most relevant to observational tests. Using a suite of high resolution simulations we show that the contamination of artificial groups of particles significantly affect the statistics of halo spin, shape and virial state parameters. We find that spurious halos have systematically larger spin values, are highly elliptical or prolate and significantly deviate from virial equilibrium. These characteristics allow us to detect the presence of spurious halos even in non-standard DM models for which the low-mass end of the mass function remains well behaved. We show that selecting halos near the virial equilibrium provides a simple and effective method to remove the bulk of spurious halos from numerical halo catalogs and consistently recover the halo mass function at low masses.


I. INTRODUCTION
A generic feature of dark matter models alternative to the standard Cold Dark Matter (CDM) hypothesis is the presence of a small scale cut-off in the linear matter power spectrum. In the Warm Dark Matter (WDM) scenario this arises from the damping of matter density fluctuations on scales smaller than the free-streaming length of WDM particles (see e.g. [1,2]). Similarly, in models of Ultra-Light Axion (ULA) dark matter, the effective Jean's length associated to the oscillating axion field naturally introduces a damping scale in the matter power spectrum (see e.g. [3]). Scenarios of Late Forming Dark Matter (LFDM) also predict a suppression of power at small scales that depends on the epoch of DM formation [4]. Because of this feature, non-standard DM models and the standard CDM scenario differ in the late-time clustering properties at small scales, where the dynamics of the gravitational collapse is highly non-linear. In this regime quantitative predictions have been possible thanks to the use of large volume high-resolution N-body simulations (see e.g. [5][6][7][8][9][10][11][12][13][14][15]).
The accuracy of N-body results relies upon the ability to control numerical systematic effects. These can be controlled through convergence analysis tests that evaluate the dependence on the volume and mass resolution of the simulations. However, in the case of models with a sharp cut-off in the initial power spectrum, N-body simulations have shown the presence of unphysical group of particles which result from the artificial fragmentation of the matter density field at small scales [16][17][18]. These artifacts have been shown to form independently of how initial conditions are generated [18]. This is because artificial fragmentation is a discretization phenomenon which arises from N-body sampling Poisson noise at wave numbers larger than the cut-off in matter power spectrum.
Artificial halos contaminate the low-mass end of the halo mass function in the interval range where difference among the different DM scenarios are most relevant. Hence, their removal is essential to predict the correct abundance of dwarf-galaxy halos as well as the dynamical properties of halo substructures that in recent years have become a probe of the nature of DM through observations of the local Universe [19][20][21][22][23].
Numerical studies have shown that increasing the mass resolution of the simulations alleviates artificial fragmentation [18,24]. In fact, increasing the number of N-body particles (N p ) reduces the intra-particle distance d (i.e. increases the Nyquist frequency of the simulations) as well as the amplitude of the Poisson noise (∝ 1/N p ) thus leading to less fragmentation near the cut-off scale. However, it would require the fluid limit to completely remove this effect (for an attempt in this direction see e.g. [25,26]). Hence, in the presence of artificial halos we ought to rely on empirical methods to infer artifact-free model predictions.
Wang & White [18] have suggested to apply a masscut to numerical halo catalogs and retain only halos with mass larger than M lim = 10.1 ρ d k −2 peak , where ρ is the mean cosmic matter density and k peak is the wavenumber of the peak in the dimensionless power spectrum ∆ 2 (k) of WDM models and the numerical coefficient is estimated from simulations.
Schneider, Smith and Reed [24] have outlined an alternative approach based on the fact that artificial halos contribute to an upturn of the low-mass end of the mass function with a characteristic power law behavior. Using this information, the contribution of artificial halos can be extrapolated at larger masses and subtracted from the measured mass function.
A more sophisticated approach as been adopted by Lovell et al. [10]. Their method combines multiple criteria: first, Lagrangian patches in the initial conditions are identified for each halo in the catalogs, those associated to patches whose shape is flatter than a given threshold are removed since genuine proto-halos are spheroidal; second, halos below a given mass-cut are removed; finally, a match between the residual halos in simulations at different resolution is applied and only halos present at both resolutions are retained.
Here, we develop a complementary approach that relies on the structural properties of halos as a way to differentiate genuine halos from artificial ones. Using a suite of high resolution N-body simulations of non-standard DM models we show that artificial halos are characterized by extreme values of the spin and shape parameters and significantly depart from virial equilibrium. Hence, discarding unrelaxed halos from numerical halo catalogs can account for most of the effects induced by artificial group of particles and allows to predict the correct halo mass function over a wider range of mass than using simple mass cuts.
The paper is organized as follows: in Section II we present the models and describe the N-body simulation characteristics. In Section III we show the results on the halo mass function and the analysis of the structural properties of halos. In Section IV we propose a halo selection criterion based on the virial state of halos and present the results on the halo mass function and the distribution of halo spins. Finally, we discuss and conclude in Section V.

A. Models and Simulation Characteristics
We run a suite of cosmological simulations using RAM-SES [27], an adaptive mesh refinement code with a treebased data structure that allows recursive grid refinement on a cell-by-cell basis. Particles are evolved using a particle-mesh (PM) solver, while the Poisson equation is solved using a multigrid method [28].
We consider as reference model a standard cold dark matter scenario with cosmological constant (ΛCDM) with zero curvature and the following set of parameters: Ω m = 0.3, h = 0.7, σ 8 = 0.8, n s = 0.96 and Ω b = 0.046. For the non-standard DM cosmologies we consider two WDM models with thermal relic particle mass of m wdm = 1.465 keV (WDM-a) and 0.696 keV (WDM-b), and a LFDM model with phase transition redshift z t = 1.5 × 10 6 (for details on the LFDM model, see [15]). The cosmological parameters for these nonstandard DM models are set to our reference ΛCDM values. We note that out of these three non-standard DM models, only the LFDM satisfies the constraints imposed on the matter power spectrum inferred from the Lymanα measurements [29]. WDM models with m wdm < 2 keV are disfavored at 4σ confidence level, however we include them in this paper to study artificial fragmentation of the matter density field.
The linear matter power spectra of the non-standard DM models are characterized by a cut-off scale and damping slope 1 . These are shown for z = 0 in Fig. 1. We 1 We compute the initial linear power spectra using CAMB [30].  can see that the WDM-b model has a larger scale cutoff compared to WDM-a and LFDM, while the damping slope of LFDM is less steep than that of the WDM models. We use the linear power spectra to generate Gaussian In the case of the WDM models we evaluate the linear transfer function as in [31]:  (2) in units of h −1 Mpc. We assume damping slope ν = 1 and number of degrees of freedom g wdm = 1.5. The power spectrum of WDM models is then obtained from that of ΛCDM as initial conditions using the Zel'dovich approximation as implemented in MPGRAFIC [32]. To facilitate comparison we have used the same phase of the initial conditions for all simulated models. We set the starting redshift of the simulation by imposing the constraint relation σ(∆ coarse x ) = 0.02, such that at the initial redshift all models have the same value of the standard deviation of the initial density field σ smoothed on the scale of the coarse grid ∆ coarse x . This guarantees that the initial redshift of the simulations is sufficiently high to suppress spurious effects due to transients [33].
In Table I we list the characteristics of the N-body simulation runs. For all models we run a (27.5 h −1 Mpc) 3 volume simulation with 512 3 particles corresponding to a mass resolution m p = 1.29 × 10 7 h −1 M . In order to perform a detailed convergence study on artificial halos we have run additional simulations for the WDMa and WDM-b models. In both cases we have run a higher resolution simulation of (27.5 h −1 Mpc) 3 volume with 1024 3 particles corresponding to a mass resolution of m p = 1.61 × 10 6 h −1 M . For WDM-b we have also run a simulation of lower resolution and larger volume: (64 h −1 Mpc) 3 volume with 512 3 particles corresponding to a mass resolution m p = 1.63 × 10 8 h −1 M .

B. Halo Finder and Halo Properties
We detect halos using the code pFOF [34] based on a parallelized version of the friend-of-friend algorithm [35]. This detects halos as group of particles characterized by an intra-particle distance smaller than a given linking length parameter b, which we set to 0.2. During the first iteration, the algorithm groups all particles in the simulation box which are within distance b of an initial particle. This search is then carried out for the rest of the particles of the group until no new neighbors are found. This final set of particles is then tagged as a halo and removed from the list. The algorithm then iterates over the next untagged particles repeating the above procedure to detect a new halo.
For each halo in the simulations we estimate the spin parameter defined as [37]: where M is the mass of the halo, V = GM/R is the orbital velocity at the virial radius R (G being Newton's constant) and J is the amplitude of the halo angular momentum: where the sum runs over all N h -halo particles with position r i and velocity v i ( r c and v c being the position and velocity of the halo center of mass). The definition of the spin parameter given by Eq. (4) normalizes the halo angular momentum to its maximal value. We also quantify the shape of halos by computing the symmetric mass distribution tensor defined as (see e.g. [38]) where α, β = 1, 2, 3 denote the three components of the position vectors. The eigenvalues of M αβ , a 2 ≥ b 2 ≥ c 2 , define a triaxial ellipsoid with axis lengths a ≥ b ≥ c. These can be combined to define halo shape parameters. Here, we focus on the sphericity s = c/a, ellip- . Genuine halos, being close to spheroidal, have large values of sphericity and low ellipticity and prolateness. On the other hand, spurious halos are expected to be abnormally elliptical (large value of e) with disk-like (oblate, p < 0) or needle-like (prolate, p > 0) shapes. We estimate the dynamical state of halos by computing the virial state parameter η = 2K/|E| ∈ [0, ∞], where K is the total kinetic energy and E is the gravitational potential energy. In the case of virialized halos η ≈ 1. It is worth reminding that η only provides an approximate estimation of a halo's virial state. In fact, while there is no ambiguity in the determination of the kinetic energy of the halo (i.e. the sum of the kinetic energy of each halo particle), the potential energy E is a non-local quantity, since it also depends on particles that do not belong to the halo, but are in the surrounding density field. This may introduce a systematic source of uncertainty in the evaluation of the virial state. Despite such a limitation, η remains a useful proxy especially to identify halos with large deviation from the virial condition (i.e. η 1).

III. ANALYSIS OF SPURIOUS HALOS
A visual inspection of the simulations shows that there are progressively less structures in LFDM, WDM-a and WDM-b compared to the ΛCDM. This can be seen in Fig. 2 where we plot a 2D projection of the dark matter density field at z = 0 of a box of ∼ 7 h −1 Mpc side from the (27.5 h −1 Mpc) 3 volume simulations with 512 3 particles. This trend is consistent with expectations due to the fact that the damping of the linear matter power spectrum of the non-standard DM models considered here occurs at an increasingly larger scale (small wavenumbers) as we go from LFDM to WDM-b (see Fig. 1). For these models we can also notice an increasing granularity of the density field along filamentary structures with the appearance of regularly spaced group of particles that are especially distinguishable in the WDM-b case. These are spurious numerical halos.

A. Halo Mass Function
The presence of a cut-off in the linear matter power spectrum introduces a characteristic mass scale in the halo mass function. As shown in [36] for WDM models, this scale can be parameterized in terms of the 'halfmode' mass M hm , namely the mass associated to the length scale where the linear transfer function drops to half of its value. In the case of the WDM models considered here we have M hm = 7.41 × 10 9 h −1 M for WDM-a and M hm = 9.65 × 10 10 h −1 M for WDM-b, while for the LFDM model we estimate M hm = 3 × 10 9 h −1 M .
In Fig. 3 we plot the halo mass function at z = 0 for halos with at least 100 particles from the simulation suite. As expected the number density of halos in the non-standard DM models is suppressed with respect to the ΛCDM case at around the half-mode mass. The larger the half-mode mass the larger the suppression of the mass function relative to ΛCDM. However, in the case of the WDM models we can see that the low mass end of the mass function rises instead of falling. The effect is more dramatic for WDM-b model which has the largest half-mode mass. As shown in [18] this upturn is an artifact due to the contribution of artificial halos. Above the half-mode mass all models converge to the ΛCDM mass function within finite volume errors.
Let us now compare the mass function of the WDM models from the (27.5 h −1 Mpc) 3 volume simulations with 512 3 and 1024 3 particles respectively. From Fig. 3 we see that the slope of the upturn at the low-mass end depends on the mass resolution of the simulations, in agreement with the findings of [24]. This dependence is a clear indication of the fact that the majority of halos in this mass range are numerical artifacts. We find that the mass functions of the lower resolution runs converge to those of higher resolution to better than ≈ 5% for M 4 × 10 9 h −1 M -roughly corresponding to halos with more than 300 particles. For the WDM-b simulation of (64 h −1 Mpc) 3 volume and 512 3 particles we find a similar level of convergence to that of the (27.5 h −1 Mpc) 3 simulation with 512 3 particles for M 5 × 10 9 h −1 M , again roughly corresponding to a minimum of 300 particles per halo. Thus, from now on we only consider halos with at least 300 particles. For simulations of (27.5 h −1 Mpc) 3 volume and 512 3 particles, a 300-particle halo mass at 4 × 10 9 h −1 M is below the half-mode mass M hm of the models (vertical dotted lines in Fig. 3). The WDM mass functions, instead of falling, continue to rise even below their respective M hm values. As such, even a conservative 300-particle cut does not fully solve the problem of spurious halos. Moreover, the absence of a well defined upturn in the LFDM mass function does not imply that the LFDM model (and those with a similar suppression of power at small scales) are exempt of artificial halo contamination. The point that we want to stress is that artifacts caused by spurious halos cannot be addressed by solely assuming conservative mass cuts in the halo catalogs. Moreover, extrapolating information from the upturn of the mass function might not be possible since depending on the models and the simulations an upturn may be absent near the half-mode mass. A case in point is the LFDM mass function (see Fig. 3) where at the lowest mass end there is no well defined upturn. As we will show hereafter, removing the contribution of artificial halos requires their characterization in terms of physical properties that may distinguish them from genuine halos.

B. Halo Spin and Shape
In Fig. 4 we plot the normalized probability density function of the halo spin parameter at z = 0 from the 27.  Previous studies have shown that the distribution of halo spins in ΛCDM model depends only weakly on the halo mass and is approximately described by a log-normal distribution [39,40]. As we can see from the top left panel of Fig. 4 our results are consistent with these findings. Notice that the tail of the ΛCDM distribution appears to be heavier in the lowest mass bin (red solid line). As shown in [39] this is mostly due to unrelaxed halos. We will confirm this conclusion in the analysis presented in Section III C.
In the top right panel of Fig. 4 we plot the distribution of spins for the LFDM model. Compared to the ΛCDM case, we can see a stronger dependence on halo mass. Moreover, the distribution appears to be well described by to a log-normal only for the highest mass bin (blue solid line), while at lower masses the distribution is increasingly heavy tailed with the lowest mass bin turning nearly bimodal.
Despite the larger statistical noise, such a trend can also be seen in the WDM models shown in the lower panels of Fig. 4. We may notice large departures from log-normality, in particular the lower mass bins are characterized by a bimodal distribution of the spin parameter. Since spurious halos dominate the halo abundance in this mass range (see Fig. 3), we can deduce that the bimodality is a numerical artifact similar to the upturn in the halo mass function. Furthermore, as the lowest mass bin in the LFDM case in Fig. 4 shows a heavy tail compared to a log-normal distribution, this indicates that spurious halos also affect the LFDM halo mass function (see Fig. 3) even in the absence of an upturn at low masses. This implies that other non-standard DM scenarios characterized by a suppression of power at small scales similar to LFDM, such as a class of Self-Interacting Dark Matter (SIDM) models discussed in [15], may be contaminated by spurious halos as well.
In Fig. 5 we plot the normalized probability density function of halo shape parameters at z = 0 as a function of halo mass. We can see a mass trend similar to that of the spin parameter shown in Fig. 4. In the ΛCDM case the majority of halos are slightly elliptical, moreover the distribution of the shape parameters is nearly independent of the halo mass. This is not the case for the low mass bins of the non-standard DM models. In particular, in the WDM case we see that only the higher mass bins have a distribution that is consistent with that of the ΛCDM. At lower masses, halos have systematically higher values of ellipticity and prolateness. This suggests that besides high spin values, artificial halos are highly elliptical and prolate compared to genuine ones.

C. Virial State vs Spin Statistics
Further insight on the structural properties of artificial halos can be gained by considering the probability distribution of the virial state parameter η. Since spurious halos are the result of artificial fragmentation, it is reasonable to expect that such group of particles are not virialized. Therefore, in the case of artificial halos the parameter η deviates from unity and correlates with large values of halo spin.
In Fig. 6 we show the density plot of the normalized probability density function in the λ − η plane for the simulations with 512 3 particles and 27.5 h −1 Mpc boxlength at z = 0. The set of four panels on the left shows the distribution of halos with mass M< 10 10 h −1 M , while the set on the right shows halos with mass in the range 10 11 < M[ h −1 M ] < 10 13 . In the former case we can clearly see a strong correlation between large deviations from virial equilibrium (i.e. η = 1) and high spin values. This manifests through a heavy tail that is absent in the higher mass bin case. From the density plot we see that the fraction of halos populating this extended tail is lowest for ΛCDM, while it increases for the non-CDM models in proportion to their half-mode mass. Moreover, the tail systematically extends towards larger values of λ and η. We also notice that in the case of the WDM models the tail of the distribution becomes bimodal. Let us remark that while the ΛCDM halos with M< 10 10 h −1 M shown Fig. 6 have a distribution of spin and shape parameters which is nearly independent of their mass (see Figs. [4][5], this is not the case for the non-standard DM models. This suggests that while the extended tail of the ΛCDM probability density function in the λ −η plane is composed of genuine unrelaxed halos, that of the non-CDM models is dominated by spurious halos.

IV. SPURIOUS HALOS SELECTION
In the previous Section we have shown that the structural properties of spurious halos in non-standard DM simulations differ from that of genuine halos 3 . In particular, we have found a strong correlation between devia-tions from the virial condition and large values of halo spin at low masses. Spurious halos with such features contribute to the bimodality of the spin distribution. These results suggest a simple way of removing artificial halos from N-body halo catalogs since a cut based on the virial state of halos, as parametrized by η, can filter out spurious halos in the tail of the halo distribution. In the CDM case this approach leaves only halos that are approximately well relaxed (see e.g. [39]), while it effectively removes the bulk of spurious halos in non-CDM models. As we will show here, this halo selection allows us to recover the correct halo mass function at low masses and gives convergent results when applied to N-body runs with different mass resolutions.  Table I before and after removing unrelaxed halos (grey points). All halos have at least 300 particles. Vertical lines correspond to the mass cut M lim from [18] for WDM-a (green) and WDM-b (brown) models in the case of the simulations with 27.5 h −1 Mpc boxlength and 512 3 particles.
In Fig. 7 we plot the halo mass function at z = 0 for halos with at least 300 particles for the simulations listed in Table I. The grey points show the mass functions for halos with the virial state parameter in the range 0 ≤ η ≤ 1.5. In particular, let us focus on the mass function of WDM-a (green points) and WDM-b (brown points) models before and after the virial state parameter cut from the simulations of 27.5 h −1 Mpc boxlength with 512 3 (empty circles) and 1024 3 (solid circles) particles respectively. Notice that discarding unrelaxed halos (η > 1.5) has removed the upturn at low masses. Now, the mass functions drop as expected below the half-mode mass. Moreover, this halo selection allows to recover the correct mass function over a wider range of low masses than using the aggressive M lim cut [18] that discards all halos -genuine or otherwise -with mass M < M lim , while still leaving the halo abundance uncorrected between M lim and M hm . Quite remarkably, the corrected mass functions from different mass resolution runs are in excellent agreement with each other. This suggests that the halo selection criterion proposed here can efficiently remove spurious halos (i) independently of the resolution of the simulations, and (ii) independently of the specificities of the cosmological model.
In Fig. 8 we plot the normalized probability density function of the spin parameter for all halos shown in Fig. 4 before and after the cut in η. We see that removing unrelaxed halos from the numerical catalogs of the different models recovers spin distributions which are well approximated by a log-normal and are consistent with each other over the same range of values.
In Fig. 9 we plot the normalized probability density function of the halo shape parameters after the cut in η for the same mass bins as shown in Fig. 5. Again we see that having removed unrelaxed halos gives consistent distributions of the shape parameters at low masses with minimal contribution from objects with extreme values of ellipticity and prolateness.  Fig. 4. Blue triangles and red circles correspond respectively to distributions inferred before and after selecting relaxed halos. The best-fitting log-normal function is superimposed (black dotted). We consider the same mass bins as in Fig. 5.

V. CONCLUSIONS
Unphysical groups of particles arise from the artificial fragmentation of the matter density field in N-body simulations of non-standard DM models characterized by a small scale cut-off in the linear matter power spectrum. These spurious halos contaminate numerical halo catalogs altering the low-mass end of the halo mass function in the range of masses which are most relevant for observational tests of DM scenarios. In the case of Warm Dark Matter models these artifacts manifest as an upturn of the mass function at low masses. However, the absence of an upturn does not imply that the DM models with a softer suppression of power at small scales are exempt from spurious halo contamination, rather they are subdominant.
Here, we have argued that the study of the structural properties of halos is a better proxy to differentiate be-tween artificial group of particles and genuine halos. Using a suite of high-resolution simulations we have shown that spurious halos have systematically larger values of the spin parameter, are less spherical, more elliptical or prolate and strongly deviate from virial equilibrium compared to genuine halos. All these features are highly correlated for spurious halos and we find them even in the case of the LFDM scenario whose mass function does not exhibit any upturn at low masses.
The strong correlation between the spin parameter and the deviation from virial equilibrium suggests that selecting approximately well relaxed halos can remove the bulk of spurious halo contamination. We find that a mildly conservative cut in the virial state parameter allows to recover corrected halo mass function. Most importantly, we show that this approach gives convergent results when applied to halo catalogs computed from N-body simulations with different mass resolution.
The advantage of this approach is twofold. One, it allows to estimate the correct halo abundance over a wider range of masses than a simple mass cut prescription which depends on the resolution of the simulation and the characteristics of the simulated cosmology. Two, as the halo selection is based on a physical criterion it is also applicable to cosmological models where the halo mass function lacks a visible upturn due to the spurious halos being subdominant at low masses.