Scarplet
Scarplet: A Python package for topographic template matching and diffusion dating - Published in JOSS (2018)
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 15 DOI reference(s) in README -
✓Academic publication links
Links to: joss.theoj.org -
○Committers with academic emails
-
✓Institutional organization owner
Organization stgl has institutional domain (stgl.stanford.edu) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.8%) to scientific vocabulary
Keywords
Scientific Fields
Repository
Topographic edge detection of fault scarps and other landforms in digital elevation data
Basic Info
- Host: GitHub
- Owner: stgl
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://scarplet.readthedocs.io
- Size: 30.4 MB
Statistics
- Stars: 22
- Watchers: 1
- Forks: 7
- Open Issues: 11
- Releases: 5
Topics
Metadata Files
README.md
scarplet
scarplet is a Python package for applying template matching techniques to digital elevation data, in particular for detecting and measuring the maturity of fault scarps and other landforms [0, 1].
It is intended for earth scientists who want to apply diffusion dating methods to or extract landforms from large datasets. The scarplet API can be used to estimate the height and relative age of a landform or identify DEM pixels based on their fit to a landform template.
It was designed with two main goals:
- Allow contributors to define template functions for their problem area of interest
- Make it straightforward to apply these methods to large datasets by parallelizing/distrbuting computation using multiprocessing, dask, or other tools [2]
Getting started
Installation
scarplet can be installed using conda or pip. It is developed for Python 3.4+ and currently works on Linux and Mac OS X.
It is best to use a virtual environment for the install because the GDAL dependency can be tricky:
bash
conda create -n scarplet_env
conda activate scarplet_env
conda install scarplet -c conda-forge
The main dependencies are numpy, scipy, numexpr, pyfftw (which requires LibFFTW3)
and rasterio/GDAL.
Examples
Example notebooks can be found in the docs folder or website and sample datasets can be loaded using the datasets submodule.
Detecting fault scarps
This example uses a scarp template based on a diffusion model of scarp degradation [0] to identify scarp-like landforms along the San Andreas Fault near Wallace Creek, CA.
```python import numpy as np import scarplet as sl from scarplet.datasets import load_carrizo from scarplet.WindowedTemplate import Scarp
params = {'scale': 100, 'age': 10, 'angmin': -10 * np.pi / 2, 'angmax': 10 * np.pi / 2 }
data = load_carrizo() res = sl.match(data, Scarp, **params)
sl.plot_results(data, res) ```

Extracting confined river channels
To illustrate template function flexibility, this example uses a Channel template similar to the Ricker wavelet [3] to extract part of a channel network. This is example uses a moderate resolution SRTM data tile. In general, for high resolution data like lidar, there are more robust alternatives for channel network extraction or channel head identification [4, 5].
```python import numpy as np import scarplet as sl from scarplet.datasets import load_grandcanyon from scarplet.WindowedTemplate import Channel
params = {'scale': 10, 'age': 0.1, 'angmin': -np.pi / 2, 'angmax': np.pi / 2 }
data = load_grandcanyon() res = sl.match(data, Channel, **params)
sl.plot_results(data, res) ```

There are also example notebooks and an API reference in the documentation.
Documentation
Read the documentation for example use cases, an API reference, and more. They are hosted at scarplet.readthedocs.io.
Contributing
Bug reports
Bug reports are much appreciated. Please open an issue with the bug label,
and provide a minimal example illustrating the problem.
Suggestions
Feel free to suggest new features in an issue with the new-feature label.
Pull requests
Don't hestitate to file an issue; I would be happy to discuss extensions or help to build a new feature.
If you would like to add a feature or fix a bug, please fork the repository, create a feature branch, and submit a PR and reference any relevant issues. There are nice guides to contributing with GitHub here and here. Please include tests where appropriate and check that the test suite passes (a Travis build or pytest scarplet/tests) before submitting.
Support and questions
Please open an issue with your question.
References
[0] Hanks, T.C., 2000. The age of scarplike landforms from diffusion‐equation analysis. Quaternary Geochronology, 4, pp. 313-338. doi
[1] Hilley, G.E., DeLong, S., Prentice, C., Blisniuk, K. and Arrowsmith, J.R., 2010. Morphologic dating of fault scarps using airborne laser swath mapping (ALSM) data. Geophysical Research Letters, 37(4). doi
[2] Sare, R, Hilley, G. E., and DeLong, S. B., 2019, Regional scale detection of fault scarps and other tectonic landforms: Examples from Northern California, Journal of Geophysical Research: Solid Earth. doi
[3] Lashermes, B., Foufoula‐Georgiou, E., and Dietrich, W. E., 2007, Channel network extraction from high resolution topography using wavelets. Geophysical Research Letters, 34(23). doi
[4] Passalacqua, P., Tarolli, P., and Foufoula‐Georgiou, E., 2010, Testing space‐scale methodologies for automatic geomorphic feature extraction from lidar in a complex mountainous landscape. Water Resources Research, 46(11). doi
[5] Clubb, F. J., Mudd, S. M., Milodowski, D. T., Hurst, M. D., and Slater, L. J., 2014, Objective extraction of channel heads from high‐resolution topographic data. Water Resources Research, 50(5). doi
License
This work is licensed under the MIT License (see LICENSE).
Owner
- Name: STGL
- Login: stgl
- Kind: organization
- Website: https://stgl.stanford.edu
- Repositories: 7
- Profile: https://github.com/stgl
Stanford tectonic geomorphology lab
GitHub Events
Total
- Watch event: 3
- Fork event: 1
Last Year
- Watch event: 3
- Fork event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| rmsare | r****e@g****m | 566 |
| Ubuntu | u****u@i****l | 8 |
| Ubuntu | u****u@i****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 66
- Total pull requests: 7
- Average time to close issues: 3 months
- Average time to close pull requests: about 2 hours
- Total issue authors: 4
- Total pull request authors: 2
- Average comments per issue: 0.74
- Average comments per pull request: 0.43
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- rmsare (61)
- mcflugen (3)
- AraJeong (1)
- fclubb (1)
Pull Request Authors
- rmsare (6)
- vickielee333 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- apidoc *
- ipython *
- msmb_theme *
- nbsphinx *
- numpydoc *
- sphinxcontrib.apidoc *
- gdal *
- matplotlib *
- numexpr *
- numpy *
- pyfftw *
- rasterio *
- scipy *
- gdal *
- matplotlib *
- numexpr *
- numpy *
- pyfftw *
- rasterio *
- scipy *