Skip to content

Commit 5366a4f

Browse files
authored
Merge pull request #9 from GeoLarryLai/v1.1.1
Full Google Colab support
2 parents b13a021 + 5aadc40 commit 5366a4f

File tree

8 files changed

+821
-384
lines changed

8 files changed

+821
-384
lines changed

Example_pycwtmexhat.ipynb

Lines changed: 118 additions & 25 deletions
Large diffs are not rendered by default.

Example_pyfracd.ipynb

Lines changed: 131 additions & 38 deletions
Large diffs are not rendered by default.

Example_pyrugosity.ipynb

Lines changed: 115 additions & 30 deletions
Large diffs are not rendered by default.

Example_pytpi.ipynb

Lines changed: 113 additions & 25 deletions
Large diffs are not rendered by default.

Landlab_simulation.ipynb

Lines changed: 319 additions & 256 deletions
Large diffs are not rendered by default.

README-pypi.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ from pytopocomplexity import CWTMexHat
3434

3535
The module **pycwtmexhat.py** uses two-dimensional continuous wavelet transform (2D-CWT) with a Mexican Hat wevalet to measure the topographic complexity (i.e., surface roughness) of a land surface from a Digital Elevation Model (DEM). Such method quanitfy the wavelet-based curvature of the surface, which has been proposed to be a effective geomorphic metric for identifying and estimating the ages of historical deep-seated landslide deposits. The method and early version of the code was developed by Dr. Adam M. Booth (Portland State Univeristy) in [2009](https://doi.org/10.1016/j.geomorph.2009.02.027), written in MATLAB (source code available from [Booth's personal website](https://web.pdx.edu/~boothad/tools.html)). This MATLAB code was later revised and adapted by Dr. Sean R. LaHusen (Univeristy of Washington) and Dr. Erich N. Herzig (Univeristy of Washington) in their research ([LaHusen et al., 2020](https://doi.org/10.1126/sciadv.aba6790); [Herzig et al. (2023)](https://doi.org/10.1785/0120230079)). Dr. Larry Syu-Heng Lai (Univeristy of Washington), under the supervision of Dr. Alison R. Duvall (Univeristy of Washington), translated the code into this optimized open-source Python version in 2024.
3636

37-
See [**Example_pycwtmexhat.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pycwtmexhat.ipynb) for detailed explanations and usage instructions.
37+
See [**Example_pycwtmexhat.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pycwtmexhat.ipynb) for detailed explanations and usage instructions.
38+
39+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pycwtmexhat.ipynb)
3840

3941
### 2. Fractal Dimentsion Analysis
4042

@@ -46,6 +48,8 @@ The **pyfracd.py** module calculates local fractal dimensions to assess topograp
4648

4749
See [**Example_pyfracd.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyfracd.ipynb) for detailed explanations and usage instructions.
4850

51+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyfracd.ipynb)
52+
4953
### 3. Rugosity Index Calculation
5054

5155
```python
@@ -56,6 +60,8 @@ The module **pyrugosity.py** measure Rugosity Index of the land surface, which i
5660

5761
See [**Example_pyrugosity.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyrugosity.ipynb) for detailed explanations and usage instructions.
5862

63+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyrugosity.ipynb)
64+
5965
### 4. Terrain Position Index Calculation
6066

6167
```python
@@ -66,6 +72,8 @@ The module **pytpi.py** calculates the Terrain Position Index (TPI) of the land
6672

6773
See [**Example_pytpi.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pytpi.ipynb) for detailed explanations and usage instructions.
6874

75+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pytpi.ipynb)
76+
6977
## Requirements
7078
For **pyTopoComplexity** package"
7179
* Python >= 3.10

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ In this repository, each module has a corresponding example Jupyter Notebook fil
1717

1818
There is also an additional Jupyter Notebook, [**Landlab_simulation.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Landlab_simulation.ipynb), which leverages the power of [Landlab](https://landlab.readthedocs.io/en/latest/index.html) to perform forward simulation of landscape smoothing through non-linear hillslope diffusion process.
1919

20-
## Citation
21-
22-
If you use **pyTopoComplexity** and the associated Jupyter Notebooks in your work, please cite the following paper:
23-
* Lai, L. S.-H., Booth, A. M., Duvall, A. R., and Herzig, E. (In Revision) Short Communication: Multiscale topographic complexity analysis with pyTopoComplexity. Earth Surface Dynamics. https://doi.org/10.5194/egusphere-2024-3415.
24-
2520
## Installation
2621

2722
Users can install **pyTopoComplexity** directly from [PyPI](https://pypi.org/project/pytopocomplexity/) with `pip` command:
@@ -52,6 +47,8 @@ The module **pycwtmexhat.py** uses two-dimensional continuous wavelet transform
5247

5348
See [**Example_pycwtmexhat.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pycwtmexhat.ipynb) for detailed explanations and usage instructions.
5449

50+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pycwtmexhat.ipynb)
51+
5552
<p align="center">
5653
<img src="image/cwtmexhat.png" width="100%" height="100%""/>
5754
</p>
@@ -66,6 +63,9 @@ The **pyfracd.py** module calculates local fractal dimensions to assess topograp
6663

6764
See [**Example_pyfracd.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyfracd.ipynb) for detailed explanations and usage instructions.
6865

66+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyfracd.ipynb)
67+
68+
6969
<p align="center">
7070
<img src="image/fracd.png" width="100%" height="100%""/>
7171
</p>
@@ -80,6 +80,8 @@ The module **pyrugosity.py** measure Rugosity Index of the land surface, which i
8080

