diffsph.profiles package

Submodules

diffsph.profiles.analytics module

diffsph.profiles.analytics.cobrA(t, rs, rh)

Brightness H-function for the ‘constant’ top-hat source in the regime-A approximation

Parameters:
  • t\(D\sin(\theta)/r_h\), where \(\theta\) (theta), \(r_h\) (rh) and \(D\) (dist) are defined below

  • theta – angular radius in rad

  • rs – scale radius

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.cobrC(t, rs, rh)

Brightness H-function for the ‘constant’ source in the regime-C approximation

Parameters:
  • t\(D\sin(\theta)/r_h\), where \(\theta\) (theta), \(r_h\) (rh) and \(D\) (dist) are defined below

  • theta – angular radius in rad

  • rs – scale radius

  • rh – diffusion radius parameter

diffsph.profiles.analytics.cofdA(theta, rs, rh, dist)

Flux-density H-function for the ‘constant’ top-hat source in the regime-A approximation

Parameters:
  • theta – angular radius in rad

  • rs – scale radius

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.cofdAmax(rs, rh, dist)

Maximum value for the flux-density H-function for the ‘constant’ top-hat source in the regime-A approximation

Parameters:
  • rs – scale radius

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.cofdC(theta, rs, rh, dist)

Flux-density H-function for the ‘constant’ top-hat source in the regime-C approximation

Parameters:
  • theta – angular radius in rad

  • rs – scale radius

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.cofdCmax(rs, rh, dist)

Maximum value for the flux-density H-function for the ‘constant’ top-hat source in the regime-C approximation

Parameters:
  • rs – scale radius

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.psbrA(theta, rs, rh, dist)

Brigthness H-function for point sources in the regime-A approximation

Parameters:
  • theta – angular radius in rad

  • rs – scale radius

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.psbrC(t, rh)

Brigthness H-function for point sources in the regime-C approximation Variable t is defined as

Parameters:
  • t\(D\sin(\theta)/r_h\), where \(\theta\) (theta), \(r_h\) (rh) and \(D\) (dist) are defined below

  • theta – angular radius in rad

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.psfdC(theta, rh, dist)

Flux-density H-function for point sources in the regime-C approximation

Parameters:
  • theta – angular radius in rad

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.psfdCmax(rh, dist)

Maximum value for the flux-density H-function for point sources in the regime-C approximation

Parameters:
  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.sisbrA(t, sigmav, rh)

Brightness H-function for the singular isothermal source in the regime-A approximation

Parameters:
  • t\(D\sin(\theta)/r_h\), where \(\theta\) (theta), \(r_h\) (rh) and \(D\) (dist) are defined below

  • theta – angular radius in rad

  • sigmav – velocity dispersion parameter

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.analytics.sisbrC(t, sigmav, rh)

Brightness H-function for the singular isothermal source in the regime-C approximation

Parameters:
  • t\(D\sin(\theta)/r_h\), where \(\theta\) (theta), \(r_h\) (rh) and \(D\) (dist) are defined below

  • theta – angular radius in rad

  • sigmav – velocity dispersion parameter

  • rh – diffusion radius parameter

  • dist – distance to the source

diffsph.profiles.hfactors module

diffsph.profiles.hfactors.D_factor(theta, dist, rad_temp, **kwargs)

Generic “D” factor

Parameters:
  • theta – angular distance in rad units

  • dist – distance to earth

  • rad_temp – radial template

Keyword arguments

Parameters:
Returns:

D factor

diffsph.profiles.hfactors.H_brightness(theta, dist, rh, hyp, rad_temp, regime, **kwargs)

Generic emissivity halo/bulge function in the Regime “A”, “B” or “C” approximations

Parameters:
  • theta – angular distance in rad units

  • dist – distance to earth

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • halo_model – DM halo model

  • rad_temp – radial template

  • regime – regime of the approximation. Must be either upper or lower case a, b, c or I/II/III.

Keyword arguments

Parameters:
Returns:

brightness halo/bulge function

diffsph.profiles.hfactors.H_emissivity(r, rh, hyp, rad_temp, regime, **kwargs)

Generic emissivity halo/bulge function in the Regime “A”, “B” or “C” approximations

Parameters:
  • r – galactocentric distance

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • rad_temp – radial template

  • regime – regime of the approximation (upper/lower case a, b, c or I/II/III).

Keyword arguments

Parameters:
Returns:

emissivity halo/bulge function

diffsph.profiles.hfactors.H_fluxdens(theta, dist, rh, hyp, rad_temp, regime, **kwargs)

Generic flux-density halo/bulge function in the Regime “A”, “B” or “C” approximations

Parameters:
  • theta – angular distance in rad units

  • dist – distance to earth

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • halo_model – DM halo model

  • rad_temp – radial template

  • regime – regime of the approximation. Must be either upper or lower case a, b, c or I/II/III.

Keyword arguments

Parameters:
Returns:

flux density halo/bulge function

diffsph.profiles.hfactors.H_fluxdens_approx(theta, dist, rh, hyp, rad_temp, regime, **kwargs)

