diffsph.spectra package

Submodules

diffsph.spectra.analytics module

diffsph.spectra.analytics.Fav(x)

Synchrotron-power function for randomly-oriented magnetic fields [*].

\[F(x) = x^2 \left(K_{4/3}(x) K_{1/3}(x) - \frac35 x [K_{4/3}^2(x) - K_{1/3}^2(x)]\right)\]
Returns:

Pitch-angle averaged synchrotron function as a function of \(x\)

diffsph.spectra.analytics.M_C(xi, eta, delta)

Master function in the Regime-C limit

\[\mathcal M_C(\xi,\eta,\delta) = \frac{\xi^\delta}{(1-\delta)\eta} F(\xi^2)\]
diffsph.spectra.analytics.M_i(xi, eta, delta)

Master function in the large \(\eta\) limit

\[\mathcal M_i(\xi,\eta,\delta) = \frac{\Gamma^2(1/3)\eta^{-\frac{5}{3(1-\delta)}}}{5\sqrt[3]{2}(1-\delta)}\Gamma\left(\frac{5}{3(1-\delta)},\eta\, \xi^{1 - \delta}\right)\exp\left(\eta\, \xi^{1-\delta}\right)\]
diffsph.spectra.analytics.M_raw(xi, eta, delta)

“Raw” master function

\[\mathcal M(\xi,\eta,\delta) = \int_\xi^\infty dx F(x^2)\exp\left(-\eta\,[x^{1-\delta}-\xi^{1-\delta}]\right)\]
Returns:

above integral

diffsph.spectra.analytics.anltc_Mst(xi, eta, delta)

Master function

\[\mathcal M(\xi,\eta,\delta) = \int_\xi^\infty dx F(x^2)\exp\left(-\eta\,[x^{1-\delta}-\xi^{1-\delta}]\right)\]

Note

Function evaluates the above integral only for those values where no numerical errors are present. Otherwise, it uses the approximate formulas diffsph.spectra.analytics.M_C() or diffsph.spectra.analytics.M_i()

diffsph.spectra.analytics.btot(E, B)

Total energy loss function in GeV/s

Parameters:
  • E – cosmic-ray energy in GeV

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

Returns:

energy-loss rate in GeV/s

diffsph.spectra.analytics.lam(E, B, D0, delta=0.3333333333333333)

Syrovatskii variable in kpc2

Parameters:
  • E – cosmic-ray energy in GeV

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

  • D0 – magnitude of the diffusion coefficient for a 1 GeV CRE in cm2/s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy (default value = 1/3)

Returns:

Syrovatskii variable in kpc2

diffsph.spectra.synchrotron module

diffsph.spectra.synchrotron.Enu(B, nu)

Typical particle energy in GeV for synchrotron radiation at the frequency nu in GHz and for a magnetic field B in \(\mu\)G

Parameters:
  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

  • nu – frequency in GHz

Returns:

Particle energy in GeV.

diffsph.spectra.synchrotron.Mst(xi, eta, delta)

Interpolation function for the kernel function \(\hat{\mathcal M}(\xi,\eta,\delta)\)

Parameters:
  • xi\(\xi\)

  • eta\(\eta\)

  • delta\(\delta\)

Returns:

Spectral-function kernel (as an interpolation function)

diffsph.spectra.synchrotron.Mst_DM(xi, eta, m, delta, channel)

Master function for dark-matter hypotheses

Parameters:
  • xi\(\xi\)

  • eta\(\eta\)

  • delta\(\delta\)

  • m – WIMP mass in GeV

  • channel – annihilation/decay channel

Returns:

Master function (as an interpolation function) for DM hypotheses

diffsph.spectra.synchrotron.Mst_pw(eta, Gamma, delta)

Master function for the generic power-law hypothesis

Parameters:
  • eta\(\eta\)

  • Gamma\(\Gamma\)

  • delta\(\delta\)

Returns:

Master function (as an interpolation function) for the generic power-law hypothesis

diffsph.spectra.synchrotron.X(nu, tau, delta, B, hyp, **kwargs)

Spectral function in erg/GHz for all hypotheses built in diffsph

Parameters:
  • nu – frequency in GHz

  • tau – diffusion time-scale parameter for a 1 GeV CRE in s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

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


Keyword arguments:


  • If hyp = 'wimp' or 'decay'

Parameters:
  • mchi – mass of the DM particle in GeV/\(c^2\)

  • channel (str) – annihilation/decay channel: \(b\bar b\) ('bb'), \(\mu^+ \mu^-\) ('mumu'), \(W^+ W^-\) ('WW'), etc.

  • If hyp = 'generic'

