asp-plot 0.5.2__tar.gz → 0.5.3__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 (90) hide show
  1. {asp_plot-0.5.2 → asp_plot-0.5.3}/PKG-INFO +1 -1
  2. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/csm_camera.py +27 -24
  3. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot.egg-info/PKG-INFO +1 -1
  4. {asp_plot-0.5.2 → asp_plot-0.5.3}/pyproject.toml +1 -1
  5. {asp_plot-0.5.2 → asp_plot-0.5.3}/setup.py +1 -1
  6. {asp_plot-0.5.2 → asp_plot-0.5.3}/.flake8 +0 -0
  7. {asp_plot-0.5.2 → asp_plot-0.5.3}/.github/workflows/run-tests.yml +0 -0
  8. {asp_plot-0.5.2 → asp_plot-0.5.3}/.gitignore +0 -0
  9. {asp_plot-0.5.2 → asp_plot-0.5.3}/.pre-commit-config.yaml +0 -0
  10. {asp_plot-0.5.2 → asp_plot-0.5.3}/LICENSE +0 -0
  11. {asp_plot-0.5.2 → asp_plot-0.5.3}/README.md +0 -0
  12. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/__init__.py +0 -0
  13. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/altimetry.py +0 -0
  14. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/bundle_adjust.py +0 -0
  15. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/cli/__init__.py +0 -0
  16. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/cli/asp_plot.py +0 -0
  17. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/cli/csm_camera_plot.py +0 -0
  18. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/processing_parameters.py +0 -0
  19. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/scenes.py +0 -0
  20. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/stereo.py +0 -0
  21. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/stereopair_metadata_parser.py +0 -0
  22. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot/utils.py +0 -0
  23. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot.egg-info/SOURCES.txt +0 -0
  24. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot.egg-info/dependency_links.txt +0 -0
  25. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot.egg-info/entry_points.txt +0 -0
  26. {asp_plot-0.5.2 → asp_plot-0.5.3}/asp_plot.egg-info/top_level.txt +0 -0
  27. {asp_plot-0.5.2 → asp_plot-0.5.3}/environment.yml +0 -0
  28. {asp_plot-0.5.2 → asp_plot-0.5.3}/notebooks/bundle_adjust_plots.ipynb +0 -0
  29. {asp_plot-0.5.2 → asp_plot-0.5.3}/notebooks/icesat2_plots.ipynb +0 -0
  30. {asp_plot-0.5.2 → asp_plot-0.5.3}/notebooks/processing_parameters.ipynb +0 -0
  31. {asp_plot-0.5.2 → asp_plot-0.5.3}/notebooks/scene_plots.ipynb +0 -0
  32. {asp_plot-0.5.2 → asp_plot-0.5.3}/notebooks/stereo_plots.ipynb +0 -0
  33. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/asp_plot_util.py +0 -0
  34. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/bundle_adjust_plots.ipynb +0 -0
  35. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/bundle_adjust_plots_BP_tmp.ipynb +0 -0
  36. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/corr_and_dem_plots.ipynb +0 -0
  37. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/corr_and_dem_plots_DS.ipynb +0 -0
  38. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/disparity_plot.ipynb +0 -0
  39. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/gallery.py +0 -0
  40. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/gen_asp_extras.sh +0 -0
  41. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/make_dem_stack.sh +0 -0
  42. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/plot_disparity.py +0 -0
  43. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/seaice_correction.ipynb +0 -0
  44. {asp_plot-0.5.2 → asp_plot-0.5.3}/original_code/stack_plots.ipynb +0 -0
  45. {asp_plot-0.5.2 → asp_plot-0.5.3}/setup.cfg +0 -0
  46. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/__init__.py +0 -0
  47. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_altimetry.py +0 -0
  48. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_bundle_adjust.py +0 -0
  49. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_csm_camera.py +0 -0
  50. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/10300100D0772D00.r100.xml +0 -0
  51. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/10300100D12D7400.r100.xml +0 -0
  52. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/ba-final_residuals_pointmap-diff.csv +0 -0
  53. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/ba-final_residuals_pointmap.csv +0 -0
  54. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/ba-initial_residuals_pointmap-diff.csv +0 -0
  55. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/ba-initial_residuals_pointmap.csv +0 -0
  56. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/ba-mapproj_match_offsets.txt +0 -0
  57. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/ba-triangulation_uncertainty.txt +0 -0
  58. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba/log-bundle_adjust.txt +0 -0
  59. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010074793300.adjust +0 -0
  60. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010074793300.adjusted_state.json +0 -0
  61. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010074793300.json +0 -0
  62. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010074793300.xml +0 -0
  63. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010075633C00.adjust +0 -0
  64. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010075633C00.adjusted_state.json +0 -0
  65. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010075633C00.json +0 -0
  66. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/1040010075633C00.xml +0 -0
  67. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ba_cams/linescan_to_csm.sh +0 -0
  68. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/icesat_data/atl06sr_defaults_filtered.csv +0 -0
  69. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/icesat_data/atl06sr_defaults_filtered.parquet +0 -0
  70. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/jitter/uyuni/csm-104001001427B900.r100.adjusted_state.json +0 -0
  71. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/jitter/uyuni/csm-1040010014761800.r100.adjusted_state.json +0 -0
  72. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/jitter/uyuni/jitter_correction_uyuni.png +0 -0
  73. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/jitter/uyuni/jitter_solved_run-csm-104001001427B900.r100.adjusted_state.json +0 -0
  74. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/jitter/uyuni/jitter_solved_run-csm-1040010014761800.r100.adjusted_state.json +0 -0
  75. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/ref_dem.tif +0 -0
  76. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-D.tif +0 -0
  77. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-D_sub.tif +0 -0
  78. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-L.tif +0 -0
  79. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-L__R.csv +0 -0
  80. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-L__R.match +0 -0
  81. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-L_sub.tif +0 -0
  82. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right-R_sub.tif +0 -0
  83. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right_1m-DEM.tif +0 -0
  84. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right_1m-DEM_ref_dem_diff.tif +0 -0
  85. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/date_time_left_right_1m-IntersectionErr.tif +0 -0
  86. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_data/stereo/log-point2dem.txt +0 -0
  87. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_imports.py +0 -0
  88. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_processing_parameters.py +0 -0
  89. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_scenes.py +0 -0
  90. {asp_plot-0.5.2 → asp_plot-0.5.3}/tests/test_stereo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: asp_plot
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Package for plotting outputs Ames Stereo Pipeline processing
5
5
  Author: Ben Purinton
