darkprop-0.2.0
توضیحات
Python wrapper for DarkProp
| ویژگی | مقدار |
|---|---|
| سیستم عامل | POSIX :: Linux |
| نام فایل | darkprop-0.2.0 |
| نام | darkprop |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | ['Chen Xia'] |
| ایمیل نگهدارنده | ['xiachen1996@outlook.com'] |
| نویسنده | Chen Xia |
| ایمیل نویسنده | xiachen@itp.ac.cn |
| آدرس صفحه اصلی | http://yfzhou.itp.ac.cn/darkprop |
| آدرس اینترنتی | https://pypi.org/project/darkprop/ |
| مجوز | MIT |
[](https://en.wikipedia.org/wiki/MIT_License)
[](https://www.repostatus.org/#active)
Python wrapper of DarkProp, a Monte Carlo simulation code for the propagation
of dark matter particles in matter.
# Installation
## Install using pip
```bash
$ pip install --user darkprop
```
## Install from the source
1. Download the source code from [DarkProp's homepage](
http://yfzhou.itp.ac.cn/darkprop).
2. Install dependencies. [Eigen 3](https://eigen.tuxfamily.org/),
[GSL](https://www.gnu.org/software/gsl/), and [SWIG](http://swig.org/) are
needed to build the Python wrapper. They can be installed, for example
* Ubuntu >= 20.04
```bash
$ sudo apt install g++ swig libeigen3-dev libgsl-dev
```
* Fedora
```bash
$ sudo dnf install g++ swig eigen3-devel gsl-devel
```
Then prepare a python virtual environment and activate it.
```bash
$ python3 -m venv venv
$ source venv/bin/activate
```
3. Build and install into the virtual environment. In the root directory of the
source code, execute
```bash
$ 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](https://mirrors.tuna.tsinghua.edu.cn/help/pypi/),
add `-i` option to `pip install` command
```bash
$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple darkprop
```
---
# Example
Install [Jupyter notebook](https://jupyter.org/) and
[Matplotlib](https://matplotlib.org/) to run the example.
```bash
$ jupyter-notebook example/python/basic-example.ipynb
```
# Uninstall
```bash
$ 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](https://doi.org/10.1088/1475-7516/2022/02/028),
[arXiv: 2111.05559](https://arxiv.org/abs/2111.05559)
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl darkprop-0.2.0:
pip install darkprop-0.2.0.whl
نصب پکیج tar.gz darkprop-0.2.0:
pip install darkprop-0.2.0.tar.gz