JFactory#
- class gammapy.astro.darkmatter.JFactory[source]#
Bases:
objectCompute J-Factor or D-Factor maps.
J-Factors are computed for annihilation and D-Factors for decay. Set the argument
annihilationtoFalseto compute D-Factors. The assumed dark matter profiles will be centered on the center of the map.- Parameters:
Methods Summary
compute_differential_jfactor([ndecade])Compute differential J-Factor.
compute_jfactor([ndecade])Compute astrophysical J-Factor.
Methods Documentation
- compute_differential_jfactor(ndecade=10000.0)[source]#
Compute differential J-Factor.
\[\frac{\mathrm d J_\text{ann}}{\mathrm d \Omega} = \int_{\mathrm{LoS}} \mathrm d l \rho(l)^2\]\[\frac{\mathrm d J_\text{decay}}{\mathrm d \Omega} = \int_{\mathrm{LoS}} \mathrm d l \rho(l)\]- Parameters:
- ndecadefloat, optional
Number of sampling points per decade in radius used for the numerical integration. Default is 1e4.
- Returns:
- jfactor
Quantity Differential j-factor.
- jfactor
Notes
The line-of-sight (LoS) integral should include both the near and far sides of the halo. To account for this, the integration is split into two regions:
\([r_\perp, r_{\max}]\) - from the observer to the source, counted twice to include contributions from both near and far sides.
\([r_{\max}, 4 r_{\max}]\) - from the source to infinity. The upper limit is truncated at \(4 r_{\max}\) because contributions beyond this are negligible.
Hence, the effective integration domain is:
\[2 \times [r_\perp, r_{\max}] \;+\; [r_{\max}, 4 r_{\max}].\]The impact parameter is given by:
\[r_\perp = r_{\max} \sin \theta.\]The LoS integral is converted into radial branches with:
\[\mathrm dl = \frac{r}{\sqrt{r^2 - r_\perp^2}} \, \mathrm dr.\]The apparent singularity at \(r = r_\perp\) is integrable. To avoid evaluating it directly, each radial branch is integrated with the substitution \(r = r_\perp \cosh t\).
- compute_jfactor(ndecade=10000.0)[source]#
Compute astrophysical J-Factor.
\[J(\Delta\Omega) = \int_{\Delta\Omega} \mathrm d \Omega^{\prime} \frac{\mathrm d J}{\mathrm d \Omega^{\prime}}\]- Parameters:
- ndecadefloat, optional
Number of sampling points per decade in radius used for the numerical integration. Default is 1e4.
- Returns:
- jfactor
Quantity The j-factor.
- jfactor
- classmethod __new__(*args, **kwargs)#