Python wrapper for DarkProp
Project description
Python wrapper of DarkProp, a Monte Carlo simulation code for the propagation of dark matter particles in matter.
Installation
Install using pip
$ pip install --user darkprop
Install from the source
-
Download the source code from DarkProp's homepage.
-
Install dependencies. Eigen 3, GSL, and SWIG are needed to build the Python wrapper. They can be installed, for example
-
Ubuntu >= 20.04
$ sudo apt install g++ swig libeigen3-dev libgsl-dev
-
Fedora
$ sudo dnf install g++ swig eigen3-devel gsl-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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for darkprop-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34878f6acc690b36d04639d7b2a91d01329f0339f01be4645a7d19766d57f729 |
|
MD5 | ad5102773a7d1bba49387c31e039b89e |
|
BLAKE2b-256 | 0f7a21a246397419b1f4a0a74b9d1f6bab301cd30de03dc90ded1cd9dfb67491 |
Hashes for darkprop-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6eba11c4edae8b0e7c6de2f9c7e40858d25165a3849d204304f6ed6fa6367a6e |
|
MD5 | eea2f95e743bb523bddcc582c823905f |
|
BLAKE2b-256 | aff82a5c267321845a5668d1bd88dee95219b96453095cf6ceb438798ac72121 |
Hashes for darkprop-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e6fbf690b1abe2b52a6e52dc5f149d4d96a62f7355acd0264f06807d5615b6f |
|
MD5 | 6d3df0a24402dad763613570c54adf75 |
|
BLAKE2b-256 | 48755d12becf37cdd2c4265bca5250211e9f8685b9d297c1984a306fcd466258 |
Hashes for darkprop-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ea5590181e6af54d48c9b0c8aaf61a24245e4db8b6bb0fbc9b80d1e930bcdc2 |
|
MD5 | 3a7b54c322f45e0811fa2ae6425ab386 |
|
BLAKE2b-256 | be4f00570e0d0c2a34df56c28197380278e5208c1653560542a2cc2608e4943e |
Hashes for darkprop-0.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e71a3c5d4edede28f6ce56d93bb485a66831408bfe5b1aea4c9621b3fb599f62 |
|
MD5 | c85cab7b2f69d4e0bda815ad53433389 |
|
BLAKE2b-256 | 45dbe247d63c45bd2f636a485e2f765a418d748d7a1fe5522b52658c71c5f26e |