Generic flux-density halo/bulge function in the Regime “A”, “B” or “C” approximations (alternative formula)

Parameters:
  • theta – angular distance in rad units

  • dist – distance to earth

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • halo_model – DM halo model

  • rad_temp – radial template

  • regime – regime of the approximation. Must be either upper or lower case a, b, c or I/II/III.

Keyword arguments

Parameters:
Returns:

flux density halo/bulge function

diffsph.profiles.hfactors.Hem_A(r, rh, hyp, rad_temp, **kwargs)

Generic emissivity halo/bulge function for Regime A

Parameters:
  • r – galactocentric distance

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • rad_temp – radial template

Keyword arguments

Parameters:
Returns:

emissivity halo/bulge function using the Regime-A approximation

diffsph.profiles.hfactors.Hem_B(r, rh, hyp, rad_temp, **kwargs)

Generic emissivity halo/bulge function for Regime B

Parameters:
  • r – galactocentric distance

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • rad_temp – radial template

Keyword arguments

Parameters:
Returns:

emissivity halo/bulge function using the Regime-B approximation

diffsph.profiles.hfactors.Hem_C(r, rh, hyp, rad_temp, **kwargs)

Generic emissivity halo/bulge function for Regime C

Parameters:
  • r – galactocentric distance

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • rad_temp – radial template

Keyword arguments

Parameters:
Returns:

emissivity halo/bulge function using the Regime-C approximation

diffsph.profiles.hfactors.J_factor(theta, dist, rad_temp, **kwargs)

Generic “J” factor

Parameters:
  • theta – angular distance in rad units

  • dist – distance to earth

  • rad_temp – radial template

Keyword arguments

Parameters:
Returns:

J factor

diffsph.profiles.hfactors.halo_factor(n, rh, hyp, rad_temp, **kwargs)

n-th order halo/bulge factor h_n for a given model (e.g. NFW, Einasto, Plummer, …) Arguments 'n', 'rh', 'hyp' and 'rad_temp' are necessary. Remaining arguments depend on the adopted halo model.

Parameters:
  • n – order of the halo/bulge factor

  • rh – diffusion halo/bulge radius

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic')

  • rad_temp – radial template

Keyword arguments

Parameters:
Returns:

halo/bulge factor

diffsph.profiles.massmodels module

diffsph.profiles.massmodels.D(tharcmin, galaxy, rad_temp, manual=False, **kwargs)

Model-specific D factor in GeV/cm \({}^2\)

Parameters:
  • tharcmin – angular radius in arcmin

  • galaxy (str) – name of the galaxy

  • rad_temp (str) – radial template ('NFW', 'Einasto', etc.)

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

D factor

diffsph.profiles.massmodels.Hbr(tharcmin, galaxy, rad_temp, hyp, ratio, regime='B', manual=False, **kwargs)

Model-specific brightness halo/bulge function in the Regime “A”, “B” or “C” approximations

Parameters:
  • tharcmin – angular radius in arcmin

  • galaxy (str) – name of the galaxy

  • rad_temp (str) – radial template ('NFW', 'Einasto', etc.)

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic'

  • ratio – ratio between the diffusion halo/bulge and the half-light radius (default value = 1)

  • regime – regime of the approximation. Must be either upper or lower case a, b, c or I/II/III.

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

brightness halo/bulge function

diffsph.profiles.massmodels.Hem(r, galaxy, rad_temp, hyp, ratio, regime='B', manual=False, **kwargs)

Model-specific emissivity halo/bulge function in the Regime “A”, “B” or “C” approximations

Parameters:
  • r – galactocentric distance in kpc

  • galaxy (str) – name of the galaxy

  • rad_temp (str) – radial template ('NFW', 'Einasto', etc.)

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic'

  • ratio – ratio between the diffusion halo/bulge and the half-light radius (default value = 1)

  • regime – regime of the approximation. Must be either upper or lower case a, b, c or I/II/III.

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

emissivity halo/bulge function

diffsph.profiles.massmodels.Hfd(tharcmin, galaxy, rad_temp, hyp, ratio, regime='B', manual=False, **kwargs)

Model-specific flux-density halo/bulge function in the Regime “A”, “B” or “C” approximations

Parameters:
  • tharcmin – angular radius in arcmin

  • galaxy (str) – name of the galaxy

  • rad_temp (str) – radial template ('NFW', 'Einasto', etc.)

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic'

  • ratio – ratio between the diffusion halo/bulge and the half-light radius (default value = 1)

  • regime – regime of the approximation. Must be either upper or lower case a, b, c or I/II/III.

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

brightness halo/bulge function

diffsph.profiles.massmodels.J(tharcmin, galaxy, rad_temp, manual=False, **kwargs)

Model-specific J factor in Gev \({}^2\)/cm \({}^5\)

Parameters:
  • tharcmin – angular radius in arcmin

  • galaxy (str) – name of the galaxy

  • rad_temp (str) – radial template ('NFW', 'Einasto', etc.)

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

J factor

diffsph.profiles.massmodels.h(n, galaxy, rad_temp, hyp, ratio, manual=False, **kwargs)

