Skip to main content

Debris disc surface density modeling and Monte Carlo sampling.

Project description

DebrisPy

A Python Package for Computing the Radial Profiles of Surface Density in Debris Discs

Welcome to DebrisPy — a lightweight package designed to compute the azimuthally averaged surface density (ASD) profiles in debris discs using both semi-analytical and Monte Carlo approaches (see full documentation for usage and API reference).

Demo


Table of Contents

  1. Repository Structure
  2. Installation
  3. Dependencies
  4. Documentation
  5. Example Notebooks
  6. Testing

1. Repository Structure

Breakdown of the repository's folder structure and its purpose:

  • debrispy/
    Core package code, including all class implementations.

  • tests/
    Contains a test suite using pytest. See Section 6 for further information.

  • examples/
    Example files (both .py and .ipynb) showcasing how to use the package.

  • docs/
    Contains the full Sphinx-generated documentation (both the source files and built html files). The documentation can easily be accessed online without requiring manual building or download. See Section 4 for viewing instructions.


2. Installation

Important: DebrisPy requires Python 3.8 or higher.

To install the DebrisPy package locally:

  1. Clone the repository from the GitLab directory:
git clone <repository-url>
cd DebrisPy  # Navigate to the parent directory
  1. Install the python package:
pip install . 

3. Dependencies

All required dependencies are automatically installed when installing the package via pip.

Numerical and Scientific Computing

  • numpy: fast array manipulation and vectorised math
  • scipy: numerical integration, special functions, and interpolation
  • fast_histogram: high-performance 1D/2D histogramming
  • adaptive: optional grid refinement and adaptive sampling
  • matplotlib: 1D and 2D surface density plotting
  • tqdm: progress bars for long-running sampling routines
  • joblib: parallel execution for kernel computations

4. Documentation

The documentation contains information on each class within the package, and provides examples on various use cases. This can be accessed online via debrispy.readthedocs.io

The source files for the documentation are also provided in the main repository.


5. Example Notebooks

This repository includes a collection of Jupyter notebooks (found in the notebooks directory) that demonstrate how to use the DebrisPy package in practice. These are organised into two subdirectories:

  • docs_notebooks/ These notebooks form the main section of the documentation. They are well-annotated, with clear, step-by-step examples showing how to initialise and use each of the core classes (e.g., SigmaA, Kernel, ASD, MonteCarlo).We recommend looking through these notebooks before the others, as they provide the most accessible introduction to the package.

  • report_notebooks/ These notebooks were used to generate all figures and results shown in the MPhil report. While not structured as tutorials, they are still lightly commented and provide insight into how the package can be applied in research scenarios, including benchmarking, model comparison, and analysis of specific case studies.


6. Tests

This package includes a set of automated tests using the pytest framework, located in the tests/ directory.

pytest is a lightweight Python framework for writing and running test functions to automatically verify that code behaves as expected.

After installing the package, we recommend running the test suite to ensure that the package has been installed correctly. This can be run from the root directory, by executing:

pytest tests/

For any further questions regarding usage, please see the documentation. Feel free to contact Deniz Akansoy via da619@cam.ac.uk, any feedback would be greately appreciated.

Project details


Download files

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

Source Distribution

debrispy-0.1.0.tar.gz (57.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

debrispy-0.1.0-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

Details for the file debrispy-0.1.0.tar.gz.

File metadata

  • Download URL: debrispy-0.1.0.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for debrispy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 791b7f002478774f0cf3d180d067bd428633affffe9f20a37c775c0ec9f905ec
MD5 d29b0c684f8317148d42bcefcad35599
BLAKE2b-256 01dee1bf57bf5b6440d4c685f8d3d31ae1998c09999309e0e3e4558f8f283e34

See more details on using hashes here.

File details

Details for the file debrispy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: debrispy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for debrispy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 431a907ebffe5ec0201987d9305f6a3b70ad1f12a7a03d40891511951cc427ce
MD5 eb9e3317d0349b1372764d2cccc4cfd9
BLAKE2b-256 dcb8edb04c51dcf5db11fe2efad21aefc3f70558b70637afa360f3eb7fe6837f

See more details on using hashes here.

Supported by

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