6
6
  Author-email: Ben Purinton <purinton@uw.edu>
@@ -304,17 +304,25 @@ def csm_camera_summary_plot(
304
304
 
305
305
  # Trim the beginning and end of the geodataframes
306
306
  if trim:
307
- gdf_cam1 = trim_gdf(
308
- gdf_cam1,
309
- near_zero_tolerance=near_zero_tolerance,
310
- trim_percentage=trim_percentage,
311
- )
312
- if cam2_list:
313
- gdf_cam2 = trim_gdf(
314
- gdf_cam2,
307
+ # When position changes are all zero, the trimming will fail
308
+ # https://github.com/uw-cryo/asp_plot/issues/54
309
+ if np.sum(gdf_cam1.position_diff_magnitude > 0) == 0:
310
+ print(
311
+ "\nWarning: No data to trim from the beginning and end of the camera files. Position changes are all zero.\n"
312
+ )
313
+ trim = False
314
+ else:
315
+ gdf_cam1 = trim_gdf(
316
+ gdf_cam1,
315
317
  near_zero_tolerance=near_zero_tolerance,
316
318
  trim_percentage=trim_percentage,
317
319
  )
320
+ if cam2_list:
321
+ gdf_cam2 = trim_gdf(
322
+ gdf_cam2,
323
+ near_zero_tolerance=near_zero_tolerance,
324
+ trim_percentage=trim_percentage,
325
+ )
318
326
 
319
327
  # Calculate colorbar ranges
320
328
  position_values = gdf_cam1.position_diff_magnitude[
@@ -323,26 +331,21 @@ def csm_camera_summary_plot(
323
331
  angular_values = gdf_cam1.angular_diff_magnitude[
324
332
  gdf_cam1.angular_diff_magnitude > 0
325
333
  ]
326
- cam1_position_vmin, cam1_position_vmax = np.percentile(
327
- position_values, [0, upper_magnitude_percentile]
328
- )
329
- cam1_angular_vmin, cam1_angular_vmax = np.percentile(
330
- angular_values, [0, upper_magnitude_percentile]
331
- )
332
-
333
- if cam2_list:
334
- position_values = gdf_cam2.position_diff_magnitude[
335
- gdf_cam2.position_diff_magnitude > 0
336
- ]
337
- angular_values = gdf_cam2.angular_diff_magnitude[
338
- gdf_cam2.angular_diff_magnitude > 0
339
- ]
340
- cam2_position_vmin, cam2_position_vmax = np.percentile(
334
+ # When position or angular changes are all zero, the percentile calculation will fail
335
+ # https://github.com/uw-cryo/asp_plot/issues/54
336
+ try:
337
+ cam1_position_vmin, cam1_position_vmax = np.percentile(
341
338
  position_values, [0, upper_magnitude_percentile]
342
339
  )
343
- cam2_angular_vmin, cam2_angular_vmax = np.percentile(
340
+ except IndexError:
341
+ cam1_position_vmin, cam1_position_vmax = 0, 0
342
+
343
+ try:
344
+ cam1_angular_vmin, cam1_angular_vmax = np.percentile(
344
345
  angular_values, [0, upper_magnitude_percentile]
345
346
  )
347
+ except IndexError:
348
+ cam1_angular_vmin, cam1_angular_vmax = 0, 0
346
349
 
347
350
  if upper_magnitude_percentile == 100:
348
351
  extend = "neither"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: asp_plot
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Package for plotting outputs Ames Stereo Pipeline processing
5
5
  Author: Ben Purinton
6
6
  Author-email: Ben Purinton <purinton@uw.edu>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "asp_plot"
7
- version = "0.5.2"
7
+ version = "0.5.3"
8
8
  authors = [
9
9
  { name="Ben Purinton", email="purinton@uw.edu" },
10
10
  ]
@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
4
4
 
5
5
  setup(
6
6
  name="asp_plot",
7
- version="0.5.2",
7
+ version="0.5.3",
8
8
  description="Python library and client for plotting Ames Stereo Pipeline outputs",
9
9
  author="Ben Purinton",
10
10
  author_email="purinton@uw.edu",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes