Skip to main content

Python package for computing indirect detection constraints on sub-GeV dark matter.

Project description

CircleCI Documentation Status DOI arXiv

Hazma is a tool for studying indirect detection of sub-GeV dark. Its main uses are:

  • Computing gamma-ray and electron/positron spectra from dark matter annihilations;
  • Setting limits on sub-GeV dark matter using existing gamma-ray data;
  • Determining the discovery reach of future gamma-ray detectors;
  • Deriving accurate CMB constraints.

Hazma comes with several sub-GeV dark matter models, for which it provides functions to compute dark matter annihilation cross sections and mediator decay widths. A variety of low-level tools are provided to make it straightforward to define new models.


Hazma can be installed from PyPI using:

pip install hazma

Alternatively, you can download Hazma directly from this page, navigate to the package directory using the command line and run

pip install .


python install

Since Hazma utilizes C to rapidly compute gamma ray, electron and positron spectra, you will need to have the cython package installed.

Another way to run Hazma is by using docker. If you have docker installed on your machine, clone the Hazma repository and in the Hazma directory, run:

docker build --rm -t jupyter/hazma .

This will build the docker image called jupyter/hazma. Then to start a jupyter notebook, run:

docker run -it -p 8888:8888 -v /path/to/hazma/tutorials:/home/jovyan/work --rm --name jupyter jupyter/hazma

This will start a jupyter kernel.

Other information

If you use Hazma in your own research, please cite our paper:

      author         = "Coogan, Adam and Morrison, Logan and Profumo, Stefano",
      title          = "{Hazma: A Python Toolkit for Studying Indirect Detection
                        of Sub-GeV Dark Matter}",
      year           = "2019",
      eprint         = "1907.11846",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph"

Logo design: David Reiman and Adam Coogan; icon from Freepik from

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hazma, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size hazma-1.1-cp36-cp36m-macosx_10_13_x86_64.whl (2.4 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size hazma-1.1-cp37-cp37m-macosx_10_14_x86_64.whl (2.4 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size hazma-1.1-cp37-cp37m-win_amd64.whl (1.2 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size hazma-1.1.tar.gz (1.6 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page