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 a medium.

Installation

Install using pip

$ pip install --user darkprop

Install from the source

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

  2. 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
    
  3. 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

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.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.28+ x86-64

darkprop-0.3.0-cp312-cp312-macosx_14_0_arm64.whl (4.4 MB view hashes)

Uploaded CPython 3.12 macOS 14.0+ ARM64

darkprop-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

darkprop-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

darkprop-0.3.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

darkprop-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.28+ 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