Skip to main content

Diffuse boosted dark matter from supernova neutrinos in early Universe

Project description

dukes: DiffUse-boosted darK mattEr by Supernova neutrinos

dukes is a package for evaluating the signatures of diffuse boosted dark matter by supernova neutrinos in the early Universe based on arXiv:24xx.xxxxx. dukes also supports implementation of phenomenlogical-model-dependent differential cross sections between DM-neutrino and DM-electron for calculating BDM signatures (experimental).

Installation

To install, excute the following command on the prompt

$ pip install dukes

and everything should be processed on-the-fly.

Dependency

dukes requires these external packages

  • numpy >= 1.20.0
  • scipy >= 1.10.0
  • vegas >= 6.0.1

where vegas is a the backend engine for evaluating multidimensional integrals based on adaptive Monte Carlo vegas algorithm, see its homepage: https://pypi.org/project/vegas/.

Other packages, e.g. gvar, maybe required by these dependencies during the installation. The versions of these dependencies are not strict, but are recommended to update to the latest ones to avoid incompatibility.

Usage

We briefly summarize the usage in this section and a comprehensive tutorial can be found in the jupyter notebook stored in tutorial/tutorial.ipynb.

To import, do

>>> import dukes

in python terminal and is similar in the jupyter notebook. All module functions named funcname can be called by typing dukes.funcname.

Examples

Boosted dark matter velocity

A boosted dark matter (BDM) with mass $m_\chi$ and kinetic energy $T_\chi$ has the velocity $v_\chi$,

$$ \frac{v_\chi}{c} = \frac{\sqrt{T_\chi(2m_\chi+T_\chi)}}{m_\chi+T_\chi}. $$

Let $T_\chi=$ Tx and $=m_\chi=$ mx, the corresponding function that evaluates $v_\chi/c$ is

>>> Tx,mx = 5,1  # MeV
>>> dukes.vBDM(Tx,mx)
0.9860132971832694

The diffuse BDM flux

The averaged diffuse BDM (DBDM) flux on the Earth is given by

$$ \frac{d\Phi_\chi}{dT_\chi} = \frac{v_\chi}{H_0} \int_0^{z_{\rm max}} \frac{dz}{\varepsilon(z)} \int dM_G \frac{d\Gamma_{{\rm SN}}(z)}{dM_G}\frac{d\bar N_\chi(M_G)}{dT_\chi^\prime}. $$

Same as the above example,

>>> dukes.flux(Tx,mx,usefit=True,nitn=10,neval=50000)
4.422705310516041e-08

as in MeV−1 cm−2 s−1.

Throughout the entire package, we have implemented the differential DM-neutrino scattering cross section in CM frame is isotropic and energy-independent

$$ \frac{d\sigma_{\chi \nu}}{d\Omega_{\rm CM}}=\frac{\sigma_0}{4\pi} $$

where $\sigma_0=10^{-35}$ cm2.

The argument usefit is to turn on/off the fitting function used in obtaining the average supernova position on the galactic plane for galaxy with baryonic mass $M_G$. If usefit=False, the function will call galacticDensityProfile to evaluate the area density for galaxy with arbitrary $M_G$. It requires quadrature integration quad from scipy and the computation time surges accordingly, but the accuracy is improved insignificantly.

The arguments nitn and neval are passed to vegas and determine how many chains of iteration and how many numbers to be evaluated in each chain. Increasing them will improve the accuracy of the results but also cost longer computation time. We relegate the detail to vegas documentation.

Physical constants

We have a class named constant that contains multiple physical constants and conversion factors frequently used in this package. For instance, electron mass

>>> dukes.constant.me
0.511

as in MeV and the speed of light

>>> dukes.constant.c
29980000000.0

as in cm s−1. Conversion factors such as converting kiloparsec to centimeters

>>> dukes.constant.kpc2cm
3.085e21

and year to seconds

>>> dukes.constant.year2Seconds
31560000.0

Scripting

In python script (see subsidiary tests/dukes_example.py), one can write

# dukes_example.py

import sys
import dukes

if __name__ == '__main__':

    Tx = float(sys.argv[1])  # DM kinetic energy, MeV
    mx = float(sys.argv[2])  # DM mass, MeV
    vx = dukes.vBDM(Tx,mx)   # BDM velocity
    
    print(vx)                # Print the BDM velocity

and excute this on the prompt

$ python dukes_example.py 5 1
0.9860132971832694

or whatever style you like!

Misc

Bug report and troubleshooting please contact the author Yen-Hsun Lin via yenhsun@phys.ncku.edu.tw.

Project details


Download files

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

Source Distribution

dukes-1.1.1.tar.gz (715.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dukes-1.1.1-py3-none-any.whl (712.6 kB view details)

Uploaded Python 3

File details

Details for the file dukes-1.1.1.tar.gz.

File metadata

  • Download URL: dukes-1.1.1.tar.gz
  • Upload date:
  • Size: 715.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for dukes-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9c90bae9a198a95368c86339bdcb5574dbfeb435e2f2d9dadbbd72fd28017692
MD5 b31a6f63b1d95510a30f1c08caa9707a
BLAKE2b-256 564b073655dcd3dfe8ffd0350857dab12810b692dcc25fd7da1964c2263c4083

See more details on using hashes here.

File details

Details for the file dukes-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: dukes-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 712.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for dukes-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29168dc20a0280db058d08bca7216f97d06ac2c5bff789fd90fc59b9826223d0
MD5 3cbe03c8f2c5d14b5c6c7852ec1f7d29
BLAKE2b-256 eda8ce486bf2d9048b386884a1fc6971199f325c42294b61c7f8a35de073c023

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page