Skip to main content

Provides numba framework for topographic analysis within the LSDTopoTools ecosystem. It aims to provdide full python access to the main algorithms of LSDTopoTools while avoiding the neeeds of c++. It does not replace or provide numba portage of the full LSDTopoTools, just the main one for quick use or quick developments

Project description

# lsdnumbatools

Provides numba framework for topographic analysis within the LSDTopoTools ecosystem. It aims to provdide full python access to the main algorithms of LSDTopoTools while avoiding the neeeds of c++. It does not replace or provide numba portage of the full LSDTopoTools, just the main one for quick use or quick developments.

License: Free software: MIT license

## What-Why-How?

Numba is a Just-in-time (JIT) compiler for python code, which means that it translates at runtime some pieces of code into assembly language using LLVM engine. It has the power to make some (straightforward) python functions as performant as C code under few conditions. Although it does not allow as much flexibility and power as C++ does, it is very powerful for function with simple data-structure (numpy arrays). The huge advantage is that it fits in the interpreted python language and allow very quick development/distribution of code without the need of compiling for different platform and making bindings between python and C, making it an ideal tool for (i) testing algorithms before implementing them in heavier languages and (ii) develop a light version of the LSDTopoTools framework usable in full-python when the full stack of LSDTopoTools are not needed.

## Features

So far, I implemented mostly core functions:

  • Computation of D8 neighbors, donors, … and topological order following Braun and Willett 2013 (i.e. stack order)

  • Some stack manipulations (isolating drainage basin, …)

  • Extraction of simple drainage network using area-threshold

  • Calculation of Drainage Area and chi (Perron and Royden 2013)

  • Some drainage divide isolation tools (WIP)

Next steps, unsorted:

  • more stack manipulations, like extracting basins following conditions

  • basic conversions row/col -> X/Y

  • more chi tools and S/A tools

  • Drainage divide ordering for Concavity paper

  • High-level interface

  • xsimlab interface

  • Multiple-flow routines

## Installation

If I start using this package more seriously, I will make a conda-forge package. Otherwise, clone this repository, and install the following dependencies: numba, numpy, matplotlib, pandas and it should do the trick. I recommend using conda as python environment manager.

## Quick Start

As a quick start, I added a jupyter notebook in the notebook folder.

## Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.0.1 (2020-09-07)

  • First release on PyPI.

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

lsdnumbatools-0.0.1.tar.gz (31.0 kB view hashes)

Uploaded Source

Built Distribution

lsdnumbatools-0.0.1-py2.py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 2 Python 3

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