PyGeoFetch 2.6.8.0__tar.gz → 2.6.9.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 (266) hide show
  1. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/CHANGELOG.md +7 -7
  2. {pygeofetch-2.6.8.0/pygeofetch.egg-info → pygeofetch-2.6.9.1}/PKG-INFO +2 -2
  3. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/README.md +1 -1
  4. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/__init__.py +1 -1
  5. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/__init__.py +41 -1
  6. pygeofetch-2.6.9.1/pygeofetch/insar/atmosphere_core.py +455 -0
  7. pygeofetch-2.6.9.1/pygeofetch/insar/errors.py +153 -0
  8. pygeofetch-2.6.9.1/pygeofetch/insar/hybrid_unwrap.py +324 -0
  9. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/interferogram.py +518 -163
  10. pygeofetch-2.6.9.1/pygeofetch/insar/learned_unwrap.py +905 -0
  11. pygeofetch-2.6.9.1/pygeofetch/insar/ps_eval.py +121 -0
  12. pygeofetch-2.6.9.1/pygeofetch/insar/ps_gnn_pygeofetch_selector.py +89 -0
  13. pygeofetch-2.6.9.1/pygeofetch/insar/ps_stack.py +657 -0
  14. pygeofetch-2.6.9.1/pygeofetch/insar/radar_geometry.py +291 -0
  15. pygeofetch-2.6.9.1/pygeofetch/insar/topo.py +280 -0
  16. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/meta.yaml +1 -1
  17. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1/pygeofetch.egg-info}/PKG-INFO +2 -2
  18. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch.egg-info/SOURCES.txt +9 -0
  19. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pyproject.toml +1 -1
  20. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/LICENSE +0 -0
  21. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/MANIFEST.in +0 -0
  22. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/__init__.py +0 -0
  23. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/auth_commands.py +0 -0
  24. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/classify_commands.py +0 -0
  25. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/config_commands.py +0 -0
  26. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/download_commands.py +0 -0
  27. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/index_commands.py +0 -0
  28. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/main.py +0 -0
  29. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/monitor_commands.py +0 -0
  30. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/multisensor_commands.py +0 -0
  31. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/optical_commands.py +0 -0
  32. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/pipeline_process_commands.py +0 -0
  33. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/postprocess_commands.py +0 -0
  34. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/preprocess_commands.py +0 -0
  35. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/sar_commands.py +0 -0
  36. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/scale_commands.py +0 -0
  37. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/cli/search_commands.py +0 -0
  38. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/config/__init__.py +0 -0
  39. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/config/defaults.yaml +0 -0
  40. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/config/settings.py +0 -0
  41. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/__init__.py +0 -0
  42. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/authenticator.py +0 -0
  43. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/cache_manager.py +0 -0
  44. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/chunked_processor.py +0 -0
  45. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/data_formats/__init__.py +0 -0
  46. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/data_formats/geoparquet_io.py +0 -0
  47. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/data_formats/zarr_io.py +0 -0
  48. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/data_organizer.py +0 -0
  49. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/downloader.py +0 -0
  50. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/engine.py +0 -0
  51. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/logging.py +0 -0
  52. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/monitor.py +0 -0
  53. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/orbits.py +0 -0
  54. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/progress.py +0 -0
  55. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/scheduler.py +0 -0
  56. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/searcher.py +0 -0
  57. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/core/state.py +0 -0
  58. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/geotech/__init__.py +0 -0
  59. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/geotech/risk_mapper.py +0 -0
  60. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/advanced_safeguards.py +0 -0
  61. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/analysis.py +0 -0
  62. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/annotation.py +0 -0
  63. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/atmosphere.py +0 -0
  64. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/auto_fallback.py +0 -0
  65. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/coregister.py +0 -0
  66. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/deburst.py +0 -0
  67. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/esd.py +0 -0
  68. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/extraction.py +0 -0
  69. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/feasibility.py +0 -0
  70. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/flatearth.py +0 -0
  71. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/geolocation.py +0 -0
  72. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/gpu.py +0 -0
  73. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/ionosphere.py +0 -0
  74. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/network_thinning.py +0 -0
  75. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/offset_geometry.py +0 -0
  76. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/offset_tracking.py +0 -0
  77. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/preflight.py +0 -0
  78. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/provenance.py +0 -0
  79. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/ps_selection.py +0 -0
  80. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/splitspectrum_diagnostic.py +0 -0
  81. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/stack_selection.py +0 -0
  82. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/synthetic.py +0 -0
  83. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/timeseries.py +0 -0
  84. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/unwrap.py +0 -0
  85. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/validate.py +0 -0
  86. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/visualize.py +0 -0
  87. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/insar/workflow.py +0 -0
  88. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/models/__init__.py +0 -0
  89. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/models/download_task.py +0 -0
  90. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/models/satellite_data.py +0 -0
  91. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/models/search_query.py +0 -0
  92. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/models/stream_options.py +0 -0
  93. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/models/user_auth.py +0 -0
  94. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/__init__.py +0 -0
  95. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/_init.py +0 -0
  96. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/dem_differencing.py +0 -0
  97. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/flood_mapping.py +0 -0
  98. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/insar_optical_fusion.py +0 -0
  99. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/terrain_corrected_change.py +0 -0
  100. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/multisensor/vegetation_disturbance.py +0 -0
  101. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/optical/__init__.py +0 -0
  102. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/optical/offset_tracking.py +0 -0
  103. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/__init__.py +0 -0
  104. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/base.py +0 -0
  105. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/batch.py +0 -0
  106. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/classification.py +0 -0
  107. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/indices.py +0 -0
  108. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/pipeline.py +0 -0
  109. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/postprocessor.py +0 -0
  110. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/preprocessor.py +0 -0
  111. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/sar.py +0 -0
  112. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processing/uq_exporter.py +0 -0
  113. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processor/__init__.py +0 -0
  114. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processor/indices.py +0 -0
  115. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processor/landsat.py +0 -0
  116. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processor/loader.py +0 -0
  117. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processor/stacker.py +0 -0
  118. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/processor/timeseries.py +0 -0
  119. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/__init__.py +0 -0
  120. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/airbus_oneatlas.py +0 -0
  121. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/alaska_satellite_facility.py +0 -0
  122. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/aws_earth.py +0 -0
  123. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/base.py +0 -0
  124. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/copernicus.py +0 -0
  125. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/copernicus_nodes.py +0 -0
  126. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/digitalglobe.py +0 -0
  127. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/earth_explorer_additional.py +0 -0
  128. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/element84.py +0 -0
  129. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/eodag_provider.py +0 -0
  130. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/esa_scihub.py +0 -0
  131. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/geoserver_generic.py +0 -0
  132. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/google_earth_engine.py +0 -0
  133. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/inpe_cbers.py +0 -0
  134. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/isro_bhuvan.py +0 -0
  135. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/jaxa_earth.py +0 -0
  136. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/maxar_gbdx.py +0 -0
  137. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/nasa_earthdata.py +0 -0
  138. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/nasa_earthdata_cloud.py +0 -0
  139. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/noaa_big_data.py +0 -0
  140. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/opentopography.py +0 -0
  141. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/planet.py +0 -0
  142. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/planetary_computer.py +0 -0
  143. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/sentinel_hub.py +0 -0
  144. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/terrabotics.py +0 -0
  145. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/providers/usgs.py +0 -0
  146. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/__init__.py +0 -0
  147. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/_native.py +0 -0
  148. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/_ost.py +0 -0
  149. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/_sarxarray.py +0 -0
  150. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/extraction.py +0 -0
  151. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/math.py +0 -0
  152. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/pipelines.py +0 -0
  153. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/sar/processor.py +0 -0
  154. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/stac_compute/__init__.py +0 -0
  155. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/stac_compute/burst_streaming.py +0 -0
  156. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/stac_compute/cog_streamer.py +0 -0
  157. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/stac_compute/lightweight_prefetch.py +0 -0
  158. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/stac_compute/window_calculator.py +0 -0
  159. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/streaming/__init__.py +0 -0
  160. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/streaming/scene.py +0 -0
  161. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/streaming/windowed.py +0 -0
  162. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/__init__.py +0 -0
  163. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/file_utils.py +0 -0
  164. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/gcp_recovery.py +0 -0
  165. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/geo_utils.py +0 -0
  166. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/geocoding.py +0 -0
  167. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/logging_setup.py +0 -0
  168. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/retry_handler.py +0 -0
  169. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/sar_math.py +0 -0
  170. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/utils/validators.py +0 -0
  171. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/validation/__init__.py +0 -0
  172. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/validation/optical_validator.py +0 -0
  173. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/viz/__init__.py +0 -0
  174. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/viz/insar.py +0 -0
  175. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/viz/map.py +0 -0
  176. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch/viz/plot.py +0 -0
  177. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch.egg-info/dependency_links.txt +0 -0
  178. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch.egg-info/entry_points.txt +0 -0
  179. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch.egg-info/not-zip-safe +0 -0
  180. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch.egg-info/requires.txt +0 -0
  181. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/pygeofetch.egg-info/top_level.txt +0 -0
  182. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/setup.cfg +0 -0
  183. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_advanced_safeguards.py +0 -0
  184. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_airbus_oneatlas.py +0 -0
  185. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_alaska_satellite_facility.py +0 -0
  186. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_atmospheric_circular_regression.py +0 -0
  187. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_auto_fallback.py +0 -0
  188. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_auto_fallback_fixed.py +0 -0
  189. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_build_sbas_network-new.py +0 -0
  190. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_build_sbas_network.py +0 -0
  191. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_burst_metadata.py +0 -0
  192. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_burst_processing_integration.py +0 -0
  193. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_burst_sync_large_gap.py +0 -0
  194. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_burst_sync_prescreening.py +0 -0
  195. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_burst_synchronization.py +0 -0
  196. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_circuit_breaker_wiring.py +0 -0
  197. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_cli_optical_validation.py +0 -0
  198. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_copernicus_nodes.py +0 -0
  199. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_coregister_integration.py +0 -0
  200. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_coregister_upgrades (1).py +0 -0
  201. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_coregister_upgrades.py +0 -0
  202. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_credential_encryption.py +0 -0
  203. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_data_organizer.py +0 -0
  204. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_dem_differencing_pipeline.py +0 -0
  205. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_digitalglobe.py +0 -0
  206. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_earth_explorer_additional.py +0 -0
  207. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_era5_atmospheric_correction.py +0 -0
  208. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_esa_scihub.py +0 -0
  209. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_extraction.py +0 -0
  210. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_flat_earth_phase.py +0 -0
  211. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_flood_mapping_pipeline.py +0 -0
  212. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_gcp_reprojection.py +0 -0
  213. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_geology_indices_and_rvi_fix.py +0 -0
  214. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_geoserver_generic.py +0 -0
  215. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_google_earth_engine.py +0 -0
  216. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_inpe_cbers.py +0 -0
  217. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_insar.py +0 -0
  218. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_insar_optical_fusion_pipeline.py +0 -0
  219. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_ionosphere.py +0 -0
  220. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_isro_bhuvan.py +0 -0
  221. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_jaxa_earth.py +0 -0
  222. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_lightweight_prefetch.py +0 -0
  223. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_map_preview_consolidation.py +0 -0
  224. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_models.py +0 -0
  225. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_monitor.py +0 -0
  226. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_nasa_earthdata_cloud_s3_fix.py +0 -0
  227. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_nasa_earthdata_public_search.py +0 -0
  228. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_network_thinning.py +0 -0
  229. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_noaa_big_data.py +0 -0
  230. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_offset_tracking.py +0 -0
  231. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_opentopography_pointcloud_usgs.py +0 -0
  232. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_optical_offset_tracking.py +0 -0
  233. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_optical_validation_wiring.py +0 -0
  234. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_optical_validator.py +0 -0
  235. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_optical_validator_stac.py +0 -0
  236. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_pgv_integration_contract.py +0 -0
  237. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_pipeline_process_export.py +0 -0
  238. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_planet_asset_type_fix.py +0 -0
  239. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_preflight_gate.py +0 -0
  240. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_preflight_quiet.py +0 -0
  241. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_preflight_spatial_baseline.py +0 -0
  242. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_provider_geometry_audit.py +0 -0
  243. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_provider_scene_disambiguation.py +0 -0
  244. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_providers.py +0 -0
  245. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_ps_selection.py +0 -0
  246. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_raster_collocation_integration.py +0 -0
  247. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_reference_pixel_and_despike.py +0 -0
  248. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_risk_mapper.py +0 -0
  249. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_risk_mapping.py +0 -0
  250. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_sar_pipelines.py +0 -0
  251. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_screen_stack_orchestration.py +0 -0
  252. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_search_download.py +0 -0
  253. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_sentinel_hub_catalog_fix.py +0 -0
  254. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_sign_convention.py +0 -0
  255. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_splitspectrum_diagnostic.py +0 -0
  256. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_stack_selection_consolidation.py +0 -0
  257. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_state.py +0 -0
  258. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_strain_and_fusion.py +0 -0
  259. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_streaming.py +0 -0
  260. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_terrain_corrected_change_pipeline.py +0 -0
  261. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_topo_r2_bug.py +0 -0
  262. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_uq_exporter.py +0 -0
  263. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_utils.py +0 -0
  264. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_vegetation_disturbance_pipeline.py +0 -0
  265. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_viz_plot.py +0 -0
  266. {pygeofetch-2.6.8.0 → pygeofetch-2.6.9.1}/tests/test_wls_inversion.py +0 -0
