Skip to main content

Enables simple simulation and Bayesian posterior analysis of recoil-event data from dark-matter direct-detection experiments under a wide variety of scattering theories.

Project description


A python package that enables simple simulation and Bayesian posterior analysis
of nuclear-recoil data from dark matter direct detection experiments
for a wide variety of theories of dark matter-nucleon interactions.

``dmdd`` has the following features:

* Calculation of the nuclear-recoil rates for various non-standard momentum-, velocity-, and spin-dependent scattering models.

* Calculation of the appropriate nuclear response functions triggered by the chosen scattering model.

* Inclusion of natural abundances of isotopes for a variety of target elements: Xe, Ge, Ar, F, I, Na.

* Simple simulation of data (where data is a list of nuclear recoil energies, including Poisson noise) under different models.

* Bayesian analysis (parameter estimation and model selection) of data using ``MultiNest``.

All rate and response functions directly implement the calculations of `Anand et al. (2013) <>`_ and `Fitzpatrick et al. (2013) <>`_ (for non-relativistic operators, in ``rate_genNR`` and ``rate_NR``), and `Gresham & Zurek (2014) <>`_ (for UV-motivated scattering models in ``rate_UV``). Simulations follow the prescription from `Gluscevic & Peter (2014) <>`_ and `Gluscevic et al. (2015) <>`_.


All of the package dependencies (listed below) are contained within the `Anaconda python distribution <>`_, except for ``MultiNest`` and ``PyMultinest``.

For simulations, you will need:

* basic python scientific packages (``numpy``, ``scipy``, ``matplotlib``)

* ``cython``

To do posterior analysis, you will also need:

* ``MultiNest``

* ``PyMultiNest``

To install these two, follow the instructions `here <>`_.


Install ``dmdd`` either using pip::

pip install dmdd

or by cloning the repository::

git clone
cd dmdd
python install

Note that if you do not set the ``DMDD_MAIN_PATH`` environment variable, then importing ``dmdd`` will create ``~/.dmdd`` and use that location to store simulations and posterior samples.


For a quick tour of usage, check out the `tutorial notebook <>`_; for more complete documentation, `read the docs <>`_; and for the most important formulas and definitions regarding the ``rate_NR`` and ``rate_genNR`` modules, see also `here <>`_.


This package was originally developed for `Gluscevic et al (2015) <>`_. If you use this code in your research, please cite `this ASCL reference <>`_, and the following publications: `Gluscevic et al (2015) <>`_, `Anand et al. (2013) <>`_, `Fitzpatrick et al. (2013) <>`_, and `Gresham & Zurek (2014) <>`_.

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 dmdd, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size dmdd-0.2.tar.gz (130.7 kB) 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