Last updated:
0 purchases
darkprop 0.3.0
Python wrapper of DarkProp, a Monte Carlo simulation code for the propagation of dark
matter particles in a medium.
Installation
Install using pip
$ pip install --user darkprop
Install from the source
Download the source code from DarkProp's homepage.
Install dependencies. A C++ compiler supporting C++17 standard is required.
GSL, HDF5, and
spdlog are needed to build the Python wrapper.
They can be installed, for example
Ubuntu >= 22.04
$ sudo apt install g++ libgsl-dev libhdf5-dev libspdlog-dev
Fedora >= 33
$ sudo dnf install g++ python3-devel gsl-devel hdf5-devel spdlog-devel
Then prepare a python virtual environment and activate it.
$ python3 -m venv venv
$ source venv/bin/activate
Build and install into the virtual environment.
In the root directory of the source code, execute
$ python3 -m pip install .
Tip
If there is a network problem during pip install, you can set up a mirror server.
For example, using Tsinghua mirror,
add -i option to pip install command
$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple darkprop
Example
Install Jupyter notebook and Matplotlib
to run the example.
$ jupyter-notebook example/python/basic-example.ipynb
Uninstall
$ pip uninstall darkprop
Citation
If you use darkprop in your publications, please cite the paper
C. Xia, Y.-H. Xu, and Y.-F. Zhou, Production and attenuation of cosmic-ray
boosted dark matter,
JCAP, 2022, 02(02): 028,
arXiv: 2111.05559
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.