@@ -20,7 +20,7 @@ date, and marked accordingly rather than filled in with invented
20
20
  bullet points.
21
21
  ```
22
22
 
23
- ## [Unreleased] — v2.6.8.0.4
23
+ ## [Unreleased] — v2.6.9.1.4
24
24
 
25
25
  ```{note}
26
26
  Not yet published to PyPI. This entry documents work completed and
@@ -130,7 +130,7 @@ audit and remain open for a follow-up pass.
130
130
 
131
131
  ---
132
132
 
133
- ## [2.6.8.0.4] — 2026-08-25 (latest)
133
+ ## [2.6.9.1.4] — 2026-08-25 (latest)
134
134
 
135
135
  Confirmed via direct fetch of the current PyPI listing.
136
136
 
@@ -149,7 +149,7 @@ Confirmed via direct fetch of the current PyPI listing.
149
149
  - `SearchQuery.sort_ascending: bool` — earlier examples showed a `sort_order: "asc"/"desc"` string field that doesn't exist on the model (the CLI's `--sort-order` flag does convert to this internally, so CLI docs were unaffected)
150
150
  - `DownloadOptions.post_process` requires a list of `PostProcessAction` objects — passing plain strings raises a real `pydantic.ValidationError`
151
151
 
152
- ## [2.6.8.0] — 2026-08-24
152
+ ## [2.6.9.1] — 2026-08-24
153
153
  Real, verified release. Detailed notes not independently recovered from PyPI's release-history page (no distinct per-version notes exposed for this release specifically).
