Skip to main content

Python wrapper for DarkProp

Project description

license Project Status: Active – The project has reached a stable, usable state and is being actively developed.

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

Tip

If there is a network problem during pip install, you can set up a mirror server. For example, using the Tsinghua mirror, add the -i option to the pip install command

$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple darkprop

Install from the source

If the pip installation fails, you can try to build from the source code.

  1. Download the source code from DarkProp's homepage.

  2. 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
    
  3. Build and install into the virtual environment. In the root directory of the source code, execute

    $ python3 -m pip install .
    

Example

Install Jupyter notebook and Matplotlib to run the example.

$ jupyter-notebook example/python/basic-example.ipynb

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, arXiv: 2111.05559

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

darkprop-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

darkprop-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

darkprop-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

darkprop-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

darkprop-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

Supported by

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