Gamma ray limits¶
Overview¶
hazma
includes functionality for using existing gamma-ray data to
constrain theories and for projecting the discovery reach of proposed gamma-ray
detectors. For the first case, hazma
defines a container class called
FluxMeasurement
for storing information about gamma-ray datasets, and
Theory
contains a method for using these to set limits. The second case
is also handled by a method in Theory
which takes arguments specifying
various detector and target characteristics.
Limits from existing data¶
-
Theory.
binned_limit
(measurement, n_sigma=2.0)[source]¶ Determines the limit on \(<sigma v>\) from gamma-ray data.
We define a signal to be in conflict with the measured flux for bin \(i\) for an experiment if
\[\Phi_{\chi}^{(i)} > n_{\sigma} \sigma^{(i)} + \Phi^{(i)},\]where \(\Phi_\chi^{(i)}\) is the integrated flux due to DM annihilations for the bin, \(\Phi^{(i)}\) is the measured flux in the bin, \(\sigma^{(i)}\) is size of the upper error bar for the bin and \(n_{\sigma} = 2\) is the significance. The overall limit on \(\langle\sigma v\rangle\) is computed by minimizing over the limits determined for each bin.
Parameters: - measurement (FluxMeasurement) – Information about the flux measurement and target.
- n_sigma (float) – See the notes for this function.
Returns: <sigma v>_tot – Largest allowed thermally averaged total cross section in cm^3 / s
Return type: float
Discovery reach for upcoming detectors¶
-
Theory.
unbinned_limit
(A_eff, energy_res, T_obs, target_params, bg_model, n_sigma=5.0, debug_msgs=False)[source]¶ Computes smallest-detectable value of <sigma v> for given target and experiment parameters.
We define a signal to be detectable if
\[N_S / \sqrt{N_B} \geq n_{\sigma},\]where \(N_S\) and \(N_B\) are the number of signal and background photons in the energy window of interest and \(n_\sigma\) is the significance in number of standard deviations. Note that \(N_S \propto \langle \sigma v \rangle\). While the photon count statistics are properly taken to be Poissonian and using a confidence interval would be more rigorous, this procedure provides a good estimate and is simple to compute. The energy window is chosen to maximize N_S/sqrt(N_B).
Parameters: - A_eff (float -> float) – Effective area of experiment in cm^2 as a function of photon energy.
- energy_res (float -> float) – The detector’s energy resolution (\(\Delta E / E\)) as a function of photon energy in MeV.
- T_obs (float) – Experiment’s observation time in s
- target_params (TargetParams) – Object containing information about the observation target.
- bg_model (BackgroundModel) – Object representing a gamma ray background model.
- n_sigma (float) – Number of standard deviations the signal must be above the background to be considered detectable
- debug_msgs (bool) – If True, the energy window found by the optimizer will be printed.
Returns: <sigma v> – Smallest-detectable thermally averaged total cross section in units of cm^3 / s.
Return type: float
Classes, functions and constants¶
These data, functions and classes are relevant for setting constraints and projecting discovery reach.
-
class
hazma.flux_measurement.
FluxMeasurement
(obs_rf, energy_res, target, power=2)[source]¶ Container for all information about a completed gamma ray analysis.
-
upper_errors
[source]¶ Size of upper error bars on flux measurements (MeV^-1 cm^-2 s^-1 sr^-1).
Type: np.array
-
lower_errors
[source]¶ Size of lower error bars on flux measurements (MeV^-1 cm^-2 s^-1 sr^-1).
Type: np.array
-
energy_res
[source]¶ Function returning energy resolution (Delta E / E) as a function of photon energy.
Type: callable
-
target
[source]¶ Information about the target observed for this measurement.
Type: TargetParams
-
__init__
(obs_rf, energy_res, target, power=2)[source]¶ Constructor.
Parameters: - obs_rf (str) –
Name of file containing observation information. The columns of this file must be:
- Lower bin edge (MeV)
- Upper bin edge (MeV)
- \(E^2 d^2 \Phi/dE d\Omega\) (MeV cm^-2 s^-1 sr^-1)
- Upper error bar (MeV cm^-2 s^-1 sr^-1)
- Lower error bar (MeV cm^-2 s^-1 sr^-1)
Note that the error bar values are their y-coordinates, not their relative distances from the central flux.
- energy_res (callable) – Energy resolution function.
- target (TargetParams) – The target of the analysis
- obs_rf (str) –
-
-
class
hazma.background_model.
BackgroundModel
(e_range, dPhi_dEdOmega)[source]¶ Represents a gamma ray background model, which is required for computing projected limits for planned gamma-ray detectors.
Parameters: - e_range ([float, float]) – Minimum and maximum photon energies for which this model is valid, in MeV.
- dPhi_dEdOmega (np.array) – Background gamma ray flux (MeV^-1 sr^-1 m^-2 s^-1) as a function of photon energy (MeV). This function must be vectorized.
-
dPhi_dEdOmega
(es)[source]¶ Computes this background model’s gamma ray flux.
Parameters: es (float or np.array) – Photon energy/energies at which to compute Returns: dPhi_dEdOmega – Background gamma ray flux, in MeV^-1 sr^-1 m^-2 s^-1. For any energies outside of self.e_range
,np.nan
is returned.Return type: np.array
-
hazma.gamma_ray_parameters.
energy_res_comptel
(e)[source]¶ COMPTEL energy resolution \(\Delta E / E\).
Taken from ch. II, page 11.
-
hazma.gamma_ray_parameters.
A_eff_comptel
= <scipy.interpolate.interpolate.interp1d object>[source]¶ COMPTEL effective area function
-
hazma.gamma_ray_parameters.
comptel_diffuse
= <hazma.flux_measurement.FluxMeasurement object>[source]¶ COMPTEL diffuse gamma-ray flux measurements
-
hazma.gamma_ray_parameters.
energy_res_egret
(e)[source]¶ EGRET’s energy resolution \(\Delta E / E\).
This is the most optimistic value, taken from sec. 4.3.3.
-
hazma.gamma_ray_parameters.
A_eff_egret
= <scipy.interpolate.interpolate.interp1d object>[source]¶ EGRET effective area function
-
hazma.gamma_ray_parameters.
egret_diffuse
= <hazma.flux_measurement.FluxMeasurement object>[source]¶ EGRET diffuse gamma-ray flux measurements
-
hazma.gamma_ray_parameters.
energy_res_fermi
(e)[source]¶ Fermi-LAT’s energy resolution \(\Delta E / E\).
This is the average of the most optimistic normal and 60deg off-axis values from fig. 18.
-
hazma.gamma_ray_parameters.
A_eff_fermi
= <scipy.interpolate.interpolate.interp1d object>[source]¶ Fermi-LAT effective area function
-
hazma.gamma_ray_parameters.
fermi_diffuse
= <hazma.flux_measurement.FluxMeasurement object>[source]¶ Fermi diffuse gamma-ray flux measurements
-
hazma.gamma_ray_parameters.
energy_res_e_astrogam
= <scipy.interpolate.interpolate.interp1d object>[source]¶ e-ASTROGAM energy resolution function. From table 1 of the e-ASTROGAM whitebook.
-
hazma.gamma_ray_parameters.
A_eff_e_astrogam
= <scipy.interpolate.interpolate.interp1d object>[source]¶ e-ASTROGAM effective area function
-
class
hazma.gamma_ray_parameters.
TargetParams
(J, dOmega)[source]¶ Container for information about a target region.
Currently implemented for the Draco dwarf galaxy and \(10^\circ imes 10^\circ\) region around the galactic center, which can be imported using:
from hazma.gamma_ray_parameters import draco_params, gc_target
Parameters: - J (float) – J-factor in MeV^2 cm^-5
- dOmega (float) – Angular size in sr
-
hazma.gamma_ray_parameters.
solid_angle
(l_max, b_min, b_max)[source]¶ Returns solid angle subtended for a rectangular target region centered on the galactic center.
Parameters: - l_max (float) – Maximum value of galactic longitude in deg. Note that \(l\) must lie in the interval \([-180, 180]\).
- b_max (b_min,) – Minimum and maximum values for \(b\) in deg. Note that \(b\) must lie in the interval \([-90, 90]\), with the equator at \(b = 0\).
Returns: Omega – Solid angle subtended by the region in sr.
Return type: float