DebrisPy
Welcome to DebrisPy — a lightweight Python package designed to compute the azimuthally averaged (radial) profiles of surface density profiles in debris discs.
Installation
- The package can be installed via PyPI directly:
pip install debrispy
- For development, clone the repository and install in editable mode:
git clone https://github.com/DenizAkansoy/DebrisPy.git
cd DebrisPy
pip install -e .
Important: DebrisPy requires Python 3.8 or higher.
Features
DebrisPy provides tools for:
- defining semi-major-axis surface-density profiles;
- specifying unique eccentricity profiles or eccentricity distributions;
- constructing eccentricity kernels for ASD calculations;
- computing azimuthally averaged surface-density profiles;
- validating and visualising results with Monte Carlo sampling;
- using built-in profiles or arbitrary user-defined functions;
- optional adaptive gridding, interpolation, and parallelisation for more demanding calculations.
Important Note: custom functions must be vectorised
User-supplied functions should be vectorised. DebrisPy evaluates many profiles and distributions on NumPy arrays, so scalar Python conditionals such as if/else will usually fail or behave incorrectly.
For example, avoid:
def bad_profile(a):
if a < 50:
return 0.0
return a**-1
Use NumPy-aware operations instead:
import numpy as np
def good_profile(a):
return np.where(a < 50, 0.0, a**-1)
Boolean masks and array arithmetic are also suitable.
Documentation
The full documentation is available at debrispy.readthedocs.io.
The documentation includes worked examples, API references, implementation notes, and notebook-based tutorials.
The documentation source files are also located in:
docs/source/
Repository structure
debrispy/ Core package code
docs/source/ Sphinx documentation source
examples/ Example notebooks and scripts
tests/ Test suite
assets/ README/demo assets
Examples
Example notebooks are provided in the examples/ directory. These demonstrate how to define input profiles, construct eccentricity kernels, compute ASD profiles, and compare semi-analytic calculations with Monte Carlo realisations.
Dependencies
Core dependencies are installed automatically when installing DebrisPy with:
pip install debrispy
These include:
numpyscipymatplotlibfast_histogramadaptivetqdmjoblib
Additional optional dependencies are needed for development, testing, and building the documentation.
For development and testing:
pip install -e ".[dev]"
This installs additional packages such as:
pytestipykernelnotebook
For building the documentation locally:
pip install -e ".[docs]"
This installs additional packages such as:
sphinxsphinx-rtd-thememyst-parsernbsphinx
Testing
To run the test suite, clone the repository and install the optional development dependencies:
git clone https://github.com/DenizAkansoy/DebrisPy.git
cd DebrisPy
pip install -e ".[dev]"
pytest tests/
Acknowledgments
If you use DebrisPy (or parts of its code) in your research, we would greatly appreciate it if you cited the paper introducing the package:
@article{Rafikov2026,
author = {Roman R. Rafikov and Deniz Akansoy and Antranik A. Sefilian},
title = {Debris Disc Substructures Induced by Secular Planetary Perturbations},
journal = {arXiv e-prints},
year = {2026},
eprint = {2607.08750},
archiveprefix = {arXiv},
primaryclass = {astro-ph.EP},
doi = {10.48550/arXiv.2607.08750}
}
Contact
For questions, bug reports, or feedback, please open an issue on GitHub or contact Deniz Akansoy at da619@cam.ac.uk.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file debrispy-0.1.1.tar.gz.
File metadata
- Download URL: debrispy-0.1.1.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7c151e566764a57c93fe2d5e6618ac9bb26155ed4dddc9f049c4f6f2e4bd8c8
|
|
| MD5 |
ba8aa7d5c2fe6838cd4edf4c3e9ca565
|
|
| BLAKE2b-256 |
671601bed48cefa09db904522b229226547ae29f0ba62494e718979706763681
|
Provenance
The following attestation bundles were made for debrispy-0.1.1.tar.gz:
Publisher:
publish.yml on DenizAkansoy/DebrisPy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debrispy-0.1.1.tar.gz -
Subject digest:
e7c151e566764a57c93fe2d5e6618ac9bb26155ed4dddc9f049c4f6f2e4bd8c8 - Sigstore transparency entry: 2183513699
- Sigstore integration time:
-
Permalink:
DenizAkansoy/DebrisPy@46f36fd31e6d7d93f43f025ad69f299b35c537a5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/DenizAkansoy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46f36fd31e6d7d93f43f025ad69f299b35c537a5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file debrispy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: debrispy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 53.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0222caf6f471e260b91947c2171f8881f930c18a99bcac73de49e5c933beff28
|
|
| MD5 |
95c8531b6d7e1b7f96ad12c2a65fc968
|
|
| BLAKE2b-256 |
acd111b9efe492312f6a34199c3a0ecd711ff97b2ff02fe87aac1fe1db587c09
|
Provenance
The following attestation bundles were made for debrispy-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on DenizAkansoy/DebrisPy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debrispy-0.1.1-py3-none-any.whl -
Subject digest:
0222caf6f471e260b91947c2171f8881f930c18a99bcac73de49e5c933beff28 - Sigstore transparency entry: 2183513840
- Sigstore integration time:
-
Permalink:
DenizAkansoy/DebrisPy@46f36fd31e6d7d93f43f025ad69f299b35c537a5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/DenizAkansoy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@46f36fd31e6d7d93f43f025ad69f299b35c537a5 -
Trigger Event:
release
-
Statement type: