astropaint.profiles package

Submodules

astropaint.profiles.Battaglia16 module

library containing [projected] gas profiles

E. Schaan: Tau profile, from Battaglia 2016 watch typos in paper. This code is correct.

astropaint.profiles.Battaglia16.kSZ_T(R, R_200c, M_200c, v_r, redshift, *, T_cmb=2.7251)

kinetic Sunyaev Zeldovich effect #TODO: add reference

astropaint.profiles.Battaglia16.ne_2D(R, R_200c, M_200c, redshift)
2D physical electron number density profile in 1/(Mpc/h)^3

assuming fully ionized gas and primordial He abundance

Parameters
  • R (arraylike, float) – 2D projected distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.ne_3D(r, R_200c, M_200c, redshift)

3D physical electron number density profile in 1/(Mpc/h)^3 assuming fully ionized gas and primordial He abundance

Parameters
  • r (arraylike, float) – 3D distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.rho_gas_2D(R, R_200c, M_200c, redshift)

2D physical gas density profile in (Msun/h) / (Mpc/h)^3

Parameters
  • R (arraylike, float) – 2D projected distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.rho_gas_2D_interp(R, R_200c, M_200c, redshift)

Interpolated version of rho_gas_2D 2D physical gas density profile in (Msun/h) / (Mpc/h)^3

Parameters
  • R (arraylike, float) – 2D projected distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.rho_gas_3D(r, R_200c, M_200c, redshift)

3D physical gas density profile in (Msun/h) / (Mpc/h)^3

Parameters
  • r (arraylike, float) – 3D distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.tau_2D(R, R_200c, M_200c, redshift)
Thompson scattering optical depth 2D projected profile in 1/(Mpc/h) comoving

ie you get the 2D tau profile by projecting this profile along the physical (not comoving) radial coordinate assuming fully ionized gas and primordial He abundance

Parameters
  • R (arraylike, float) – 2D projected distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.tau_2D_interp(R, R_200c, M_200c, redshift)

Interpolated version of tau_2D: Thompson scattering optical depth 2D projected profile in 1/(Mpc/h) comoving ie you get the 2D tau profile by projecting this profile along the physical (not comoving) radial coordinate assuming fully ionized gas and primordial He abundance

Parameters
  • R (arraylike, float) – 2D projected distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.Battaglia16.tau_3D(r, R_200c, M_200c, redshift)

Thompson scattering optical depth 3D profile in 1/(Mpc/h) comoving ie you get the 2D tau profile by projecting this profile along the physical (not comoving) radial coordinate assuming fully ionized gas and primordial He abundance

Parameters
  • r (arraylike, float) – 3D distance from the center of the halo

  • R_200c (float [Mpc/h]) – comoving radius of the halo

  • M_200c (float [Msun/h]) – mass of the halo

  • redshift – redshift of the halo

astropaint.profiles.NFW module

library containing [projected] halo profiles

astropaint.profiles.NFW.BG(R_vec, c_200c, R_200c, M_200c, theta, phi, v_th, v_ph, *, T_cmb=2.7251)

Birkinshaw-Gull effect aka moving lens aka Rees-Sciama (moving gravitational potential)

astropaint.profiles.NFW.deflection_angle(R, c_200c, R_200c, M_200c, *, suppress=True, suppression_R=8)

calculate the deflection angle of a halo with NFW profile Using Eq 6 in Baxter et al 2015 (1412.7521)

Parameters
  • R – distance from the center of halo [Mpc]

  • c_200c – halo concentration parameter

  • R_200c – halo 200c radius in [Mpc]

  • M_200c – halo 200c mass of halo in M_sun

Returns

Return type

the deflection angle at distance R from the center of halo

astropaint.profiles.NFW.kSZ_T(R, rho_s, R_s, v_r, *, T_cmb=2.7251)

kinetic Sunyaev Zeldovich effect #TODO: add reference

astropaint.profiles.NFW.rho_2D(R, rho_s, R_s)

3D NFW profile intgrated along the line of sight

Returns

surface mass density

Return type

[M_sun/Mpc^2]

astropaint.profiles.NFW.rho_2D_bartlemann(R, rho_s, R_s)

projected NFW mass profile Eq. 7 in Bartlemann 1996: https://arxiv.org/abs/astro-ph/9602053

Returns

surface mass density

Return type

[M_sun/Mpc^2]

astropaint.profiles.NFW.rho_2D_interp(R, rho_s, R_s)

3D NFW profile intgrated along a sampled number of line of sights and then interpolated

Returns

surface mass density

Return type

[M_sun/Mpc^2]

astropaint.profiles.NFW.rho_3D(r, rho_s, r_s)

Calculate the 3D NFW density profile #TODO: add reference Eq.

Parameters
  • r – distance from the center

  • rho_s – density at radius r_s

  • r_s – characterisic radius R_200c/c_200c

Returns

Return type

rho = 4 * rho_s * r_s ** 3 / r / (r + r_s) ** 2

astropaint.profiles.NFW.tau_2D(R, rho_s, R_s)

projected NFW tau profile Eq. 7 in Battaglia 2016 :

Returns

tau

Return type

[NA]

astropaint.profiles.spherical module

library containing simple [projected] spherical halo profiles

astropaint.profiles.spherical.constant_density_2D(R, constant)

return a constant value at every input r :param R: distance from the center :type R: [Mpc] :param constant: multiplicative constant

Returns

Return type

constant

astropaint.profiles.spherical.linear_density_2D(R, intercept, slope)

return a R*constant at every input R :param R: distance from the center :type R: [Mpc] :param intercept: intercept of the line :param slope: slope of the line

Returns

Return type

intercept

astropaint.profiles.spherical.solid_sphere_2D(R, M_200c, R_200c)

projected mass density of uniform sphere :param r: distance from the center :type r: [Mpc] :param M_200c: total mass of the sphere :type M_200c: [M_sun] :param R_200c: total radius (edge) of the sphere :type R_200c: [Mpc]

Returns

Return type

Sigma = M_200c /2/pi * sqrt(R_tot**2 - r**2)/R_tot**3

Module contents