asp-plot 1.2.0__tar.gz → 1.2.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.
- {asp_plot-1.2.0 → asp_plot-1.2.1}/CHANGELOG.md +11 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/PKG-INFO +2 -1
- {asp_plot-1.2.0 → asp_plot-1.2.1}/README.md +1 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/stereo.py +65 -34
- asp_plot-1.2.0/notebooks/LRO_NAC/lunar_recon_orbiter_example_1.ipynb → asp_plot-1.2.1/notebooks/LRO_NAC/lunar_recon_orbiter.ipynb +1 -1
- asp_plot-1.2.1/notebooks/Mars_MOC/mars_orbital_camera.ipynb +459 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/csm_camera_plots.ipynb +6 -6
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/stereo_plots.ipynb +1 -1
- {asp_plot-1.2.0 → asp_plot-1.2.1}/pyproject.toml +1 -1
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_stereo.py +13 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/.flake8 +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/.github/workflows/release.yml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/.github/workflows/run-tests.yml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/.gitignore +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/.pre-commit-config.yaml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/LICENSE +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/__init__.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/alignment.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/altimetry.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/bundle_adjust.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/cli/__init__.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/cli/asp_plot.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/cli/csm_camera_plot.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/cli/stereo_geom.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/csm_camera.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/processing_parameters.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/scenes.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/stereo_geometry.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/stereopair_metadata_parser.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/asp_plot/utils.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/environment.yml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/bundle_adjust_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/icesat2_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/processing_parameters.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/scene_geometry_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/notebooks/WorldView/scene_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/asp_plot_util.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/bundle_adjust_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/bundle_adjust_plots_BP_tmp.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/corr_and_dem_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/corr_and_dem_plots_DS.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/disparity_plot.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/gallery.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/gen_asp_extras.sh +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/make_dem_stack.sh +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/plot_disparity.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/seaice_correction.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/original_code/stack_plots.ipynb +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/__init__.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_altimetry.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_bundle_adjust.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_csm_camera.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/10300100D0772D00.r100.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/10300100D12D7400.r100.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/ba-final_residuals_pointmap-diff.csv +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/ba-final_residuals_pointmap.csv +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/ba-initial_residuals_pointmap-diff.csv +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/ba-initial_residuals_pointmap.csv +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/ba-mapproj_match_offsets.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/ba-triangulation_uncertainty.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba/log-bundle_adjust.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010074793300.adjust +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010074793300.adjusted_state.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010074793300.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010074793300.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010075633C00.adjust +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010075633C00.adjusted_state.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010075633C00.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/1040010075633C00.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ba_cams/linescan_to_csm.sh +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/icesat_data/atl06sr_all.parquet +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/icesat_data/atl06sr_canopy.parquet +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/icesat_data/atl06sr_ground.parquet +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/icesat_data/atl06sr_top_of_canopy.parquet +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/jitter/uyuni/csm-104001001427B900.r100.adjusted_state.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/jitter/uyuni/csm-1040010014761800.r100.adjusted_state.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/jitter/uyuni/jitter_correction_uyuni.png +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/jitter/uyuni/jitter_solved_run-csm-104001001427B900.r100.adjusted_state.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/jitter/uyuni/jitter_solved_run-csm-1040010014761800.r100.adjusted_state.json +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground-inverse-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground-log-pc_align.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_15_day_pad-inverse-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_15_day_pad-log-pc_align.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_15_day_pad-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_45_day_pad-inverse-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_45_day_pad-log-pc_align.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_45_day_pad-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_91_day_pad-inverse-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_91_day_pad-log-pc_align.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_91_day_pad-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_seasonal-inverse-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_seasonal-log-pc_align.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/pc_align/pc_align_ground_seasonal-transform.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/ref_dem.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-D.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-D_sub.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-L.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-L__R.csv +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-L__R.match +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-L_sub.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right-R_sub.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right_1m-DEM.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right_1m-DEM_ref_dem_diff.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/date_time_left_right_1m-IntersectionErr.tif +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/log-point2dem.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/log-stereo_corr.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/log-stereo_fltr.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/log-stereo_pprc.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/stereo/log-stereo_tri.txt +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/10200100A1865800.r100.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/10200100A1865800_asp_plot_dg_mosaic.r100.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/10200100A37C1C00.r100.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/10200100A37C1C00_asp_plot_dg_mosaic.r100.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/WV01_20210201005130_10200100A1865800_21FEB01005130-P1BS-016263048010_01_P001.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/WV01_20210201005131_10200100A1865800_21FEB01005131-P1BS-016263048010_01_P002.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/WV01_20210201005224_10200100A37C1C00_21FEB01005224-P1BS-016263047010_01_P001.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_data/tiled_xmls/WV01_20210201005225_10200100A37C1C00_21FEB01005225-P1BS-016263047010_01_P002.xml +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_imports.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_processing_parameters.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_scenes.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_stereo_geometry.py +0 -0
- {asp_plot-1.2.0 → asp_plot-1.2.1}/tests/test_utils.py +0 -0
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.1] - 2025-10-19
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- New `notebooks/Mars_MOC` example
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- Added a regular hillshade fallback to `StereoPlotter.plot_detailed_hillshade()` for the case where `*-IntersectionErr.tif` was not produced and is not available for detailed hillshade plots.
|
|
15
|
+
|
|
16
|
+
### Internal
|
|
17
|
+
- Extracted common hillshade plotting logic in `StereoPlotter` to utility function.
|
|
18
|
+
|
|
8
19
|
## [1.2.0] - 2025-10-12
|
|
9
20
|
|
|
10
21
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: asp_plot
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: Package for plotting outputs Ames Stereo Pipeline processing
|
|
5
5
|
Project-URL: Homepage, https://github.com/uw-cryo/asp_plot
|
|
6
6
|
Project-URL: Issues, https://github.com/uw-cryo/asp_plot/issues
|
|
@@ -69,6 +69,7 @@ Examples of the modular usage of the package can be found in the `notebooks/` di
|
|
|
69
69
|
|
|
70
70
|
- `notebooks/WorldView` for WorldView example processing
|
|
71
71
|
- `notebooks/LRO_NAC` for Lunar Reconnaissance Orbiter Narrow Angle Camera example processing
|
|
72
|
+
- etc.
|
|
72
73
|
|
|
73
74
|
## CLI usage: `asp_plot`
|
|
74
75
|
|
|
@@ -54,6 +54,7 @@ Examples of the modular usage of the package can be found in the `notebooks/` di
|
|
|
54
54
|
|
|
55
55
|
- `notebooks/WorldView` for WorldView example processing
|
|
56
56
|
- `notebooks/LRO_NAC` for Lunar Reconnaissance Orbiter Narrow Angle Camera example processing
|
|
57
|
+
- etc.
|
|
57
58
|
|
|
58
59
|
## CLI usage: `asp_plot`
|
|
59
60
|
|
|
@@ -477,6 +477,9 @@ class StereoPlotter(Plotter):
|
|
|
477
477
|
different levels of intersection error. If the images are map-projected,
|
|
478
478
|
it also shows the corresponding optical image for each subset.
|
|
479
479
|
|
|
480
|
+
If the intersection error file is missing, it falls back to a plain
|
|
481
|
+
hillshade plot without the detailed subsets.
|
|
482
|
+
|
|
480
483
|
Parameters
|
|
481
484
|
----------
|
|
482
485
|
intersection_error_percentiles : list, optional
|
|
@@ -502,6 +505,25 @@ class StereoPlotter(Plotter):
|
|
|
502
505
|
of intersection error, representing areas with different quality
|
|
503
506
|
levels in the DEM.
|
|
504
507
|
"""
|
|
508
|
+
if not self.intersection_error_fn:
|
|
509
|
+
logger.warning(
|
|
510
|
+
"\n\nIntersection error file not found. Plotting hillshade without details.\n\n"
|
|
511
|
+
)
|
|
512
|
+
fig, ax = plt.subplots(1, 1, figsize=(6, 4), dpi=220)
|
|
513
|
+
fig.suptitle(self.title, size=10)
|
|
514
|
+
|
|
515
|
+
raster = Raster(self.dem_fn)
|
|
516
|
+
dem = raster.read_array()
|
|
517
|
+
gsd = raster.get_gsd()
|
|
518
|
+
hs = raster.hillshade()
|
|
519
|
+
self._plot_hillshade_with_overlay(ax, dem, hs, gsd)
|
|
520
|
+
|
|
521
|
+
fig.tight_layout()
|
|
522
|
+
if save_dir and fig_fn:
|
|
523
|
+
save_figure(fig, save_dir, fig_fn)
|
|
524
|
+
|
|
525
|
+
return
|
|
526
|
+
|
|
505
527
|
# Set up the plot
|
|
506
528
|
fig = plt.figure(figsize=(10, 15), dpi=220)
|
|
507
529
|
gs = gridspec.GridSpec(3, 3, height_ratios=[2, 1, 1])
|
|
@@ -530,17 +552,8 @@ class StereoPlotter(Plotter):
|
|
|
530
552
|
image = Raster(self.left_image_fn)
|
|
531
553
|
|
|
532
554
|
# Full hillshade with DEM overlay
|
|
533
|
-
self.
|
|
534
|
-
self.plot_array(
|
|
535
|
-
ax=ax_top,
|
|
536
|
-
array=dem,
|
|
537
|
-
cmap="viridis",
|
|
538
|
-
cbar_label="Elevation (m HAE)",
|
|
539
|
-
alpha=0.5,
|
|
540
|
-
)
|
|
555
|
+
self._plot_hillshade_with_overlay(ax_top, dem, hs, gsd)
|
|
541
556
|
ax_top.set_title(self.title, size=14)
|
|
542
|
-
scalebar = ScaleBar(gsd)
|
|
543
|
-
ax_top.add_artist(scalebar)
|
|
544
557
|
|
|
545
558
|
# Calculate subset size in pixels
|
|
546
559
|
subset_size = int(subset_km * 1000 / gsd)
|
|
@@ -622,14 +635,7 @@ class StereoPlotter(Plotter):
|
|
|
622
635
|
idx[0] * subset_size : (idx[0] + 1) * subset_size,
|
|
623
636
|
idx[1] * subset_size : (idx[1] + 1) * subset_size,
|
|
624
637
|
]
|
|
625
|
-
self.
|
|
626
|
-
self.plot_array(
|
|
627
|
-
ax=ax_hs,
|
|
628
|
-
array=dem_subset,
|
|
629
|
-
cmap="viridis",
|
|
630
|
-
cbar_label="Elevation (m HAE)",
|
|
631
|
-
alpha=0.5,
|
|
632
|
-
)
|
|
638
|
+
self._plot_hillshade_with_overlay(ax_hs, dem_subset, hs_subset, gsd)
|
|
633
639
|
|
|
634
640
|
with rio.open(self.dem_fn) as src:
|
|
635
641
|
transform = src.transform
|
|
@@ -664,9 +670,6 @@ class StereoPlotter(Plotter):
|
|
|
664
670
|
spine.set_color(color)
|
|
665
671
|
spine.set_linewidth(4)
|
|
666
672
|
|
|
667
|
-
scalebar = ScaleBar(gsd)
|
|
668
|
-
ax_hs.add_artist(scalebar)
|
|
669
|
-
|
|
670
673
|
fig.tight_layout()
|
|
671
674
|
if save_dir and fig_fn:
|
|
672
675
|
save_figure(fig, save_dir, fig_fn)
|
|
@@ -709,6 +712,46 @@ class StereoPlotter(Plotter):
|
|
|
709
712
|
)
|
|
710
713
|
return diff
|
|
711
714
|
|
|
715
|
+
def _plot_hillshade_with_overlay(
|
|
716
|
+
self, ax, dem, hillshade, gsd, clim=None, add_scalebar=True
|
|
717
|
+
):
|
|
718
|
+
"""
|
|
719
|
+
Plot hillshade with semi-transparent DEM overlay.
|
|
720
|
+
|
|
721
|
+
Parameters
|
|
722
|
+
----------
|
|
723
|
+
ax : matplotlib.axes.Axes
|
|
724
|
+
Axes to plot on
|
|
725
|
+
dem : numpy.ndarray
|
|
726
|
+
DEM array to overlay
|
|
727
|
+
hillshade : numpy.ndarray
|
|
728
|
+
Hillshade array (grayscale background)
|
|
729
|
+
gsd : float
|
|
730
|
+
Ground sample distance in meters for scalebar
|
|
731
|
+
clim : tuple or None, optional
|
|
732
|
+
Color limits for DEM, default is None (auto)
|
|
733
|
+
add_scalebar : bool, optional
|
|
734
|
+
Whether to add a scalebar to the plot, default is True
|
|
735
|
+
|
|
736
|
+
Notes
|
|
737
|
+
-----
|
|
738
|
+
This is a helper method to reduce code duplication across plotting
|
|
739
|
+
methods. It creates the standard hillshade + DEM visualization used
|
|
740
|
+
throughout the StereoPlotter class.
|
|
741
|
+
"""
|
|
742
|
+
self.plot_array(ax=ax, array=hillshade, cmap="gray", add_cbar=False)
|
|
743
|
+
self.plot_array(
|
|
744
|
+
ax=ax,
|
|
745
|
+
array=dem,
|
|
746
|
+
clim=clim,
|
|
747
|
+
cmap="viridis",
|
|
748
|
+
cbar_label="Elevation (m HAE)",
|
|
749
|
+
alpha=0.5,
|
|
750
|
+
)
|
|
751
|
+
if add_scalebar:
|
|
752
|
+
scalebar = ScaleBar(gsd)
|
|
753
|
+
ax.add_artist(scalebar)
|
|
754
|
+
|
|
712
755
|
def plot_dem_results(
|
|
713
756
|
self, el_clim=None, ie_clim=None, diff_clim=None, save_dir=None, fig_fn=None
|
|
714
757
|
):
|
|
@@ -755,20 +798,8 @@ class StereoPlotter(Plotter):
|
|
|
755
798
|
raster = Raster(self.dem_fn)
|
|
756
799
|
dem = raster.read_array()
|
|
757
800
|
gsd = raster.get_gsd()
|
|
758
|
-
|
|
759
801
|
hs = raster.hillshade()
|
|
760
|
-
self.
|
|
761
|
-
self.plot_array(
|
|
762
|
-
ax=axa[0],
|
|
763
|
-
array=dem,
|
|
764
|
-
clim=el_clim,
|
|
765
|
-
cmap="viridis",
|
|
766
|
-
cbar_label="Elevation (m HAE)",
|
|
767
|
-
alpha=0.5,
|
|
768
|
-
)
|
|
769
|
-
|
|
770
|
-
scalebar = ScaleBar(gsd)
|
|
771
|
-
axa[0].add_artist(scalebar)
|
|
802
|
+
self._plot_hillshade_with_overlay(axa[0], dem, hs, gsd, clim=el_clim)
|
|
772
803
|
else:
|
|
773
804
|
axa[0].text(
|
|
774
805
|
0.5,
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"Figure saved to /Users/ben/Dropbox/UW_Shean/asp_plot-test_data/docs_examples/docs_sect_4_1_lunar_LRO_NAC/LRONAC_example/tmp_asp_report_plots/04.png\n",
|
|
102
102
|
"\n",
|
|
103
103
|
"\n",
|
|
104
|
-
"Report saved to /Users/ben/Dropbox/UW_Shean/asp_plot-test_data/docs_examples/docs_sect_4_1_lunar_LRO_NAC/LRONAC_example/run/
|
|
104
|
+
"Report saved to /Users/ben/Dropbox/UW_Shean/asp_plot-test_data/docs_examples/docs_sect_4_1_lunar_LRO_NAC/LRONAC_example/run/asp_plot_report_LRONAC_example_20251019_191919.pdf\n",
|
|
105
105
|
"\n",
|
|
106
106
|
"\n"
|
|
107
107
|
]
|