lsdviztools3 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. lsdviztools3-0.4.1/.gitignore +69 -0
  2. lsdviztools3-0.4.1/CITATION.cff +83 -0
  3. lsdviztools3-0.4.1/LICENSE +21 -0
  4. lsdviztools3-0.4.1/PKG-INFO +367 -0
  5. lsdviztools3-0.4.1/README.md +324 -0
  6. lsdviztools3-0.4.1/lsdviztools3/__init__.py +12 -0
  7. lsdviztools3-0.4.1/lsdviztools3/_gmt.py +48 -0
  8. lsdviztools3-0.4.1/lsdviztools3/charts/__init__.py +214 -0
  9. lsdviztools3-0.4.1/lsdviztools3/charts/burned_profiles.py +270 -0
  10. lsdviztools3-0.4.1/lsdviztools3/charts/channel_bearings.py +988 -0
  11. lsdviztools3-0.4.1/lsdviztools3/charts/channel_slopes.py +245 -0
  12. lsdviztools3-0.4.1/lsdviztools3/charts/chi.py +501 -0
  13. lsdviztools3-0.4.1/lsdviztools3/charts/circular.py +231 -0
  14. lsdviztools3-0.4.1/lsdviztools3/charts/cosmo_comparison.py +208 -0
  15. lsdviztools3-0.4.1/lsdviztools3/charts/cosmo_transient.py +437 -0
  16. lsdviztools3-0.4.1/lsdviztools3/charts/cosmo_transient_spatial.py +549 -0
  17. lsdviztools3-0.4.1/lsdviztools3/charts/cross_sections.py +1449 -0
  18. lsdviztools3-0.4.1/lsdviztools3/charts/distributions.py +120 -0
  19. lsdviztools3-0.4.1/lsdviztools3/charts/divide_migration.py +398 -0
  20. lsdviztools3-0.4.1/lsdviztools3/charts/erodibility_calibration.py +220 -0
  21. lsdviztools3-0.4.1/lsdviztools3/charts/estar_rstar.py +250 -0
  22. lsdviztools3-0.4.1/lsdviztools3/charts/floodplain_qq.py +91 -0
  23. lsdviztools3-0.4.1/lsdviztools3/charts/gradient_curvature.py +253 -0
  24. lsdviztools3-0.4.1/lsdviztools3/charts/hand.py +939 -0
  25. lsdviztools3-0.4.1/lsdviztools3/charts/hillslope_profiles.py +187 -0
  26. lsdviztools3-0.4.1/lsdviztools3/charts/hillslope_residuals.py +102 -0
  27. lsdviztools3-0.4.1/lsdviztools3/charts/hillslope_transient_residuals.py +87 -0
  28. lsdviztools3-0.4.1/lsdviztools3/charts/hilltop_coupling.py +691 -0
  29. lsdviztools3-0.4.1/lsdviztools3/charts/hydraulic_breaks.py +555 -0
  30. lsdviztools3-0.4.1/lsdviztools3/charts/knickpoints.py +395 -0
  31. lsdviztools3-0.4.1/lsdviztools3/charts/ladder_band_map.py +108 -0
  32. lsdviztools3-0.4.1/lsdviztools3/charts/ladder_density.py +149 -0
  33. lsdviztools3-0.4.1/lsdviztools3/charts/ladder_windows.py +187 -0
  34. lsdviztools3-0.4.1/lsdviztools3/charts/landslides.py +197 -0
  35. lsdviztools3-0.4.1/lsdviztools3/charts/lithology_ksn.py +683 -0
  36. lsdviztools3-0.4.1/lsdviztools3/charts/network_geometry.py +471 -0
  37. lsdviztools3-0.4.1/lsdviztools3/charts/network_maps.py +255 -0
  38. lsdviztools3-0.4.1/lsdviztools3/charts/perimeter_sources.py +379 -0
  39. lsdviztools3-0.4.1/lsdviztools3/charts/ridgeline.py +736 -0
  40. lsdviztools3-0.4.1/lsdviztools3/charts/rose.py +148 -0
  41. lsdviztools3-0.4.1/lsdviztools3/charts/slope_area.py +306 -0
  42. lsdviztools3-0.4.1/lsdviztools3/charts/snapping.py +223 -0
  43. lsdviztools3-0.4.1/lsdviztools3/charts/spectral.py +419 -0
  44. lsdviztools3-0.4.1/lsdviztools3/charts/surface_methods.py +124 -0
  45. lsdviztools3-0.4.1/lsdviztools3/charts/swath.py +99 -0
  46. lsdviztools3-0.4.1/lsdviztools3/charts/training_polygons.py +108 -0
  47. lsdviztools3-0.4.1/lsdviztools3/charts/valley_section_map.py +151 -0
  48. lsdviztools3-0.4.1/lsdviztools3/charts/valley_sections.py +309 -0
  49. lsdviztools3-0.4.1/lsdviztools3/charts/valley_spacing.py +302 -0
  50. lsdviztools3-0.4.1/lsdviztools3/charts/valley_width_network.py +610 -0
  51. lsdviztools3-0.4.1/lsdviztools3/cli/__init__.py +26 -0
  52. lsdviztools3-0.4.1/lsdviztools3/cli/_chi_common.py +74 -0
  53. lsdviztools3-0.4.1/lsdviztools3/cli/_common.py +154 -0
  54. lsdviztools3-0.4.1/lsdviztools3/cli/_ridgeline.py +199 -0
  55. lsdviztools3-0.4.1/lsdviztools3/cli/grab_dem.py +78 -0
  56. lsdviztools3-0.4.1/lsdviztools3/cli/plot_animation.py +82 -0
  57. lsdviztools3-0.4.1/lsdviztools3/cli/plot_basemap.py +86 -0
  58. lsdviztools3-0.4.1/lsdviztools3/cli/plot_basins.py +136 -0
  59. lsdviztools3-0.4.1/lsdviztools3/cli/plot_burned_profiles.py +77 -0
  60. lsdviztools3-0.4.1/lsdviztools3/cli/plot_channel_bearings.py +299 -0
  61. lsdviztools3-0.4.1/lsdviztools3/cli/plot_channel_slopes.py +91 -0
  62. lsdviztools3-0.4.1/lsdviztools3/cli/plot_channels.py +69 -0
  63. lsdviztools3-0.4.1/lsdviztools3/cli/plot_chi.py +112 -0
  64. lsdviztools3-0.4.1/lsdviztools3/cli/plot_chi_cosmo.py +109 -0
  65. lsdviztools3-0.4.1/lsdviztools3/cli/plot_cosmo_basins.py +134 -0
  66. lsdviztools3-0.4.1/lsdviztools3/cli/plot_cosmo_compare.py +81 -0
  67. lsdviztools3-0.4.1/lsdviztools3/cli/plot_cosmo_published.py +64 -0
  68. lsdviztools3-0.4.1/lsdviztools3/cli/plot_cosmo_transient.py +88 -0
  69. lsdviztools3-0.4.1/lsdviztools3/cli/plot_divide_migration.py +137 -0
  70. lsdviztools3-0.4.1/lsdviztools3/cli/plot_drape.py +171 -0
  71. lsdviztools3-0.4.1/lsdviztools3/cli/plot_erodibility_calibration.py +150 -0
  72. lsdviztools3-0.4.1/lsdviztools3/cli/plot_estar_rstar.py +83 -0
  73. lsdviztools3-0.4.1/lsdviztools3/cli/plot_floodplain.py +140 -0
  74. lsdviztools3-0.4.1/lsdviztools3/cli/plot_hillshade.py +69 -0
  75. lsdviztools3-0.4.1/lsdviztools3/cli/plot_hillslope_comparison.py +42 -0
  76. lsdviztools3-0.4.1/lsdviztools3/cli/plot_hilltop_coupling.py +148 -0
  77. lsdviztools3-0.4.1/lsdviztools3/cli/plot_knickpoints.py +140 -0
  78. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ksn_by_lithology.py +117 -0
  79. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ladder_band_map.py +50 -0
  80. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ladder_density.py +64 -0
  81. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ladder_windows.py +67 -0
  82. lsdviztools3-0.4.1/lsdviztools3/cli/plot_lem_ci_animation.py +90 -0
  83. lsdviztools3-0.4.1/lsdviztools3/cli/plot_lem_pulse.py +150 -0
  84. lsdviztools3-0.4.1/lsdviztools3/cli/plot_lithology_map.py +235 -0
  85. lsdviztools3-0.4.1/lsdviztools3/cli/plot_mdd_ridgeline.py +69 -0
  86. lsdviztools3-0.4.1/lsdviztools3/cli/plot_perimeter_sources.py +74 -0
  87. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ridgeline_curvature.py +74 -0
  88. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ridgeline_spacing.py +147 -0
  89. lsdviztools3-0.4.1/lsdviztools3/cli/plot_ridgeline_summary.py +115 -0
  90. lsdviztools3-0.4.1/lsdviztools3/cli/plot_sti.py +237 -0
  91. lsdviztools3-0.4.1/lsdviztools3/cli/plot_surface_methods.py +83 -0
  92. lsdviztools3-0.4.1/lsdviztools3/cli/plot_valley_section_map.py +66 -0
  93. lsdviztools3-0.4.1/lsdviztools3/cli/plot_valley_sections.py +95 -0
  94. lsdviztools3-0.4.1/lsdviztools3/cli/plot_valley_widths.py +131 -0
  95. lsdviztools3-0.4.1/lsdviztools3/cli/run_lsdtt.py +88 -0
  96. lsdviztools3-0.4.1/lsdviztools3/colour_limits.py +64 -0
  97. lsdviztools3-0.4.1/lsdviztools3/download/__init__.py +1 -0
  98. lsdviztools3-0.4.1/lsdviztools3/download/apikey.py +69 -0
  99. lsdviztools3-0.4.1/lsdviztools3/download/ot_scraper.py +167 -0
  100. lsdviztools3-0.4.1/lsdviztools3/driver/__init__.py +19 -0
  101. lsdviztools3-0.4.1/lsdviztools3/driver/config.py +226 -0
  102. lsdviztools3-0.4.1/lsdviztools3/driver/lsdtt_driver.py +123 -0
  103. lsdviztools3-0.4.1/lsdviztools3/frames.py +122 -0
  104. lsdviztools3-0.4.1/lsdviztools3/io/__init__.py +6 -0
  105. lsdviztools3-0.4.1/lsdviztools3/io/channel_bearings.py +442 -0
  106. lsdviztools3-0.4.1/lsdviztools3/io/chi.py +336 -0
  107. lsdviztools3-0.4.1/lsdviztools3/io/coverage.py +118 -0
  108. lsdviztools3-0.4.1/lsdviztools3/io/divide_migration.py +368 -0
  109. lsdviztools3-0.4.1/lsdviztools3/io/erodibility_calibration.py +204 -0
  110. lsdviztools3-0.4.1/lsdviztools3/io/grids.py +40 -0
  111. lsdviztools3-0.4.1/lsdviztools3/io/hilltop_coupling.py +272 -0
  112. lsdviztools3-0.4.1/lsdviztools3/io/lithology.py +696 -0
  113. lsdviztools3-0.4.1/lsdviztools3/io/network_geometry.py +428 -0
  114. lsdviztools3-0.4.1/lsdviztools3/io/raster.py +196 -0
  115. lsdviztools3-0.4.1/lsdviztools3/io/ridgeline.py +528 -0
  116. lsdviztools3-0.4.1/lsdviztools3/io/snapping.py +434 -0
  117. lsdviztools3-0.4.1/lsdviztools3/io/spectral.py +347 -0
  118. lsdviztools3-0.4.1/lsdviztools3/io/swath.py +92 -0
  119. lsdviztools3-0.4.1/lsdviztools3/io/table.py +54 -0
  120. lsdviztools3-0.4.1/lsdviztools3/io/valley_spacing.py +171 -0
  121. lsdviztools3-0.4.1/lsdviztools3/io/vector.py +91 -0
  122. lsdviztools3-0.4.1/lsdviztools3/paths.py +53 -0
  123. lsdviztools3-0.4.1/lsdviztools3/regions.py +155 -0
  124. lsdviztools3-0.4.1/lsdviztools3/render/__init__.py +15 -0
  125. lsdviztools3-0.4.1/lsdviztools3/render/animation.py +349 -0
  126. lsdviztools3-0.4.1/lsdviztools3/render/base.py +199 -0
  127. lsdviztools3-0.4.1/lsdviztools3/render/basemap.py +165 -0
  128. lsdviztools3-0.4.1/lsdviztools3/render/basins.py +112 -0
  129. lsdviztools3-0.4.1/lsdviztools3/render/categorical.py +490 -0
  130. lsdviztools3-0.4.1/lsdviztools3/render/channels.py +360 -0
  131. lsdviztools3-0.4.1/lsdviztools3/render/colormaps.py +144 -0
  132. lsdviztools3-0.4.1/lsdviztools3/render/decorations.py +505 -0
  133. lsdviztools3-0.4.1/lsdviztools3/render/divide_migration.py +188 -0
  134. lsdviztools3-0.4.1/lsdviztools3/render/erodibility_calibration_map.py +193 -0
  135. lsdviztools3-0.4.1/lsdviztools3/render/floodplain.py +176 -0
  136. lsdviztools3-0.4.1/lsdviztools3/render/graticule.py +187 -0
  137. lsdviztools3-0.4.1/lsdviztools3/render/hillshade.py +115 -0
  138. lsdviztools3-0.4.1/lsdviztools3/render/hillslope_comparison_animation.py +352 -0
  139. lsdviztools3-0.4.1/lsdviztools3/render/lem_ci_animation.py +342 -0
  140. lsdviztools3-0.4.1/lsdviztools3/render/lem_pulse.py +522 -0
  141. lsdviztools3-0.4.1/lsdviztools3/render/lithology_colours.py +124 -0
  142. lsdviztools3-0.4.1/lsdviztools3/render/lithology_map.py +668 -0
  143. lsdviztools3-0.4.1/lsdviztools3/render/points.py +149 -0
  144. lsdviztools3-0.4.1/lsdviztools3/render/relief3d.py +152 -0
  145. lsdviztools3-0.4.1/lsdviztools3/render/ridgeline.py +225 -0
  146. lsdviztools3-0.4.1/lsdviztools3/render/sti.py +54 -0
  147. lsdviztools3-0.4.1/lsdviztools3/render/style.py +74 -0
  148. lsdviztools3-0.4.1/lsdviztools3/render/surface_methods.py +184 -0
  149. lsdviztools3-0.4.1/lsdviztools3/workflows.py +2713 -0
  150. lsdviztools3-0.4.1/pyproject.toml +129 -0
  151. lsdviztools3-0.4.1/tests/conftest.py +70 -0
  152. lsdviztools3-0.4.1/tests/test_appearance.py +60 -0
  153. lsdviztools3-0.4.1/tests/test_burned_profiles.py +125 -0
  154. lsdviztools3-0.4.1/tests/test_channel_bearings.py +565 -0
  155. lsdviztools3-0.4.1/tests/test_channel_slopes.py +171 -0
  156. lsdviztools3-0.4.1/tests/test_charts.py +1566 -0
  157. lsdviztools3-0.4.1/tests/test_chi_colour_range.py +146 -0
  158. lsdviztools3-0.4.1/tests/test_chi_tributary_selection.py +182 -0
  159. lsdviztools3-0.4.1/tests/test_cli_smoke.py +484 -0
  160. lsdviztools3-0.4.1/tests/test_divide_migration.py +337 -0
  161. lsdviztools3-0.4.1/tests/test_download_apikey.py +38 -0
  162. lsdviztools3-0.4.1/tests/test_download_ot_scraper.py +20 -0
  163. lsdviztools3-0.4.1/tests/test_driver.py +109 -0
  164. lsdviztools3-0.4.1/tests/test_erodibility_calibration.py +238 -0
  165. lsdviztools3-0.4.1/tests/test_floodplain.py +116 -0
  166. lsdviztools3-0.4.1/tests/test_frames.py +243 -0
  167. lsdviztools3-0.4.1/tests/test_gmt_missing.py +59 -0
  168. lsdviztools3-0.4.1/tests/test_hillshade_convention.py +97 -0
  169. lsdviztools3-0.4.1/tests/test_hillslope_comparison.py +124 -0
  170. lsdviztools3-0.4.1/tests/test_io_raster.py +160 -0
  171. lsdviztools3-0.4.1/tests/test_io_vector.py +53 -0
  172. lsdviztools3-0.4.1/tests/test_knickpoints.py +175 -0
  173. lsdviztools3-0.4.1/tests/test_lem_ci_animation.py +95 -0
  174. lsdviztools3-0.4.1/tests/test_lithology.py +760 -0
  175. lsdviztools3-0.4.1/tests/test_lsdtt3_integration.py +256 -0
  176. lsdviztools3-0.4.1/tests/test_network_geometry.py +314 -0
  177. lsdviztools3-0.4.1/tests/test_paths.py +74 -0
  178. lsdviztools3-0.4.1/tests/test_perimeter_sources.py +123 -0
  179. lsdviztools3-0.4.1/tests/test_regions.py +44 -0
  180. lsdviztools3-0.4.1/tests/test_render_basemap.py +115 -0
  181. lsdviztools3-0.4.1/tests/test_render_relief3d.py +123 -0
  182. lsdviztools3-0.4.1/tests/test_render_smoke.py +480 -0
  183. lsdviztools3-0.4.1/tests/test_ridgeline.py +392 -0
  184. lsdviztools3-0.4.1/tests/test_spectral.py +388 -0
  185. lsdviztools3-0.4.1/tests/test_surface_methods.py +121 -0
  186. lsdviztools3-0.4.1/tests/test_valley_sections.py +52 -0
  187. lsdviztools3-0.4.1/tests/test_valley_width_network.py +201 -0