154
154
 
155
155
  ## [2.6.1] — 2026-08-22
@@ -261,9 +261,9 @@ recovered.
261
261
 
262
262
  ```{note}
263
263
  The previous version of this changelog had an entry labeled
264
- **"2.6.8.0.4 — 2026-07-12"** describing 22+ providers, Sentinel-1C/1D
264
+ **"2.6.9.1.4 — 2026-07-12"** describing 22+ providers, Sentinel-1C/1D
265
265
  support, SLC search with provider routing, precise orbit file
266
- management, 17 spectral indices, and various bug fixes. **2.6.8.0.4 was
266
+ management, 17 spectral indices, and various bug fixes. **2.6.9.1.4 was
267
267
  only ever released once, on 2026-08-25** — it was never released on
268
268
  2026-07-12. The date matches this real release, **1.0.8**, exactly.
269
269
  That content is reproduced below under the version it actually
@@ -406,8 +406,8 @@ The version of this file uploaded for this update had **5 entries
406
406
  covering 5 dates**. PyPI's real release history has **54 releases**.
407
407
  Specific issues found and fixed:
408
408
 
409
- 1. **Two different entries were both labeled `2.6.8.0.4`**, dated
410
- 2026-07-29 and 2026-07-12. **2.6.8.0.4 was only ever released once**,
409
+ 1. **Two different entries were both labeled `2.6.9.1.4`**, dated
410
+ 2026-07-29 and 2026-07-12. **2.6.9.1.4 was only ever released once**,
411
411
  on 2026-08-25 (confirmed directly from the live PyPI listing).
412
412
  2. **The 2026-07-12 entry's date exactly matches a real release**
413
413
  — version **1.0.8** — and its content (22+ providers, Sentinel-1C/D,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeofetch
3
- Version: 2.6.8.0
3
+ Version: 2.6.9.1
4
4
  Summary: Universal satellite data pipeline + geospatial processing platform
5
5
  Author-email: Samuel Appiah Kubi <appiahkubis14@gmail.com>
6
6
  License: MIT License
@@ -371,7 +371,7 @@ If you use PyGeoFetch in your research or operational work, please cite it using
371
371
  title = {PyGeoFetch: A Unified Python Framework for Multi-Provider Satellite Data Acquisition, Pre-download Quality Control, and Geospatial Processing},
372
372
  year = {2026},
373
373
  publisher = {Zenodo},
374
- version = {2.6.8.0.1},
374
+ version = {2.6.9.1.1},
375
375
  doi = {10.5281/zenodo.22087230},
376
376
  url = {https://doi.org/10.5281/zenodo.22087230}
377
377
  }
@@ -229,7 +229,7 @@ If you use PyGeoFetch in your research or operational work, please cite it using
229
229
  title = {PyGeoFetch: A Unified Python Framework for Multi-Provider Satellite Data Acquisition, Pre-download Quality Control, and Geospatial Processing},
230
230
  year = {2026},
231
231
  publisher = {Zenodo},
232
- version = {2.6.8.0.1},
232
+ version = {2.6.9.1.1},
233
233
  doi = {10.5281/zenodo.22087230},
234
234
  url = {https://doi.org/10.5281/zenodo.22087230}
235
235
  }
@@ -30,7 +30,7 @@ CLI::
30
30
  pygeofetch doctor
31
31
  """
32
32
 
33
- __version__ = "2.6.8.0.4"
33
+ __version__ = "2.6.9.1.4"
34
34
  __author__ = "PyGeoFetch Contributors"
35
35
  __license__ = "MIT"
36
36
 
@@ -114,6 +114,11 @@ from pygeofetch.insar.annotation import (
114
114
  parse_slc_geometry,
115
115
  )
116
116
  from pygeofetch.insar.atmosphere import AtmosphericCorrector
117
+ from pygeofetch.insar.atmosphere_core import (
118
+ estimate_height_slopes_per_date, fit_height_dependence, structure_function, variance_reduction,
119
+ )
120
+ from pygeofetch.insar.radar_geometry import GeometryNodes, PixelFrame, compute_geometry_nodes
121
+ from pygeofetch.insar.topo import apply_geometric_phase, heights_on_output_grid
117
122
  from pygeofetch.insar.coregister import (
118
123
  CoregistrationQuality,
119
124
  collocate_by_geocoding,
@@ -140,6 +145,16 @@ from pygeofetch.insar.geolocation import (
140
145
  range_offset_to_vertical_displacement,
141
146
  )
142
147
  from pygeofetch.insar.gpu import gpu_available
148
+ from pygeofetch.insar.errors import (
149
+ BurstProcessingError, CoregistrationError, CropError, FlatEarthError, InputError, ProcessingError,
150
+ QualityRecord, TopographicPhaseError, AtmosphereError, GeometryProcessingError,
151
+ UnwrapError, ModelLoadError, UnwrapDependencyError,
152
+ )
153
+ from pygeofetch.insar.hybrid_unwrap import HybridConfig, HybridUnwrapper, HybridUnwrapResult, tie_components
154
+ from pygeofetch.insar.learned_unwrap import (
155
+ LearnedUnwrapConfig, LearnedUnwrapper, LearnedUnwrapResult, UnwrapModel, load_unwrap_model,
156
+ unwrap_diagnostics, unwrap_interferograms,
157
+ )
143
158
  from pygeofetch.insar.interferogram import InterferogramGenerator, InterferogramResult
144
159
  from pygeofetch.insar.ionosphere import IonosphericCorrector, parse_ionex
145
160
 
@@ -185,6 +200,21 @@ from pygeofetch.insar.ps_selection import (
185
200
  select_persistent_scatterers,
186
201
  temporal_coherence,
187
202
  )
203
+ from pygeofetch.insar.ps_eval import boost_coherence_with_ps, compare_velocity_maps
204
+ from pygeofetch.insar.ps_stack import (
205
+ ADISelector,
206
+ PSSelection,
207
+ PSSelector,
208
+ PSStack,
209
+ build_ps_stack,
210
+ build_stack,
211
+ choose_master,
212
+ compare_selections,
213
+ holdout_stability,
214
+ residual_phase_coherence,
215
+ select_ps,
216
+ stability_weights,
217
+ )
188
218
  from pygeofetch.insar.stack_selection import (
189
219
  bbox_to_geojson_path,
190
220
  preview_search_results,
@@ -231,6 +261,11 @@ from pygeofetch.insar.visualize import (
231
261
  from pygeofetch.insar.workflow import InSARProject
232
262
 
233
263
  __all__ = [
264
+ "ProcessingError", "InputError", "CoregistrationError", "BurstProcessingError", "FlatEarthError",
265
+ "TopographicPhaseError", "CropError", "QualityRecord",
266
+ "PSStack", "PSSelection", "PSSelector", "ADISelector", "build_ps_stack", "build_stack",
267
+ "select_ps", "compare_selections", "holdout_stability", "residual_phase_coherence",
268
+ "stability_weights", "choose_master", "boost_coherence_with_ps", "compare_velocity_maps",
234
269
  "InterferogramGenerator",
235
270
  "InterferogramResult",
236
271
  "PhaseUnwrapper",
@@ -253,7 +288,12 @@ __all__ = [
253
288
  "despike_velocity",
254
289
  "InterferogramPair",
255
290
  "TimeSeriesResult",
256
- "AtmosphericCorrector",
291
+ "AtmosphericCorrector", "estimate_height_slopes_per_date", "fit_height_dependence", "structure_function",
292
+ "variance_reduction", "GeometryNodes", "PixelFrame", "compute_geometry_nodes", "apply_geometric_phase",
293
+ "heights_on_output_grid", "AtmosphereError", "GeometryProcessingError",
294
+ "UnwrapError", "ModelLoadError", "UnwrapDependencyError", "LearnedUnwrapConfig", "LearnedUnwrapper",
295
+ "LearnedUnwrapResult", "UnwrapModel", "load_unwrap_model", "unwrap_diagnostics", "unwrap_interferograms",
296
+ "HybridConfig", "HybridUnwrapper", "HybridUnwrapResult", "tie_components",
257
297
  "SLCExtractor",
258
298
  "DataValidator",
259
299
  "ValidationResult",
@@ -0,0 +1,455 @@
1
+ """Numerics for tropospheric (and other smooth-in-space) phase screens: estimation, validation, network consistency.
2
+
3
+ Why this exists
4
+ ---------------
5
+ ``atmosphere.AtmosphericCorrector`` could fit a phase-versus-height slope and remove it, or subtract an ERA5/GACOS delay, and
6
+ return the result with no check that the result was better. Reviewing it found:
7
+
8
+ * a spatial filter applied to *wrapped* phase by averaging angles (wrong near +/-pi) with NaNs replaced by zero (biases edges);
9
+ * a global fit that treats every pixel as independent, so a deforming area on a slope is absorbed into the "atmosphere";
10
+ * no ramp term, so a long-wavelength ramp (orbit error, ionosphere) is aliased into the height slope wherever height and
11
+ position correlate (most valleys);
12
+ * a significance test that ignores spatial correlation (neighbouring pixels share the same atmosphere);
13
+ * no test that the correction reduced the phase variance. Corrections from reanalysis can add noise in low relief;
14
+ * per-interferogram fits that ignore that the atmosphere belongs to a *date*, and that a DEM error looks like a height slope that
15
+ scales with the perpendicular baseline.
16
+
17
+ This module provides the estimation and validation pieces; ``atmosphere.AtmosphericCorrector`` uses them.
18
+
19
+ References: Hanssen (2001), Radar Interferometry (structure function of the atmospheric phase); Doin et al. (2009) and
20
+ Bekaert et al. (2015) (phase-height correlation, spatially varying fits); Yu et al. (2018), Murray et al. (2019) (judging a
21
+ correction by variance reduction and independent data); Fattahi & Amelung (2013) (DEM error appears as a baseline-proportional term).
22
+ """
23
+
24
+ from __future__ import annotations
25
+
26
+ import logging
27
+ from dataclasses import dataclass
28
+ from typing import Any, Dict, List, Optional, Sequence, Tuple
29
+
30
+ import numpy as np
31
+
32
+ logger = logging.getLogger("pygeofetch.insar.atmosphere_core")
33
+
34
+
35
+ def wrap(phase):
36
+ return np.angle(np.exp(1j * np.asarray(phase)))
37
+
38
+
39
+ # ---------------------------------------------------------------------------------------------------
40
+ # smoothing and structure function
41
+ # ---------------------------------------------------------------------------------------------------
42
+ def smooth_complex(phase: np.ndarray, valid: np.ndarray, sigma_px: float) -> np.ndarray:
43
+ """Low-pass a *wrapped* phase through its complex exponential, ignoring invalid pixels (normalised convolution).
44
+
45
+ Averaging the angles is wrong near +/-pi, and filling invalid pixels with zero biases every pixel near a gap.
46
+ Returns the smoothed phase (NaN where the local weight is negligible).
47
+ """
48
+ from scipy.ndimage import gaussian_filter
49
+
50
+ v = np.asarray(valid, dtype=bool) & np.isfinite(phase)
51
+ z = np.where(v, np.exp(1j * np.nan_to_num(phase)), 0.0)
52
+ w = v.astype(np.float64)
53
+ num = gaussian_filter(z.real, sigma_px) + 1j * gaussian_filter(z.imag, sigma_px)
54
+ den = gaussian_filter(w, sigma_px)
55
+ out = np.angle(num)
56
+ out[den < 1e-3] = np.nan
57
+ return out
58
+
59
+
60
+ def structure_function(
61
+ phase: np.ndarray,
62
+ valid: np.ndarray,
63
+ lags_px: Sequence[int],
64
+ wrapped: bool = True,
65
+ n_pairs: int = 200_000,
66
+ seed: int = 0,
67
+ ) -> Dict[int, float]:
68
+ """RMS phase difference (radians) between pixels a given distance apart: sqrt of the structure function.
69
+
70
+ The tropospheric phase screen is spatially correlated, so this grows with lag over the first tens of kilometres; a
71
+ correction that removes atmosphere lowers it at those lags. Differences are wrapped when the phase is wrapped, which
72
+ makes the measure insensitive to ramps and to the arbitrary 2*pi offsets. Each lag uses random pixel pairs in a random
73
+ direction (not only along rows and columns).
74
+ """
75
+ rng = np.random.default_rng(seed)
76
+ h, w = phase.shape
77
+ v = np.asarray(valid, dtype=bool) & np.isfinite(phase)
78
+ out: Dict[int, float] = {}
79
+ for lag in lags_px:
80
+ i = rng.integers(0, h, n_pairs)
81
+ j = rng.integers(0, w, n_pairs)
82
+ ang = rng.uniform(0, 2 * np.pi, n_pairs)
83
+ i2 = np.rint(i + lag * np.sin(ang)).astype(int)
84
+ j2 = np.rint(j + lag * np.cos(ang)).astype(int)
85
+ ok = (i2 >= 0) & (i2 < h) & (j2 >= 0) & (j2 < w)
86
+ i, j, i2, j2 = i[ok], j[ok], i2[ok], j2[ok]
87
+ ok = v[i, j] & v[i2, j2]
88
+ d = phase[i2[ok], j2[ok]] - phase[i[ok], j[ok]]
89
+ if wrapped:
90
+ d = wrap(d)
91
+ out[int(lag)] = float(np.sqrt(np.mean(d ** 2))) if d.size >= 100 else float("nan")
92
+ return out
93
+
94
+
95
+ def variance_reduction(
96
+ before: np.ndarray,
97
+ after: np.ndarray,
98
+ valid: np.ndarray,
99
+ lags_px: Sequence[int],
100
+ wrapped: bool = True,
101
+ seed: int = 0,
102
+ ) -> Dict[str, Any]:
103
+ """Compare the structure function before and after a correction, on the same pixel pairs.
104
+
105
+ ``reduction[lag] = 1 - D_after / D_before`` with D the structure function (squared RMS difference); positive means the
106
+ correction removed spatially correlated phase. ``median_reduction`` over the lags is the number to gate on.
107
+ """
108
+ sb = structure_function(before, valid, lags_px, wrapped, seed=seed)
109
+ sa = structure_function(after, valid, lags_px, wrapped, seed=seed)
110
+ red = {lag: (1.0 - (sa[lag] ** 2) / (sb[lag] ** 2)) if sb[lag] and np.isfinite(sb[lag]) and np.isfinite(sa[lag]) else float("nan")
111
+ for lag in lags_px}
112
+ finite = [v for v in red.values() if np.isfinite(v)]
113
+ return {
114
+ "lags_px": [int(l) for l in lags_px],
115
+ "rms_before": sb, "rms_after": sa, "reduction": red,
116
+ "median_reduction": float(np.median(finite)) if finite else float("nan"),
117
+ }
118
+
119
+
120
+ # ---------------------------------------------------------------------------------------------------
121
+ # geocoded model data and time interpolation
122
+ # ---------------------------------------------------------------------------------------------------
123
+ class GeoGrid:
124
+ """A regular lon/lat grid (north-up) that can be sampled bilinearly at arbitrary points. NaN outside it or where it has no data."""
125
+
126
+ def __init__(self, array: np.ndarray, transform, nodata: Optional[float] = None):
127
+ a = np.asarray(array, dtype=np.float64).copy()
128
+ if nodata is not None:
129
+ a[a == nodata] = np.nan
130
+ self.array = a
131
+ self.transform = transform
132
+ if abs(transform.b) > 1e-12 or abs(transform.d) > 1e-12:
133
+ raise ValueError("a rotated lon/lat grid is not supported")
134
+
135
+ @classmethod
136
+ def from_raster(cls, path, band: int = 1) -> "GeoGrid":
137
+ import rasterio
138
+
139
+ with rasterio.open(str(path)) as src:
140
+ if src.crs is not None and not src.crs.is_geographic:
141
+ raise ValueError(f"{path}: expected a geographic (lon/lat) grid, found {src.crs}")
142
+ return cls(src.read(band), src.transform, src.nodata)
143
+
144
+ def sample(self, lon: np.ndarray, lat: np.ndarray) -> np.ndarray:
145
+ from scipy.ndimage import map_coordinates
146
+
147
+ t = self.transform
148
+ col = (np.asarray(lon, dtype=np.float64) - t.c) / t.a - 0.5
149
+ row = (np.asarray(lat, dtype=np.float64) - t.f) / t.e - 0.5
150
+ h, w = self.array.shape
151
+ inside = (col >= 0) & (col <= w - 1) & (row >= 0) & (row <= h - 1)
152
+ out = np.full(col.shape, np.nan)
153
+ if inside.any():
154
+ out[inside] = map_coordinates(self.array, [row[inside], col[inside]], order=1, mode="nearest")
155
+ return out
156
+
157
+
158
+ def hour_weights(dt):
159
+ """Linear-in-time weights of the two ERA5 hours that bracket an acquisition time: ``[(hour_datetime, weight), ...]``.
160
+
161
+ ERA5 is hourly. Taking the hour by truncating the time (what a plain ``strftime('%H')`` does) is wrong by up to an hour;
162
+ the delay changes by millimetres per 30 minutes in a convective atmosphere.
163
+ """
164
+ from datetime import timedelta
165
+
166
+ h0 = dt.replace(minute=0, second=0, microsecond=0)
167
+ frac = (dt - h0).total_seconds() / 3600.0
168
+ out = [(h0, 1.0 - frac)]
169
+ if frac > 1e-9:
170
+ out.append((h0 + timedelta(hours=1), frac))
171
+ return [(h, w) for h, w in out if w > 1e-9]
172
+
173
+
174
+ def lowpass(phase: np.ndarray, valid: np.ndarray, sigma_px: float, wrapped: bool) -> np.ndarray:
175
+ """Valid-pixel-normalised Gaussian low-pass of a phase screen (complex mean if wrapped, plain mean if unwrapped)."""
176
+ if wrapped:
177
+ return smooth_complex(phase, valid, sigma_px)
178
+ from scipy.ndimage import gaussian_filter
179
+
180
+ v = np.asarray(valid, dtype=bool) & np.isfinite(phase)
181
+ num = gaussian_filter(np.where(v, phase, 0.0), sigma_px)
182
+ den = gaussian_filter(v.astype(np.float64), sigma_px)
183
+ out = num / np.maximum(den, 1e-12)
184
+ out[den < 1e-3] = np.nan
185
+ return out
186
+
187
+
188
+ # ---------------------------------------------------------------------------------------------------
189
+ # phase-height dependence
190
+ # ---------------------------------------------------------------------------------------------------
191
+ @dataclass
192
+ class HeightFit:
193
+ slope_rad_per_km: float
194
+ slope_se_rad_per_km: float
195
+ t_stat: float
196
+ partial_r2: Optional[float]
197
+ relief_m: float
198
+ n_used: int
199
+ degree: int
200
+ ramp: bool
201
+ wrapped: bool
202
+ coefficients: Dict[str, float]
203
+ h_ref_m: float
204
+ reason: str = ""
205
+
206
+ @property
207
+ def usable(self) -> bool:
208
+ return self.reason == ""
209
+
210
+ def component(self, heights: np.ndarray) -> np.ndarray:
211
+ """The height-dependent phase only (the ramp is estimated to keep it out of the height term, but is not returned)."""
212
+ hk = (np.asarray(heights, dtype=np.float64) - self.h_ref_m) / 1000.0
213
+ out = self.coefficients["h1"] * hk
214
+ if self.degree >= 2:
215
+ out = out + self.coefficients["h2"] * hk ** 2
216
+ return out
217
+
218
+ def to_dict(self) -> Dict[str, Any]:
219
+ d = {k: (float(v) if isinstance(v, (int, float, np.floating)) else v) for k, v in self.__dict__.items()
220
+ if k not in ("coefficients",)}
221
+ d["coefficients"] = {k: float(v) for k, v in self.coefficients.items()}
222
+ d["usable"] = self.usable
223
+ return d
224
+
225
+
226
+ def _huber_irls(X: np.ndarray, y: np.ndarray, n_iter: int = 12, k: float = 1.345) -> np.ndarray:
227
+ beta, *_ = np.linalg.lstsq(X, y, rcond=None)
228
+ for _ in range(n_iter):
229
+ r = y - X @ beta
230
+ s = 1.4826 * np.median(np.abs(r - np.median(r))) + 1e-12
231
+ u = np.abs(r) / (k * s)
232
+ w = np.where(u <= 1.0, 1.0, 1.0 / u)
233
+ sw = np.sqrt(w)
234
+ beta, *_ = np.linalg.lstsq(X * sw[:, None], y * sw, rcond=None)
235
+ return beta
236
+
237
+
238
+ def _design(x, y, hk, degree, ramp):
239
+ cols = [np.ones_like(hk)]
240
+ names = ["const"]
241
+ if ramp:
242
+ cols += [x, y]
243
+ names += ["x", "y"]
244
+ cols.append(hk)
245
+ names.append("h1")
246
+ if degree >= 2:
247
+ cols.append(hk ** 2)
248
+ names.append("h2")
249
+ return np.column_stack(cols), names
250
+
251
+
252
+ def fit_height_dependence(
253
+ phase: np.ndarray,
254
+ heights: np.ndarray,
255
+ valid: np.ndarray,
256
+ *,
257
+ wrapped: bool = False,
258
+ degree: int = 1,
259
+ ramp: bool = True,
260
+ exclude: Optional[np.ndarray] = None,
261
+ min_relief_m: float = 200.0,
262
+ min_pixels: int = 2000,
263
+ max_pixels: int = 60_000,
264
+ n_blocks: int = 4,
265
+ seed: int = 0,
266
+ ) -> HeightFit:
267
+ """Phase-versus-height slope with a ramp, robust to outliers, with a spatially-aware standard error.
268
+
269
+ Unwrapped phase: Huber-weighted least squares on ``a + b x + c y + s h`` (+ ``s2 h^2``). The ramp term stops a long-wavelength
270
+ trend from being credited to height wherever height and position are correlated. Wrapped phase: the slope that maximises the
271
+ resultant length of ``exp(i (phase - s h))`` (no ramp, and only degree 1 -- unwrap first when a ramp or curvature matters).
272
+
273
+ ``exclude`` masks pixels that must not drive the fit (known deformation, water, low coherence). The standard error comes
274
+ from a block jackknife over ``n_blocks x n_blocks`` spatial blocks, because pixels that share an atmosphere are not
275
+ independent and the textbook error from the residual variance is far too small.
276
+
277
+ The fit is *refused* (``usable == False`` with ``reason``) when the relief is below ``min_relief_m`` (nothing to
278
+ correlate with), when there are too few pixels, or when it cannot be estimated.
279
+ """
280
+ h_, w_ = phase.shape
281
+ ok = np.asarray(valid, dtype=bool) & np.isfinite(phase) & np.isfinite(heights)
282
+ if exclude is not None:
283
+ ok &= ~np.asarray(exclude, dtype=bool)
284
+ n_ok = int(ok.sum())
285
+
286
+ def refuse(reason, relief=float("nan")):
287
+ return HeightFit(float("nan"), float("nan"), float("nan"), None, relief, n_ok, degree, ramp, wrapped,
288
+ {"h1": 0.0}, float("nan"), reason)
289
+
290
+ if n_ok < min_pixels:
291
+ return refuse(f"only {n_ok} usable pixels (< {min_pixels})")
292
+ rr, cc = np.nonzero(ok)
293
+ hv = heights[rr, cc].astype(np.float64)
294
+ relief = float(np.percentile(hv, 95) - np.percentile(hv, 5))
295
+ if relief < min_relief_m:
296
+ return refuse(f"relief {relief:.0f} m (< {min_relief_m:.0f} m): no height range to correlate with", relief)
297
+ rng = np.random.default_rng(seed)
298
+ if n_ok > max_pixels:
299
+ pick = rng.choice(n_ok, max_pixels, replace=False)
300
+ rr, cc, hv = rr[pick], cc[pick], hv[pick]
301
+ pv = phase[rr, cc].astype(np.float64)
302
+ x = 2.0 * cc / max(w_ - 1, 1) - 1.0
303
+ y = 2.0 * rr / max(h_ - 1, 1) - 1.0
304
+ h_ref = float(hv.mean())
305
+ hk = (hv - h_ref) / 1000.0
306
+ blk = (np.minimum((rr * n_blocks) // h_, n_blocks - 1) * n_blocks + np.minimum((cc * n_blocks) // w_, n_blocks - 1))
307
+
308
+ if not wrapped:
309
+ X, names = _design(x, y, hk, degree, ramp)
310
+ beta = _huber_irls(X, pv)
311
+ i_h = names.index("h1")
312
+ slope = float(beta[i_h])
313
+ # partial R2: variance explained by the height terms beyond the ramp, on the robust residual scale
314
+ X0, _ = _design(x, y, hk * 0.0, 1, ramp)
315
+ X0 = X0[:, :-1]
316
+ b0 = _huber_irls(X0, pv)
317
+ rss = float(np.sum((pv - X @ beta) ** 2))
318
+ rss0 = float(np.sum((pv - X0 @ b0) ** 2))
319
+ pr2 = float(1.0 - rss / rss0) if rss0 > 0 else 0.0
320
+ jack = []
321
+ for b in np.unique(blk):
322
+ m = blk != b
323
+ if m.sum() < 5 * X.shape[1]:
324
+ continue
325
+ jack.append(_huber_irls(X[m], pv[m], n_iter=6)[i_h])
326
+ coef = {n: float(v) for n, v in zip(names, beta)}
327
+ else:
328
+ if degree != 1 or ramp:
329
+ logger.info("wrapped-phase height fit: degree 1, no ramp (unwrap for more)")
330
+ span = float(np.ptp(hv)) / 1000.0
331
+ max_slope = 25.0 * 2 * np.pi / max(span, 1e-3) # at most 25 fringes across the relief
332
+
333
+ def best_slope(pp, hh):
334
+ def flat(c):
335
+ return np.abs(np.mean(np.exp(1j * (pp[None, :] - c[:, None] * hh[None, :])), axis=1))
336
+
337
+ coarse = np.linspace(-max_slope, max_slope, 400)
338
+ b0_ = float(coarse[np.argmax(flat(coarse))])
339
+ fine = np.linspace(b0_ - (coarse[1] - coarse[0]), b0_ + (coarse[1] - coarse[0]), 200)
340
+ return float(fine[np.argmax(flat(fine))])
341
+
342
+ sub = rng.choice(len(hk), min(len(hk), 20_000), replace=False)
343
+ slope = best_slope(pv[sub], hk[sub])
344
+ r_full = float(np.abs(np.mean(np.exp(1j * (pv - slope * hk)))))
345
+ r_zero = float(np.abs(np.mean(np.exp(1j * pv))))
346
+ pr2 = float(max(0.0, 1.0 - (1 - r_full) / max(1 - r_zero, 1e-9)))
347
+ jack = []
348
+ for b in np.unique(blk):
349
+ m = np.flatnonzero(blk != b)
350
+ if m.size < 200:
351
+ continue
352
+ m = m[rng.choice(m.size, min(m.size, 8000), replace=False)]
353
+ jack.append(best_slope(pv[m], hk[m]))
354
+ coef = {"h1": slope}
355
+ if len(jack) < 4:
356
+ return refuse("too few spatial blocks for an error estimate", relief)
357
+ jack = np.asarray(jack)
358
+ n_b = len(jack)
359
+ se = float(np.sqrt((n_b - 1) / n_b * np.sum((jack - jack.mean()) ** 2)))
360
+ t = slope / se if se > 0 else float("inf")
361
+ return HeightFit(slope, se, float(t), pr2, relief, int(len(hk)), degree, bool(ramp and not wrapped), wrapped, coef, h_ref)
362
+
363
+
364
+ # ---------------------------------------------------------------------------------------------------
365
+ # network: the troposphere belongs to a date; DEM error scales with the baseline
366
+ # ---------------------------------------------------------------------------------------------------
367
+ @dataclass
368
+ class DateSlopes:
369
+ dates: List[str]
370
+ slope_rad_per_km: Dict[str, float]
371
+ beta_dem_scale: Optional[float] # relative DEM height error implied by the covariance of slope with baseline
372
+ beta_se: Optional[float]
373
+ n_dates_for_beta: int
374
+ pair_residual_rad_per_km: Dict[Tuple[str, str], float]
375
+ reference_date: str
376
+ rms_residual_rad_per_km: float
377
+ n_pairs: int
378
+
379
+ @property
380
+ def dem_error_suspected(self) -> bool:
381
+ """The date slopes covary with the dates' perpendicular baselines (needs >= 6 dates)."""
382
+ return (self.beta_dem_scale is not None and self.beta_se is not None and self.n_dates_for_beta >= 6
383
+ and abs(self.beta_dem_scale) > 3.0 * self.beta_se)
384
+
385
+
386
+ def _solve_date_values(pairs, values: Dict[Tuple[str, str], float], weights: Dict[Tuple[str, str], float], ref_d: str):
387
+ dates = sorted({d for p in pairs for d in p})
388
+ free = [d for d in dates if d != ref_d]
389
+ idx = {d: i for i, d in enumerate(free)}
390
+ A = np.zeros((len(pairs), len(free)))
391
+ y = np.zeros(len(pairs))
392
+ w = np.zeros(len(pairs))
393
+ for n, p in enumerate(pairs):
394
+ r, s = p
395
+ if s in idx:
396
+ A[n, idx[s]] += 1.0
397
+ if r in idx:
398
+ A[n, idx[r]] -= 1.0
399
+ y[n] = values[p]
400
+ w[n] = weights[p]
401
+ sol, *_ = np.linalg.lstsq(A * w[:, None], y * w, rcond=None)
402
+ return {ref_d: 0.0, **{d: float(sol[idx[d]]) for d in free}}, y - A @ sol, w
403
+
404
+
405
+ def estimate_height_slopes_per_date(
406
+ pair_fits: Dict[Tuple[str, str], Tuple[float, float]],
407
+ k1_rad_per_m: Optional[Dict[Tuple[str, str], float]] = None,
408
+ reference_date: Optional[str] = None,
409
+ ) -> DateSlopes:
410
+ """Per-date height slopes from per-pair slopes, and a test for a baseline-proportional (DEM) term.
411
+
412
+ The stratified troposphere belongs to a *date*: ``slope_rs = S_s - S_r``. Solving for the ``S_d`` (reference date fixed at
413
+ zero) by weighted least squares gives a correction that is consistent around loops, which separate per-pair fits are
414
+ not, and the pair residuals show which fits were outliers.
415
+
416
+ A DEM whose heights are wrong by a factor ``beta`` leaves ``k1 * beta * h`` of phase (``k1`` the topographic phase per
417
+ metre of height, proportional to the perpendicular baseline), i.e. a height slope that scales with the baseline, whereas
418
+ the troposphere has no reason to. A baseline term cannot be added to the pair model above, because a pair's baseline is the
419
+ difference of its two dates' baselines and the term would be absorbed by the free ``S_d``. So it is tested *after*: the same
420
+ network solve gives each date's baseline ``K_d`` relative to the reference (from ``k1_rad_per_m``), and ``beta`` is the slope
421
+ of ``S_d`` on ``1000 * K_d`` over the dates, with its standard error from the scatter. It needs about 6 dates or more to mean
422
+ anything; ``DateSlopes.dem_error_suspected`` encodes that.
423
+
424
+ ``pair_fits`` maps ``(ref, sec) -> (slope, standard_error)`` in rad/km; ``k1_rad_per_m`` the pairs' signed ``k1``.
425
+ """
426
+ pairs = [p for p, (s, e) in pair_fits.items() if np.isfinite(s) and np.isfinite(e) and e > 0]
427
+ dates = sorted({d for p in pairs for d in p})
428
+ if len(pairs) < 2 or len(dates) < 3:
429
+ raise ValueError("need at least 3 dates and 2 pairs to estimate per-date slopes")
430
+ ref_d = reference_date or dates[0]
431
+ if ref_d not in dates:
432
+ raise ValueError(f"reference date {ref_d} is not in the network")
433
+ vals = {p: pair_fits[p][0] for p in pairs}
434
+ wts = {p: 1.0 / pair_fits[p][1] for p in pairs}
435
+ S, res, w = _solve_date_values(pairs, vals, wts, ref_d)
436
+ beta = beta_se = None
437
+ n_beta = 0
438
+ if k1_rad_per_m is not None and all(p in k1_rad_per_m for p in pairs):
439
+ K, _, _ = _solve_date_values(pairs, {p: 1000.0 * k1_rad_per_m[p] for p in pairs}, wts, ref_d)
440
+ d_use = [d for d in dates if d != ref_d]
441
+ kx = np.array([K[d] for d in d_use])
442
+ sy = np.array([S[d] for d in d_use])
443
+ n_beta = len(d_use)
444
+ if n_beta >= 3 and np.ptp(kx) > 0:
445
+ X = np.column_stack([np.ones_like(kx), kx])
446
+ coef, *_ = np.linalg.lstsq(X, sy, rcond=None)
447
+ r = sy - X @ coef
448
+ s2 = float(np.sum(r ** 2) / max(n_beta - 2, 1))
449
+ beta = float(coef[1])
450
+ beta_se = float(np.sqrt(s2 / np.sum((kx - kx.mean()) ** 2)))
451
+ return DateSlopes(
452
+ dates=dates, slope_rad_per_km=S, beta_dem_scale=beta, beta_se=beta_se, n_dates_for_beta=n_beta,
453
+ pair_residual_rad_per_km={p: float(r_) for p, r_ in zip(pairs, res)}, reference_date=ref_d,
454
+ rms_residual_rad_per_km=float(np.sqrt(np.mean(res ** 2))), n_pairs=len(pairs),
455
+ )