Skip to content

Harden transient validation notebook with decoupled methods and runtime parameter reporting#108

Open
ehavazli wants to merge 13 commits into
mainfrom
decouple-validation-methods
Open

Harden transient validation notebook with decoupled methods and runtime parameter reporting#108
ehavazli wants to merge 13 commits into
mainfrom
decouple-validation-methods

Conversation

@ehavazli

Copy link
Copy Markdown
Collaborator

Harden transient validation notebook with decoupled methods and runtime parameter reporting

Decouples Method 1 (GNSS-InSAR) and Method 2 (noise-level) validation flows so each can fail independently without breaking the entire notebook. Key improvements:

  • Independent method execution: Each validation method runs in isolation with dedicated success flags (method1_ok, method2_ok) and failure handlers, eliminating cascading failures
  • Runtime parameter reporting: Validation reports now display actual runtime values (e.g., selected GNSS reference station) under standard parameter names instead of showing configured values with parallel effective_* fields
  • Centralized validation parameters: Consolidated hardcoded thresholds (coherence, distance bins, pass criteria) into single configuration cell for easier tuning
  • Duplicate code removal: Eliminated redundant network modification cells and date pair filtering logic
  • Command injection hardening: Converted shell string commands to list-based subprocess.run() calls throughout correction setup and reference point flows
  • Error handling balance: Added try/except blocks to Method 2 matching Method 1's existing protection
  • Separate summaries: Method 1 and Method 2 generate independent summary strings and output directories

Fixes validation report parameter confusion where users couldn't tell which GNSS station was actually used vs what was configured, and prevents notebook crashes when one method fails.

ehavazli added 13 commits June 8, 2026 15:28
Method 1 (GNSS-InSAR comparison) can now fail without blocking Method 2 (noise level validation).

Changes:
- Wrap Method 1 computation (cells 84-88) in try-except block
- Guard Method 1 display/save cells with `if method1_ok:` check
- Remove Method 2 dependencies on Method 1 variables:
  - Use `n_ifgs_method2 = len(ifgs_date)` instead of `len(ddiff_dist_ap1)`
  - Use `range(n_ifgs_method2)` instead of `displacement.index` iteration
- Method 2 creates own `run_date_method2` and `method2_summary`
- Appendix plots (cells 150-153) guarded with `if method1_ok:`

Result: Run All continues to Method 2 even when Method 1 fails (e.g., insufficient GNSS stations).
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant