Computes the density profiles of dark matter halos in the case of self-interacting dark matter (SIDM).
Uses the isothermal jeans modeling formalism (see Robertson 2021 for a great overview). Note: This formalism has been shown to work well for the 'core-expansion' phase of SIDM evolution, but likely does not capture the 'core-collapse' phase of SIDM evolution. I use this package for modeling cluster halos where cross sections are tighter constrained and core collapse is ruled out.
Solutions are converted to a sum of Cored Steep Ellipsoid (CSE) profiles, which can be fed to e.g. lenstronomy to give strong lensing observables.
from sidm_halos import SIDMHaloSolution
# Solve for a halo with M200m=5e14 Msun, c200m=6,
# and the crossover radius between NFW and isothermal at 75kpc
soln = SIDMHaloSolution.solve_outside_in(
M=5e14, c=6, r1=75, z=0.3, mdef='200m'
)
# The SIDM cross-section and isothermal velocity
print(soln.cross_section)
print(soln.sigma_0)
rs = np.logspace(-2, 1, 1001)*soln.r_s
density = soln.density_3d(rs)
plt.plot(rs, density, label='SIDM')
plt.plot(rs, soln.outer_nfw.density_3d(rs), label='NFW')
plt.xlabel('r (kpc)')
plt.ylabel('density (Msun kpc-3)')
plt.legend()
plt.loglog()And it gives this plot:
- scipy
- numpy
- astropy
- colossus
- lenstronomy
If you make use if this software, please cite O'Donnell 2025.
