clenspy.protocols.Profile¶
- class clenspy.protocols.Profile(*args, **kwargs)[source]¶
Bases:
ProtocolA spherically symmetric halo profile and its projections.
The halo is fixed in the constructor; the radius is an argument to the method. Every method is vectorised over its radius argument.
Satisfied by clenspy.halo.NfwProfile and clenspy.halo.EinastoProfile. The four projections are related by
\[\bar\Sigma(<R) = \frac{2}{R^2}\int_0^R \Sigma(R')R'\,dR', \qquad \Delta\Sigma(R) = \bar\Sigma(<R) - \Sigma(R),\]but each is declared separately because each has a closed form worth evaluating directly – forming one from the others cancels badly at small \(R/r_s\) (see NfwProfile._gbarNfw).
NOTE: convergence and shear are deliberately not in this contract. They need \(\Sigma_{\rm crit}\), which is a property of the lens-source geometry rather than of the halo, so they belong to the lensing layer. EinastoProfile carries them with a
sigma_crit=1.0default; that is a historical anomaly, not the contract.- __init__(*args, **kwargs)¶
Methods
__init__(*args, **kwargs)deltasigma(R)Excess surface density \(\Delta\Sigma(R)\) [Msun/Mpc^2].
density(r)3D density \(\rho(r)\) [Msun/Mpc^3].
fourier(k)Fourier transform of \(\rho\), \(u(k)\) [dimensionless].
mean_sigma(R)Mean interior surface density \(\bar\Sigma(<R)\) [Msun/Mpc^2].
sigma(R)Projected surface density \(\Sigma(R)\) [Msun/Mpc^2].