Parameters:

Gamma – power-law exponent of the generic CRE source (\(1.1 < \Gamma < 3\))


Returns:

spectral function in erg/GHz

diffsph.spectra.synchrotron.X_DM(k, mchi, channel, nu, tau, delta, B)

Spectral function in erg/GHz for all DM hypotheses built in diffsph

Parameters:
  • k – hypothesis index (k=1 for decay and k=2 for annihilation)

  • mchi – mass of the DM particle in GeV/\(c^2\)

  • channel – annihilation/decay channel: \(b\bar b\) ('bb'), \(\mu^+ \mu^-\) ('mumu'), \(W^+ W^-\) ('WW'), etc.

  • nu – frequency in GHz

  • tau – diffusion time-scale parameter for a 1 GeV CRE in s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

Returns:

spectral function in erg/GHz

diffsph.spectra.synchrotron.X_gen(Emin, Emax, S_func, nu, tau, delta, B)

Spectral function in erg/GHz for generic CRE sources

\[X_\text{gen}(\nu) = \int_{E_m}^{E_M}dE'\hat X(\nu, E')S(E')\]
Parameters:
  • Emin – low-E cutoff energy in GeV of the CRE source 'S_func'

  • Emax – high-E cutoff energy in GeV of the CRE source 'S_func'

  • S_func – CRE source function

  • nu – frequency in GHz

  • tau – diffusion time-scale parameter for a 1 GeV CRE in s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

Returns:

spectral function in erg/GHz

diffsph.spectra.synchrotron.X_pw(Gamma, nu, tau, delta, B)

Spectral function in erg/GHz for the generic power-law hypothesis

Parameters:
  • Gamma – power-law exponent of the generic CRE source (\(1.1 < \Gamma < 3\))

  • nu – frequency in GHz

  • tau – diffusion time-scale parameter for a 1 GeV CRE in s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

Returns:

spectral function in erg/GHz

diffsph.spectra.synchrotron.eta(E, B, tau, delta)

\(\eta\) variable as a function of the CRE’s energy, magnetic field, tau and delta parameters

Parameters:
  • E – CRE energy in GeV

  • B – magnetic field strength in µG

  • tau – diffusion time-scale parameter for a 1 GeV CRE in s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy

Returns:

\(\eta\) variable

diffsph.spectra.synchrotron.htX(E, nu, tau, delta, B, fast_comp=True)

Spectral function kernel in erg/GHz \(\hat X\)

Parameters:
  • E – CRE energy in GeV

  • nu – frequency in GHz

  • tau – diffusion time-scale parameter for a 1 GeV CRE in s

  • delta – power-law exponent of the diffusion coefficient as a function of the CRE’s energy

  • B – magnitude of the magnetic field’s smooth component in \(\mu\)G

  • fast_comp (bool) – if 'True', employs the interpolating method (default value = 'True')

Returns:

spectral kernel in erg/GHz

diffsph.spectra.synchrotron.lMst(Lxi, Leta, delta)

Interpolation function for (kernel) \(\log(\hat{\mathcal M})\)

Parameters:
  • Lxi\(\log(\xi)\)

  • Leta\(\log(\eta)\)

  • delta\(\delta\)

Returns:

\(\log(\hat{\mathcal M})\) as a function of \(\log(\xi)\), \(\log(\eta)\) and \(\delta\)

diffsph.spectra.synchrotron.lMst_DM(Lxi, Leta, Lm, delta, channel)

Interpolation function \(\log(\mathcal M)\) for DM hypotheses

Parameters:
  • Lxi\(\log(\xi)\)

  • Leta\(\log(\eta)\)

  • Lm\(\log(m/\text{GeV})\) (\(m\) is the WIMP mass)

  • delta\(\delta\)

  • channel – annihilation/decay channel

Returns:

\(\log(\mathcal M)\) as a function of \(\log(\xi)\), \(\log(\eta)\), \(\log(m)\) and \(\delta\)

diffsph.spectra.synchrotron.lMst_pw(Leta, Gamma, delta)

Interpolation function \(\log(\mathcal M)\) for the gereric power-law hypothesis

Parameters:
  • Leta\(\log(\eta)\)

  • Gamma\(\Gamma\)

  • delta\(\delta\)

Returns:

\(\log(\mathcal M_\text{gen})\) as a function of \(\log(\eta)\), \(\Gamma\) and \(\delta\)

Module contents