Python wrapper for DarkProp
Project description
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
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
File details
Details for the file darkprop-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: darkprop-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40e465b7820a4e458c0b50adfde39cc674cb9946e3cc2dd10cf5fc655f08778a |
|
MD5 | 63ad69704f31a40077ccfbfd2de737ec |
|
BLAKE2b-256 | 310b140e3145d5e2848c1e6c09d3378458da4ce8d13fe185fd74e9d99adcd6db |
File details
Details for the file darkprop-0.3.0-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: darkprop-0.3.0-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48ddf305b9e9565e043b955c87b3c9d1cbba499d3768d45fd39d00bd4e059e37 |
|
MD5 | c73de859399dd4c940b5c55abadb7fe0 |
|
BLAKE2b-256 | 8aff8cfb9a7036025653d05aed92324aacc0fb0dcee87882bfd0e229ce247279 |
File details
Details for the file darkprop-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: darkprop-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614274bc6a444da2e45185770d10b411f0a00ce1446b4809063c4bd22880bd7d |
|
MD5 | da19d7180490f48dffeac0648e87eeca |
|
BLAKE2b-256 | 92653b7d186cad051d59187e492574039040dbbe09a0c0c211d4032abb97001b |
File details
Details for the file darkprop-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: darkprop-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4bdc2eb91a6078a84cc3123b429cc384294dc1a79767d8283528272a123dec7 |
|
MD5 | 2f9cab0e51ccfc5336c9b642bcb2c114 |
|
BLAKE2b-256 | fd432ef699be115676c2a7ab1d51b4ba3cd8dabb6bbbd95b95df005668216882 |
File details
Details for the file darkprop-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: darkprop-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d9c65e8c7910cc3a2278238e3a1bccab06c34d48ca6877e5464de7345904c39 |
|
MD5 | fb11136faaaa23ef635d1363ebc766ba |
|
BLAKE2b-256 | a0d1c6381dab82a811be0da89e16c626423ec6fef40259f0fda7a383cbe74e5e |
File details
Details for the file darkprop-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: darkprop-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a664c4552784281e518edbf1e8da6e30fea1e486eda121e5849e093ab098d877 |
|
MD5 | f53a9fe568ea19e2203c1428d903a3fa |
|
BLAKE2b-256 | 2131e9608dc86c63ae930da4eb58d66abc6eb4bdf1c0b4f186a58dc8de4093ab |