is the gamma function. They found $\lambda_0 = 0.04326$ and $\alpha=2.509$ best fit the distribution of halo spins.

Bullock Spin Parameter {#sec:bullock}
----------------------

@bullock_2001 proposed a dimensionless spin parameter of the form: $$\lambda' = \frac{J}{\sqrt{2}MRV},
 \label{eqn:bullock}$$ where $J$ is the angular momentum within a virilized sphere with radius $R$ and mass $M$, and $V$ is the circular velocity at the virial radius ($V^2=GM/R$). They also proposed a parametrisation of the probability density function based on @barnes_1987, $$P(\lambda') = \frac{1}{\lambda' \sqrt{2\pi} \sigma}
\exp \left( - \frac{ \ln^2 (\lambda' / \lambda_0')}{ {2\sigma^2}}  \right).
\label{eqn:bullockfit}$$ They found the best fit for [haloes]{} is given by $\lambda_0' = 0.035$ and $\sigma = 0.5$.

Results {#sec:results}
=======

Note that in this section we will show results for the discrete, normalized derivative of the spin distribution function $\Delta
N(<\log{\lambda})/\Delta\log{\lambda}/N_{tot}$ and $\Delta
N(<\lambda')/\Delta\lambda'/N_{total}$, while the fitted functions are for the continuous probability density function $P(\log\lambda)=dN(<\log{\lambda})/d\log{\lambda}/N_{total}$ and $P(\lambda')=dN(<\lambda')/d\lambda'/N_{total}$, respectively. For Peebles spin, we set the bin width to be $\Delta\log{\lambda}=(\log{\lambda_{max}}-\log{\lambda_{min}})/100$. For Bullock spin, the bin width is $\Delta\lambda'=(\lambda'_{max}-\lambda'_{min})/100$.

Halo finding code, softening, and resolution test {#Ssec:Test}
-------------------------------------------------

In this section, we first test whether simulation data set and the specific choice of substructure finding code will affect the 