diff --git a/.gitignore b/.gitignore index 2dbee14..0d9b42a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ __pycache__/ *.py[cod] +# iPython checkpoints +**/.ipynb_checkpoints + # Gedit junk *~ diff --git a/README.rst b/README.md similarity index 81% rename from README.rst rename to README.md index 4acebfa..9cfc50b 100644 --- a/README.rst +++ b/README.md @@ -3,15 +3,19 @@ wimprates `https://github.com/JelleAalbers/wimprates` -Differential rates of WIMP-nucleus scattering in the standard halo model +Differential rates of WIMP-nucleus scattering in the standard halo model. Jelle Aalbers, 2018 -Features: +[Please see this simple example for usage.](https://github.com/JelleAalbers/blob/master/notebooks/Example.ipynb) + +Features +-------- - Spin-indendent and spin-dependent DM-nucleus scattering - Bremsstrahlung and elastic NR detection modes -Limitations: +Limitations +----------- - Numeric integration is used to compute some differential rates, even in cases where exact expressions are known / could be derived. - The earth's motion w.r.t. to the sun is not taken into account: no annual modulation for you! - Not all functions are properly vectorized yet diff --git a/notebooks/Example.ipynb b/notebooks/Example.ipynb new file mode 100644 index 0000000..8a09d34 --- /dev/null +++ b/notebooks/Example.ipynb @@ -0,0 +1,148 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "%matplotlib inline\n", + "\n", + "import wimprates\n", + "import numericalunits as nu" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "energies = np.linspace(0.01, 40, 100)\n", + "dr = wimprates.rate_wimp_std(energies, mw=50, sigma_nucleon=1e-45)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(0, 38.047764781135932)" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEaCAYAAAD+E0veAAAABHNCSVQICAgIfAhkiAA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OL3zrgKyRGSimyXWbWKr8yLOIxq7Ap/tvzJj9mdFwYQNVf0Sp7fZ81X1XZxnzX4qIstwHimYoqpf4bSZzxORJUBd19A3AZeLyFLgYr491+DFhcAV7vq+opnHvjaWrYH5tgH/h/PUs/eAr4HCgFleANJp4clfVZ2B8zyEN3Cai6YC97v5F+M0h9V5F+gBvKTW+6XxwHpJNSaERCRZVUvcI4XXgadV9XX3vanAmap6cSPLPoPTBfIrDb0fhGwhXb+JTHakYExo3e2eSF8ObMA5sYyIPILTDHRPE8sWAvfU3bwWTCLyAnA0UB7sdZvIZkcKxhhj6tmRgjHGmHpWFIwxxtSzomCMMaaeFQVjjDH1rCgYY4ypZ0XBGGNMvf8P0tm6Ffvw5I4AAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "plt.plot(energies, dr)\n", + "\n", + "plt.xlabel(\"Recoil energy [keV]\")\n", + "plt.ylabel(\"Rate [events per (keV ton year)]\")\n", + "plt.title(\"$m_\\chi = 50$ GeV/c${}^2$, $\\sigma_\\chi = 10^{-45}$ cm${}^2$\")\n", + "plt.xlim(0, energies.max())\n", + "plt.ylim(0, None)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Help on function rate_wimp_std in module wimprates:\n", + "\n", + "rate_wimp_std(es, mw, sigma_nucleon, **kwargs)\n", + " Differential rate per (ton day keV) of WIMP-nucleus scattering.\n", + " :param es: Energies in keV\n", + " :param mw: WIMP mass in GeV/c^2\n", + " :param sigma_nucleon: WIMP-nucleon cross-section in cm^2\n", + " :returns: numpy array of same length as es\n", + " \n", + " For more information, see documentation of rate_wimp.\n", + "\n" + ] + } + ], + "source": [ + "help(wimprates.rate_wimp_std)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Help on function rate_wimp in module wimprates:\n", + "\n", + "rate_wimp(es, mw, sigma_nucleon, interaction='SI', detection_mechanism='elastic_nr', progress_bar=False, **kwargs)\n", + " Differential rate per unit time, unit detector mass and unit recoil energy of WIMP-nucleus scattering\n", + " Use numericalunits to get variables in/out in the right units.\n", + " \n", + " :param es: Energy of recoil (for elastic_nr) or bremsstrahlung photon (for bremsstrahlung)\n", + " :param mw: Mass of WIMP\n", + " :param sigma_nucleon: WIMP-nucleon cross-section\n", + " :param interaction: string describing DM-nucleus interaction. Options:\n", + " 'SI' for spin-independent scattering, equal coupling to protons and neutrons)\n", + " 'SD_n_xxx' for spin-dependent scattering\n", + " n can be 'n' or 'p' for neutron or proton coupling (at first order)\n", + " x can be 'central', 'up' or 'down' for theoretical uncertainty on structure function\n", + " :param detection_mechanism: Detection mechanism, can be 'elastic_nr' or 'bremsstrahlung'\n", + " :param progress_bar: if True, show a progress bar during evaluation for multiple energies\n", + " :returns: numpy array of same length as es, differential WIMP-nucleus scattering rates\n", + " \n", + " Further kwargs are passed to scipy.integrate.quad numeric integrator (e.g. error tolerance).\n", + "\n" + ] + } + ], + "source": [ + "help(wimprates.rate_wimp)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/notebooks/Spin-dependent.ipynb b/notebooks/Spin-dependent.ipynb index 4d75fe3..6e456b6 100644 --- a/notebooks/Spin-dependent.ipynb +++ b/notebooks/Spin-dependent.ipynb @@ -265,9 +265,9 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [conda env:pax]", + "display_name": "Python 3", "language": "python", - "name": "conda-env-pax-py" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -283,5 +283,5 @@ } }, "nbformat": 4, - "nbformat_minor": 0 + "nbformat_minor": 2 } diff --git a/wimprates.py b/wimprates.py index 1a5285c..b49da13 100644 --- a/wimprates.py +++ b/wimprates.py @@ -346,13 +346,13 @@ def rate_wimp(es, mw, sigma_nucleon, interaction='SI', detection_mechanism='elas :param es: Energy of recoil (for elastic_nr) or bremsstrahlung photon (for bremsstrahlung) :param mw: Mass of WIMP - :param sigma_nucleon: WIMP/nucleon cross-section + :param sigma_nucleon: WIMP-nucleon cross-section :param interaction: string describing DM-nucleus interaction. Options: - 'SI' for spin-independent scattering, equal coupling to protons and neutrons) + 'SI' for spin-independent scattering; equal coupling to protons and neutrons 'SD_n_xxx' for spin-dependent scattering n can be 'n' or 'p' for neutron or proton coupling (at first order) x can be 'central', 'up' or 'down' for theoretical uncertainty on structure function - :param modality: Detection mechanism, can be 'elastic_nr' or 'bremsstrahlung' + :param detection_mechanism: Detection mechanism, can be 'elastic_nr' or 'bremsstrahlung' :param progress_bar: if True, show a progress bar during evaluation for multiple energies :returns: numpy array of same length as es, differential WIMP-nucleus scattering rates @@ -363,3 +363,15 @@ def rate_wimp(es, mw, sigma_nucleon, interaction='SI', detection_mechanism='elas raise NotImplementedError("Unsupported detection mechanism '%s'" % detection_mechanism) return dmechs[detection_mechanism](es, mw=mw, sigma_nucleon=sigma_nucleon, interaction=interaction, progress_bar=progress_bar, **kwargs) + + +def rate_wimp_std(es, mw, sigma_nucleon, **kwargs): + """Differential rate per (ton day keV) of WIMP-nucleus scattering. + :param es: Recoil energies in keV + :param mw: WIMP mass in GeV/c^2 + :param sigma_nucleon: WIMP-nucleon cross-section in cm^2 + :returns: numpy array of same length as es + + For more information, see documentation of rate_wimp. + """ + return rate_wimp(es * nu.keV, mw * nu.GeV/nu.c0**2, sigma_nucleon * nu.cm**2) * (nu.keV * (1000 * nu.kg) * nu.year)