Model-specific n-th halo factor

Parameters:
  • n – order of the halo/bulge factor

  • rh – diffusion halo/bulge radius

  • rad_temp – radial template

  • hyp (str) – hypothesis: 'wimp' (default), 'decay' or 'generic'

  • ratio – ratio between the diffusion halo/bulge and the half-light radius

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

halo factor

diffsph.profiles.massmodels.rho(r, rad_temp, manual=False, **kwargs)

Dark matter density

Parameters:
  • r – galactocentric distance

  • rad_temp – template (‘NFW’, ‘Einasto’, etc.)

  • manual (bool) – manual input of parameter values in rad_temp (default value = 'False')

Keyword arguments

  • manual = 'False'

Parameters:

ref – reference used ('Martinez' or '1309.2641', 'Geringer-Sameth' or '1408.0002', etc.)

  • manual = 'True'

Parameters:
Returns:

dark matter density

diffsph.profiles.templates module

diffsph.profiles.templates.bkrt(r, rs, rhos)

Burkert dark-matter halo profile.

\[\rho(r) = \frac{\rho_s}{(1+r/r_s)(1+r^2/r_s^2)}\]
Parameters:
  • r – main variable (galactocentric distance)

  • rs – scale radius

  • rhos – charactieristic density

Returns:

density at galactocentric distance \(r\)

diffsph.profiles.templates.cnfw(r, rs, rhos, rc)

Cored Navarro/Frenk/White dark-matter halo template.

\[\rho(r) = \frac{\rho_s}{(r/r_s+r_c/r_s)(1+r/r_s)^2}\]
Parameters:
  • r – main variable (galactocentric distance)

  • rs – scale radius

  • rhos – chraracteristic density

  • rc – core radius

Returns:

density at galactocentric distance \(r\)

diffsph.profiles.templates.const(r, rs)

Constant (top-hat) template

\[\rho(r) = \frac3{4\pi r_s^3}\Theta(r_s-r)\]
Parameters:

rs – characteristic radius

Returns:

constant density

diffsph.profiles.templates.enst(r, rs, rhos, alphaE=0.17)

Einasto dark-matter halo profile.

\[\rho(r) = \rho_s\exp\left[-\frac{2}{\alpha_E}\left(\frac{r^{\alpha_E}}{r_s^{\alpha_E}}-1\right)\right]\]
Parameters:
  • r – main variable (galactocentric distance)

  • rs – scale radius

  • rhos – charactieristic density

  • alphaE – power-law slope of the Einasto profile, (default value = 0.17)

Returns:

density at galactocentric distance \(r\)

diffsph.profiles.templates.hdz(r, rs, rhos, alpha, beta, gamma)

Hernquist/Diemand/Zhao dark-matter halo template.

\[\rho(r) = \frac{\rho_s}{(r/r_s)^\gamma(1+(r/r_s)^\alpha)^{\frac{\beta-\gamma}\alpha}}\]

Using default values alpha = 1, beta = 3 and gamma = 1 results in the default NFW halo profile.

Parameters:
  • r – main variable (galactocentric distance)

  • rs – scale radius

  • rhos – chraracteristic density

  • alpha – inner exponent

  • beta – large-r exponent

  • gamma – small-r exponent

Returns:

density at galactocentric distance r

diffsph.profiles.templates.nfw(r, rs, rhos)

Navarro/Frenk/White dark-matter halo template.

\[\rho(r) = \frac{\rho_s}{(r/r_s)(1+r/r_s)^2}\]
Parameters:
  • r – main variable (galactocentric distance)

  • rs – scale radius

  • rhos – chraracteristic density

Returns:

density at galactocentric distance \(r\)

diffsph.profiles.templates.plmm(r, rs)

Plummer template

\[\rho(r) = \frac3{4\pi r_s^3}\frac1{(1+r^2/r_s^2)^{5/2}}\]
Parameters:
  • r – main variable (distance to the center)

  • rs – Plummer radius

  • rhoa – central density

Returns:

density of the Plummer sphere at distance \(r\)

diffsph.profiles.templates.ps(r, rs)

Point source template

\[\rho(r) = \frac1{4\pi r^2}\delta(r)\]
Parameters:
  • r – main variable (galactocentric distance)

  • rs – characteristic radius

Returns:

density at galactocentric distance \(r\)

diffsph.profiles.templates.ps_iso(r, rs, rhos)

Pseudo-isothermal sphere dark-matter halo profile.

\[\rho(r) = \frac{\rho_s}{1+r^2/r_s^2}\]
Parameters:
  • r – main variable (galactocentric distance)

  • rs – scale radius

  • rhos – characteristic density

Returns:

density at galactocentric distance \(r\)

diffsph.profiles.templates.sis(r, sigmav)

Singular isothermal sphere

\[\rho(r) = \frac{\sigma_v^2}{2\pi G r^2} \]
Parameters:
  • r – main variable (galactocentric distance)

  • sigmav – velocity dispersion

Returns:

density at galactocentric distance \(r\)

Module contents