8181
See [**Example_pyrugosity.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyrugosity.ipynb) for detailed explanations and usage instructions.
8282

83+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pyrugosity.ipynb)
84+
8385
<p align="center">
8486
<img src="image/rugosity.png" width="100%" height="100%""/>
8587
</p>
@@ -94,16 +96,21 @@ The module **pytpi.py** calculates the Terrain Position Index (TPI) of the land
9496

9597
See [**Example_pytpi.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/Example_pytpi.ipynb) for detailed explanations and usage instructions.
9698

99+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Example_pytpi.ipynb)
100+
97101
<p align="center">
98102
<img src="image/tpi.png" width="100%" height="100%""/>
99103
</p>
100-
```
101104

102105
## Combinding pyTopoComplexity with Landscape Evolution Modeling
103106

104-
The Jupyter Notebook file [**Landlab_simulation.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/example/nonlineardiff_Landlab.ipynb) demonstrates the use of [Landlab](https://landlab.readthedocs.io/en/latest/index.html), an open-source Python framework for simulating landscape evolution and modeling time-dependent changes in topographic complexity driven by hillslope and fluvial processes. It specifically employs two components from **Landlab**: the [`TaylorNonLinearDiffuser`](https://landlab.readthedocs.io/en/latest/generated/api/landlab.components.taylor_nonlinear_hillslope_flux.taylor_nonlinear_hillslope_flux.html#landlab.components.taylor_nonlinear_hillslope_flux.taylor_nonlinear_hillslope_flux.TaylorNonLinearDiffuser) from the [`terrainBento`](https://github.com/TerrainBento/terrainbento) package, developed by [Barnhart et al. (2019)](https://gmd.copernicus.org/articles/12/1267/2019/), which simulates topographic smoothing over time through nonlinear hillslope diffusion processes caused by near-surface soil disturbance and downslope soil creeping ([Roering et al., 1999](https://doi.org/10.1029/1998WR900090)), and the [`StreamPowerEroder`](https://landlab.readthedocs.io/en/latest/generated/api/landlab.components.stream_power.stream_power.html#landlab.components.stream_power.stream_power.StreamPowerEroder), a core component in **Landlab** that simulates topographic dissection through fluvial incision over time, following the method described by [Braun & Willett (2013)](https://doi.org/10.1016/j.geomorph.2012.10.008).
107+
The Jupyter Notebook file [**Landlab_simulation.ipynb**](https://github.com/GeoLarryLai/pyTopoComplexity/blob/main/example/nonlineardiff_Landlab.ipynb) demonstrates the use of [Landlab](https://landlab.readthedocs.io/en/latest/index.html), an open-source Python framework for simulating landscape evolution and modeling time-dependent changes in topographic complexity driven by hillslope and fluvial processes.
108+
109+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GeoLarryLai/pyTopoComplexity/blob/main/Landlab_simulation.ipynb)
110+
111+
This notebook specifically employs two components from **Landlab**: the [`TaylorNonLinearDiffuser`](https://landlab.readthedocs.io/en/latest/generated/api/landlab.components.taylor_nonlinear_hillslope_flux.taylor_nonlinear_hillslope_flux.html#landlab.components.taylor_nonlinear_hillslope_flux.taylor_nonlinear_hillslope_flux.TaylorNonLinearDiffuser) from the [`terrainBento`](https://github.com/TerrainBento/terrainbento) package, developed by [Barnhart et al. (2019)](https://gmd.copernicus.org/articles/12/1267/2019/), which simulates topographic smoothing over time through nonlinear hillslope diffusion processes caused by near-surface soil disturbance and downslope soil creeping ([Roering et al., 1999](https://doi.org/10.1029/1998WR900090)), and the [`StreamPowerEroder`](https://landlab.readthedocs.io/en/latest/generated/api/landlab.components.stream_power.stream_power.html#landlab.components.stream_power.stream_power.StreamPowerEroder), a core component in **Landlab** that simulates topographic dissection through fluvial incision over time, following the method described by [Braun & Willett (2013)](https://doi.org/10.1016/j.geomorph.2012.10.008).
105112

106-
This notebook also includes functions that utilize modules from **pyTopoComplexity** to perform topographic complexity analysis on the simulated landscape from **Landlab** at each modeling timestep. The resulting GeoTIFF rasters, figures, and animations provide users with insights into the time-dependent changes in topographic complexity caused by land-surface processes.
113+
The notebook also includes functions that utilize modules from **pyTopoComplexity** to perform topographic complexity analysis on the simulated landscape from **Landlab** at each modeling timestep. The resulting GeoTIFF rasters, figures, and animations provide users with insights into the time-dependent changes in topographic complexity caused by land-surface processes.
107114

108115
<p align="center">
109116
<img src="image/Landlab_demo.gif" width="100%" height="100%" align="center"/>

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="pytopocomplexity",
8-
version="1.1.0",
8+
version="1.1.1",
99
author="Larry Syu-Heng Lai",
1010
author_email="[email protected]",
1111
description="A package for multiscale topographic complexity analysis",

0 commit comments

Comments
 (0)