@@ -0,0 +1,69 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .pytest_cache/
9
+
10
+ # pixi / conda
11
+ .pixi/
12
+
13
+ # Tooling caches
14
+ .mypy_cache/
15
+ .ruff_cache/
16
+ .coverage
17
+ htmlcov/
18
+ .tox/
19
+
20
+ # Notebooks
21
+ .ipynb_checkpoints/
22
+
23
+ # Editor
24
+ .vscode/
25
+ .idea/
26
+ *.swp
27
+ *~
28
+
29
+ # OS cruft
30
+ .DS_Store
31
+ Thumbs.db
32
+
33
+ # Claude Code machine-local settings (a shared settings.json may be committed)
34
+ .claude/settings.local.json
35
+
36
+ # lsdtt3 echoed parameter files (regenerated each run)
37
+ *_ingested_params.param
38
+
39
+ # Secrets - never commit API keys
40
+ *.key
41
+ *api*key*.txt
42
+ ot_api_key*.txt
43
+
44
+ # Rendered output
45
+ *.png
46
+ # ...except images the docs and README use
47
+ !docs/images/*.png
48
+ *.pdf
49
+ *.ps
50
+
51
+ # MkDocs static site output
52
+ site/
53
+
54
+ # Data (large rasters/vectors are not tracked)
55
+ *.tif
56
+ *.tiff
57
+ *.bil
58
+ *.hdr
59
+ *.fgb
60
+ *.gpkg
61
+
62
+ # Downloaded/cached DEMs and demo output (never committed)
63
+ tests/_cache/
64
+ demo_output/
65
+
66
+ # Local, machine-specific files (not for the public repository)
67
+ run_lsdtt3_server_maps.sh
68
+ out/
69
+ .claude/
@@ -0,0 +1,83 @@
1
+ # Citation metadata for lsdviztools3 (Citation File Format,
2
+ # https://citation-file-format.github.io/). GitHub shows it as "Cite this
3
+ # repository"; Zenodo reads it when it archives a release.
4
+ #
5
+ # Deliberately no `version:` or `date-released:`. The version lives in
6
+ # pyproject.toml and lsdviztools3/__init__.py, and a copy here would go stale;
7
+ # Zenodo takes the version and date from the release tag.
8
+ #
9
+ # The DOI below is Zenodo's CONCEPT DOI: it represents all versions and always
10
+ # resolves to the latest. Do not replace it with a single version's DOI (v0.4.0
11
+ # is 10.5281/zenodo.24113500); those go stale at the next release.
12
+ cff-version: 1.2.0
13
+ message: "If you use lsdviztools3 in your research, please cite it as below."
14
+ type: software
15
+ title: "lsdviztools3: visualisation tools for LSDTopoTools3"
16
+ abstract: >-
17
+ lsdviztools3 is a Python package for making publication-ready maps and charts
18
+ from the output of LSDTopoTools3 (lsdtt3) and other geographic data: shaded
19
+ relief, channel networks, basins, chi profiles, swath profiles, valley and
20
+ hillslope analyses, landscape evolution model animations and cosmogenic
21
+ nuclide comparisons. Maps are drawn with PyGMT and x-y charts with
22
+ matplotlib. It also wraps the lsdtt3 command-line tools so analyses can be
23
+ run from Python and notebooks.
24
+ authors:
25
+ - family-names: Mudd
26
+ given-names: Simon M.
27
+ orcid: "https://orcid.org/0000-0002-1357-8501"
28
+ affiliation: "School of GeoSciences, University of Edinburgh, Edinburgh, United Kingdom"
29
+ email: simon.m.mudd@ed.ac.uk
30
+ - family-names: Vervoordeldonk
31
+ given-names: Rutger
32
+ orcid: "https://orcid.org/0000-0001-9680-4094"
33
+ affiliation: "School of GeoSciences, University of Edinburgh, Edinburgh, United Kingdom"
34
+ doi: 10.5281/zenodo.24113499
35
+ identifiers:
36
+ - type: doi
37
+ value: 10.5281/zenodo.24113499
38
+ description: Concept DOI, all versions of lsdviztools3
39
+ repository-code: "https://github.com/LSDtopotools/lsdviztools3"
40
+ url: "https://lsdtopotools.github.io/lsdviztools3/"
41
+ license: MIT
42
+ keywords:
43
+ - geomorphology
44
+ - topographic analysis
45
+ - visualisation
46
+ - PyGMT
47
+ - digital elevation models
48
+ - LSDTopoTools
49
+ references:
50
+ - type: software
51
+ title: "LSDTopoTools3 (lsdtt3): topographic analysis for geomorphology"
52
+ doi: 10.5281/zenodo.24110423
53
+ repository-code: "https://github.com/LSDtopotools/lsdtt3"
54
+ url: "https://lsdtopotools.github.io/lsdtt3/"
55
+ license: AGPL-3.0-or-later
56
+ authors:
57
+ - family-names: Mudd
58
+ given-names: Simon M.
59
+ orcid: "https://orcid.org/0000-0002-1357-8501"
60
+ - family-names: Vervoordeldonk
61
+ given-names: Rutger
62
+ orcid: "https://orcid.org/0000-0001-9680-4094"
63
+ - family-names: Gailleton
64
+ given-names: Boris
65
+ orcid: "https://orcid.org/0000-0001-6518-4304"
66
+ - family-names: Hawksworth
67
+ given-names: Martha E.
68
+ orcid: "https://orcid.org/0009-0003-5182-1466"
69
+ - family-names: Clubb
70
+ given-names: Fiona J.
71
+ orcid: "https://orcid.org/0000-0003-1135-1765"
72
+ - family-names: Grieve
73
+ given-names: Stuart W. D.
74
+ orcid: "https://orcid.org/0000-0003-1893-7363"
75
+ - family-names: Milodowski
76
+ given-names: David T.
77
+ orcid: "https://orcid.org/0000-0002-8419-8506"
78
+ - family-names: Valters
79
+ given-names: Declan
80
+ orcid: "https://orcid.org/0000-0002-4562-3944"
81
+ - family-names: Hurst
82
+ given-names: Martin D.
83
+ orcid: "https://orcid.org/0000-0002-9822-076X"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Simon M. Mudd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,367 @@
1
+ Metadata-Version: 2.5
2
+ Name: lsdviztools3
3
+ Version: 0.4.1
4
+ Summary: PyGMT-based visualisation tools for LSDTopoTools v3 (lsdtt3) output.
5
+ Project-URL: Homepage, https://lsdtopotools.github.io/lsdviztools3/
6
+ Project-URL: Documentation, https://lsdtopotools.github.io/lsdviztools3/
7
+ Project-URL: Repository, https://github.com/LSDtopotools/lsdviztools3
8
+ Project-URL: Issues, https://github.com/LSDtopotools/lsdviztools3/issues
9
+ Project-URL: lsdtt3 documentation, https://lsdtopotools.github.io/lsdtt3/
10
+ Project-URL: lsdtt3 repository, https://github.com/LSDtopotools/lsdtt3
11
+ Author: Rutger Vervoordeldonk
12
+ Author-email: "Simon M. Mudd" <simon.m.mudd@ed.ac.uk>
13
+ License-Expression: MIT
14
+ License-File: LICENSE
15
+ Keywords: dem,geomorphology,gmt,lsdtopotools,pygmt,topography
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Natural Language :: English
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Scientific/Engineering
24
+ Classifier: Topic :: Scientific/Engineering :: GIS
25
+ Classifier: Topic :: Scientific/Engineering :: Visualization
26
+ Requires-Python: >=3.12
27
+ Requires-Dist: geopandas>=1.1
28
+ Requires-Dist: matplotlib>=3.11
29
+ Requires-Dist: numpy>=2.4
30
+ Requires-Dist: pandas>=3.0
31
+ Requires-Dist: pillow>=12.2
32
+ Requires-Dist: pygmt>=0.18
33
+ Requires-Dist: rioxarray>=0.22
34
+ Requires-Dist: xarray>=2026.4
35
+ Provides-Extra: charts
36
+ Provides-Extra: download
37
+ Requires-Dist: planetary-computer>=1.0; extra == 'download'
38
+ Requires-Dist: pystac-client>=0.9; extra == 'download'
39
+ Requires-Dist: requests>=2.34; extra == 'download'
40
+ Provides-Extra: test
41
+ Requires-Dist: pytest>=9.1; extra == 'test'
42
+ Description-Content-Type: text/markdown
43
+
44
+ # lsdviztools3
45
+
46
+ ![Drainage divides of third- and fourth-order basins over shaded relief, drawn with lsdviztools3 from lsdtt3 output](https://raw.githubusercontent.com/LSDtopotools/lsdviztools3/main/docs/images/readme_banner.png)
47
+
48
+ [![Release](https://img.shields.io/github/v/release/LSDtopotools/lsdviztools3)](https://github.com/LSDtopotools/lsdviztools3/releases/latest)
49
+ [![Release build](https://img.shields.io/github/actions/workflow/status/LSDtopotools/lsdviztools3/release.yml?label=release%20build)](https://github.com/LSDtopotools/lsdviztools3/actions/workflows/release.yml)
50
+ [![Docs](https://img.shields.io/badge/docs-lsdtopotools.github.io-blue)](https://lsdtopotools.github.io/lsdviztools3/)
51
+ [![Docs build](https://img.shields.io/github/actions/workflow/status/LSDtopotools/lsdviztools3/docs.yml?label=docs%20build)](https://github.com/LSDtopotools/lsdviztools3/actions/workflows/docs.yml)
52
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/LSDtopotools/lsdviztools3/blob/main/LICENSE)
53
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.24113499.svg)](https://doi.org/10.5281/zenodo.24113499)
54
+
55
+ Welcome to `lsdviztools3`, the visualisation package for [`lsdtt3`](https://github.com/LSDtopotools/lsdtt3) ([documentation](https://lsdtopotools.github.io/lsdtt3/)). `lsdtt3` is a software package for topographic analysis, landscape evolution modelling, and hydrology, which runs in a command line environment, or in python with our python bindings. Outputs from `lsdtt3` can be visualised in any GIS software package, but `lsdviztools3` has been built to:
56
+
57
+ * Enable production of publication-ready figures from `lsdtt3` outputs. It can also work with other standard geographic outputs generated from alternative topographic analysis packages.
58
+ * Provide python based wrappers around `lsdtt3` command line programs so analysis can be run in python notebooks (although this is better suited to the `lsdtt3` python bindings).
59
+
60
+ `lsdviztools3` is a ground-up rewrite of the `lsdviztools` plotting stack around
61
+ [PyGMT](https://www.pygmt.org/) (maps) and matplotlib (x–y charts). It covers
62
+ hillshades, channel networks coloured by log₁₀ k_sn, points size-scaled by
63
+ drainage area, basins, locator basemaps, general multi-layer vector overlays on
64
+ a hillshade (lines/points/polygons), chi profiles (individual + stacked), swath
65
+ profiles, rose diagrams and circular comparison of bearings, and many other
66
+ options.
67
+
68
+ **Full usage guide with examples for every plot (CLI and notebook):
69
+ <https://lsdtopotools.github.io/lsdviztools3/>** (the source is
70
+ [`docs/`](https://github.com/LSDtopotools/lsdviztools3/tree/main/docs)), one page per topic (basic plots, chi analysis,
71
+ channel networks, lithology, valleys, hillslopes, landscape evolution,
72
+ cosmogenic nuclides, spectral analysis) plus a command reference. This README covers install
73
+ and the most basic usage only.
74
+
75
+ ## Design at a glance
76
+
77
+ - **Backend-agnostic IO/data core** (`lsdviztools3.io`): rioxarray/xarray,
78
+ geopandas, pandas. No PyGMT imports here.
79
+ - **Thin PyGMT render layer** (`lsdviztools3.render`): every render function
80
+ returns a `pygmt.Figure` (use `.show()` / `.savefig()`).
81
+ - **Headless CLIs** (`lsdviztools3.cli`): render straight to PNG, suitable for
82
+ WSL2 / headless servers.
83
+
84
+ See [the design page](https://lsdtopotools.github.io/lsdviztools3/design/) for the full design, the data-ingestion mapping,
85
+ the secure key-handling spec, and the design decisions made so far.
86
+
87
+ ## Install
88
+
89
+ `lsdviztools3` is on PyPI, and pip installs it with every Python package it
90
+ needs, including PyGMT and matplotlib, **except GMT itself**. PyGMT is a
91
+ wrapper around the GMT C library (version 6.5 or later), which pip cannot
92
+ install, so install GMT first. The simplest way is a conda-forge environment:
93
+
94
+ ```bash
95
+ conda create -n lsdviz -c conda-forge python=3.12 gmt pygmt
96
+ conda activate lsdviz
97
+ python -m pip install lsdviztools3
98
+ ```
99
+
100
+ GMT can also come from Homebrew (`brew install gmt`) or your system package
101
+ manager, if it is GMT 6.5 or later. Without GMT, `lsdviztools3` still installs
102
+ and its matplotlib charts work, but every map command stops with
103
+ `error: PyGMT is installed but cannot load the GMT library`, followed by
104
+ these instructions.
105
+
106
+ Check that PyGMT finds GMT with
107
+ `python -c "import pygmt; pygmt.show_versions()"`. The optional `download`
108
+ extra (`pip install "lsdviztools3[download]"`) adds the packages for fetching
109
+ DEMs from Planetary Computer.
110
+
111
+ ### From a clone, with pixi
112
+
113
+ For development, the tests and the demos, use a clone of the repository and
114
+ the `pixi` package manager (it mixes conda and PyPI packages). Testing of this
115
+ package and its pixi environment has been done in a WSL2 instance running
116
+ Ubuntu 22.04. pixi works on a server even if you do not have install
117
+ permissions: it only needs a writable file system.
118
+
119
+ #### Installing pixi itself
120
+
121
+ [pixi](https://pixi.sh) is a fast conda/PyPI package manager that handles the
122
+ whole `lsdviztools3` environment for you. Install it once:
123
+
124
+ ```bash
125
+ # Linux / macOS / WSL2
126
+ curl -fsSL https://pixi.sh/install.sh | bash
127
+ ```
128
+
129
+ ```powershell
130
+ # Windows (PowerShell)
131
+ powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"
132
+ ```
133
+
134
+ Restart your shell (or `source ~/.bashrc`) and confirm it is on your `PATH`:
135
+
136
+ ```bash
137
+ pixi --version
138
+ ```
139
+
140
+ If `pixi: command not found`, see the [WSL2 notes](https://github.com/LSDtopotools/lsdviztools3#wsl2-notes-ubuntu-2204-default)
141
+ below for fixing your `PATH`.
142
+
143
+ #### Project setup
144
+
145
+ Once you have cloned `lsdviztools3`, navigate into that directory and run:
146
+
147
+ ```bash
148
+ # one-time install of project env + editable package
149
+ pixi install
150
+ pixi run install
151
+
152
+ # run tests
153
+ pixi run test
154
+
155
+ # run a small keyless demo
156
+ pixi run demo-eigg
157
+ ```
158
+
159
+ The pixi environment includes GMT, so nothing else needs installing.
160
+
161
+ ### A specific release from GitHub
162
+
163
+ Each [GitHub release](https://github.com/LSDtopotools/lsdviztools3/releases/latest) also has the wheel,
164
+ `lsdviztools3-<version>-py3-none-any.whl`, which works on every platform.
165
+ Install it into an environment with GMT, as above, by its address:
166
+
167
+ ```bash
168
+ python -m pip install https://github.com/LSDtopotools/lsdviztools3/releases/download/v0.4.1/lsdviztools3-0.4.1-py3-none-any.whl
169
+ ```
170
+
171
+ Replace `0.4.1` with the version you want (the release page lists the wheel's
172
+ exact address).
173
+
174
+ ## lsdtt3 requirement for driver/workflows
175
+
176
+ The `lsdviztools3` render/download modules run inside this package, but the
177
+ driver/workflow path requires a separate installation of **lsdtt3** executables
178
+ (`lsdtt-raster-preprocessing`, `lsdtt-channel-extraction`, etc.).
179
+
180
+ - If you only use plotting/downloading, you do not need lsdtt3.
181
+ - If you use `lsdviz3-lsdtt` or `lsdviztools3.workflows`, install lsdtt3 first:
182
+ see the [lsdtt3 installation guide](https://lsdtopotools.github.io/lsdtt3/what_is_lsdtt3/install_lsdtt3.html).
183
+
184
+ Point `lsdviztools3` at your lsdtt3 `bin` directory using one of:
185
+
186
+ ```bash
187
+ # one-off per shell
188
+ export LSDTT3_DIR=/path/to/lsdtt3/bin
189
+
190
+ # or persist in lsdviztools3 config
191
+ pixi run lsdviz3-lsdtt --set-lsdtt-dir /path/to/lsdtt3/bin
192
+ ```
193
+
194
+ ## WSL2 notes (Ubuntu 22.04 default)
195
+
196
+ `lsdviztools3` is designed to run headless in WSL2 Linux environments. The
197
+ default/tested setup is **Ubuntu 22.04** using bash.
198
+
199
+ If `pixi` is installed but `pixi` is not found in your shell, add pixi to
200
+ `PATH`:
201
+
202
+ ```bash
203
+ export PATH="$HOME/.pixi/bin:$PATH"
204
+ pixi --version
205
+ ```
206
+
207
+ To make that permanent in Ubuntu 22.04 bash:
208
+
209
+ ```bash
210
+ echo 'export PATH="$HOME/.pixi/bin:$PATH"' >> ~/.bashrc
211
+ source ~/.bashrc
212
+ ```
213
+
214
+ Then use pixi-run commands from the repo root, for example:
215
+
216
+ ```bash
217
+ pixi run test
218
+ pixi run python -m lsdviztools3.cli.plot_hillshade --help
219
+ ```
220
+
221
+ If you need to call pixi without relying on shell startup files, use the
222
+ absolute path:
223
+
224
+ ```bash
225
+ "$HOME/.pixi/bin/pixi" run test
226
+ ```
227
+
228
+ ## Troubleshooting
229
+
230
+ - `pixi: command not found`:
231
+ - Add `~/.pixi/bin` to `PATH` (see WSL2 section), or run
232
+ `"$HOME/.pixi/bin/pixi" ...` directly.
233
+ - `ModuleNotFoundError` for `rioxarray`, `pygmt`, etc.:
234
+ - You are likely running outside the pixi environment. Use `pixi run ...`.
235
+ - `FileNotFoundError` for `lsdtt-*` tools:
236
+ - lsdtt3 is not installed/configured. Set `LSDTT3_DIR` or run
237
+ `pixi run lsdviz3-lsdtt --set-lsdtt-dir /path/to/lsdtt3/bin`.
238
+ - Sea appears coloured (for example red) instead of transparent:
239
+ - Copernicus GLO-30 encodes sea as valid elevation near 0 m, not nodata.
240
+ Use the lsdtt3 preprocessing workflow (`minimum_elevation=0`) or mask sea
241
+ values before rendering.
242
+ - Transparent output looks wrong in a viewer/printer:
243
+ - Save opaque output instead (white background): use CLI flag `--opaque`.
244
+ Example: `pixi run python -m lsdviztools3.cli.plot_hillshade --in dem.tif --out map.png --opaque`.
245
+ - Network tests skip/fail while offline:
246
+ - Some tests download DEM data (Planetary Computer). Re-run when online, or
247
+ filter tests to local-only subsets.
248
+ - Running in WSL2 with GUI concerns:
249
+ - CLI outputs are headless PNG writes; no X display is required.
250
+
251
+ ## Console scripts
252
+
253
+ The package installs 41 `lsdviz3-*` commands, one per kind of figure (for
254
+ example `lsdviz3-hillshade`, `lsdviz3-channels`, `lsdviz3-chi`,
255
+ `lsdviz3-valley-widths`, `lsdviz3-cosmo-basins`), plus `lsdviz3-grabdem` to
256
+ download a DEM and `lsdviz3-lsdtt` to run an lsdtt3 tool. Every command takes
257
+ `--help`. [The command reference](https://lsdtopotools.github.io/lsdviztools3/cli_reference/) lists them all, with
258
+ the module each one runs and its main options.
259
+
260
+ ## Basic usage
261
+
262
+ Download a small DEM and render a hillshade — CLI:
263
+
264
+ ```bash
265
+ # 1) grab a keyless GLO-30 DEM
266
+ pixi run python -m lsdviztools3.cli.grab_dem \
267
+ --bbox -6.20 56.85 -6.06 56.95 --out demo_output/eigg_glo30.tif
268
+
269
+ # 2) shaded-relief PNG
270
+ pixi run python -m lsdviztools3.cli.plot_hillshade \
271
+ --in demo_output/eigg_glo30.tif --out demo_output/eigg_hillshade.png \
272
+ --coordinates local --opaque
273
+ ```
274
+
275
+ …or the same in Python / a notebook:
276
+
277
+ ```python
278
+ from lsdviztools3.io.raster import load_raster
279
+ from lsdviztools3.render.hillshade import render_hillshade
280
+ from lsdviztools3.render.base import save_figure
281
+ from lsdviztools3.render.style import MapStyle
282
+
283
+ style = MapStyle(cmap="gray", transparent=False)
284
+ fig = render_hillshade(load_raster("demo_output/eigg_glo30.tif"),
285
+ coordinates="local", style=style)
286
+ save_figure(fig, "demo_output/eigg_hillshade.png", style=style) # or fig.show() in a notebook
287
+ ```
288
+
289
+ For every other plot — channels coloured by log₁₀ k_sn, points sized by drainage
290
+ area, basins, locator basemaps, chi profiles, swath profiles — and the full list
291
+ of options for each (CLI flags and Python keyword arguments), see
292
+ the guide at **<https://lsdtopotools.github.io/lsdviztools3/>**; [the command reference](https://lsdtopotools.github.io/lsdviztools3/cli_reference/) lists every command.
293
+
294
+ Cosmogenic comparison CLIs:
295
+
296
+ ```bash
297
+ # Sweep-based lsdtt3 vs CRONUS/cronuscalc figures (the scan CSV is generated by
298
+ # lsdtt3's tests/scripts/run_cosmo_single_point_scaling_scan.py; see
299
+ # docs/cosmogenic_nuclides.md)
300
+ pixi run lsdviz3-cosmo-compare \
301
+ --scan-csv scan_out/single_point_scan_comparison.csv \
302
+ --outdir demo_output/cosmo
303
+
304
+ # Dataset summary residual figures from published summaries
305
+ pixi run lsdviz3-cosmo-published \
306
+ --published-dir ../lsdtt3/tests/expected/cosmo/published \
307
+ --datasets dethier2014,clapp2002,dibiase2010 \
308
+ --mode auto \
309
+ --outdir demo_output/cosmo
310
+
311
+ # Standard basin map: join cosmo CSV to basin polygons and color by inferred rate
312
+ # (fails by default if plotted basins are clipped/incomplete)
313
+ pixi run lsdviz3-cosmo-basins \
314
+ --base path/to/run_group_0001_DEM.tif \
315
+ --hillshade path/to/run_group_0001_hs_hillshade.tif \
316
+ --basins path/to/run_group_0001_basin_outlines.fgb \
317
+ --cosmo-csv path/to/run_be10_CN_ERATE.csv \
318
+ --out demo_output/cosmo/basins_erate.png \
319
+ --joined-basins-out demo_output/cosmo/basins_erate.fgb \
320
+ --colorbar
321
+
322
+ # Chi + basin products (one profile PNG per basin + optional ksn-vs-erate)
323
+ pixi run lsdviz3-chi-cosmo \
324
+ --fit-nodes-csv path/to/work/run_chi_fit_nodes_mn_0p45.csv \
325
+ --fit-segments-csv path/to/work/run_chi_fit_segments_mn_0p45.csv \
326
+ --base path/to/work/run_final_DEM.tif \
327
+ --hillshade path/to/work/run_final_hs_hillshade.tif \
328
+ --basins path/to/work/run_chi_basin_polygons.fgb \
329
+ --cosmo-csv path/to/work/run_be10_CN_ERATE.csv \
330
+ --outdir demo_output/chi_cosmo
331
+ ```
332
+
333
+ ## What's implemented
334
+
335
+ Maps (`render.*`, PyGMT): hillshade, channels (incl. colour-by log₁₀ k_sn),
336
+ points (incl. size-by drainage area), basins, raster drapes (incl. binary masks
337
+ and STI), divide migration, orthographic/aerial basemap, 3D perspective relief
338
+ (`render.relief3d`, `grdview`), scale bar + colourbar, and GIF animations of
339
+ `lsdtt-lem` runs (transient, incision pulse, channelization-index ladder) and of
340
+ paired hillslope solvers.
341
+
342
+ Charts (`charts.*`, matplotlib): chi profiles (individual + stacked), swath
343
+ profiles, rose diagrams and circular comparison of bearings, distributions,
344
+ valley floor / HAND, valley cross sections and hydraulic breaks, the
345
+ fluvial-surface ladder, cosmogenic comparison and transient (step-change)
346
+ charts, landslide sample effects, slope–area, gradient–curvature, E*–R*,
347
+ hilltop/channel coupling, hillslope model residuals, divide migration, network
348
+ geometry, synthetic-network and snapping sweeps, and valley spacing.
349
+
350
+ Plus IO (`io.*`), DEM download (`download.*`), the lsdtt3 driver (`driver.*`),
351
+ and chained `workflows`.
352
+ Deferred (raise `NotImplementedError`): `charts.plot_profile`,
353
+ `io.grids.make_hillshade`,
354
+ `render.decorations.add_inset`, `io.vector.to_xy`. The matplotlib chart
355
+ plots need matplotlib, which is a core dependency, so a plain install has it.
356
+
357
+ For a quick cosmogenic end-to-end example, see
358
+ `examples/cosmo_comparison_workflow.py` and
359
+ [the cosmogenic nuclides page](https://lsdtopotools.github.io/lsdviztools3/cosmogenic_nuclides/).
360
+
361
+ For chi + basin summaries, the workflow helpers can now:
362
+ - compute basin-median `k_sn` (+ 25th/75th percentile bounds) from
363
+ `*_chi_fit_nodes_mn_*.csv` + `*_chi_fit_segments_mn_*.csv`,
364
+ - render a basin map colored by median `k_sn`,
365
+ - and, when a cosmo erosion CSV is also supplied, plot basin median `k_sn`
366
+ versus inferred erosion rate with uncertainty bars (chi IQR + cosmo-reported
367
+ erosion-rate errors).