GEOPY-3010: Revert topography definition to cell bottom for DC and MT inversions - #455
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts how active cells are computed beneath topography by switching the topography reference from cell centers to cell bottoms for a subset of inversions, and updates regression targets accordingly to match the new inversion results.
Changes:
- Update
active_from_xyz(..., grid_reference=...)to use"bottom"whenforced_to_surfaceis enabled. - Refresh hard-coded regression targets across DC/MT/IP-related run tests to match updated outputs.
- Format diagnostic printing in
check_targetusing scientific notation for easier comparison/debugging.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/targets.py | Formats printed output metrics in scientific notation. |
| tests/run_tests/driver_mt_test.py | Updates MT inversion regression target values. |
| tests/run_tests/driver_joint_cross_gradient_test.py | Updates joint inversion regression targets and expected scaling/multiplier arrays. |
| tests/run_tests/driver_ip_test.py | Updates IP 3D regression target values. |
| tests/run_tests/driver_ip_2d_test.py | Updates IP 2D regression target values. |
| tests/run_tests/driver_dc_test.py | Updates DC 3D regression target values. |
| tests/run_tests/driver_dc_2d_test.py | Updates DC 2D regression target values. |
| tests/run_tests/driver_dc_2d_rotated_gradients_test.py | Updates DC rotated-gradients regression target values. |
| simpeg_drivers/components/topography.py | Changes active-cell masking to reference cell bottoms (conditional on forced_to_surface). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gmcga
previously approved these changes
Jul 29, 2026
gmcga
left a comment
There was a problem hiding this comment.
Looks good as long as the tests are passing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #455 +/- ##
===========================================
+ Coverage 90.27% 90.29% +0.02%
===========================================
Files 113 113
Lines 7020 7020
Branches 865 865
===========================================
+ Hits 6337 6339 +2
+ Misses 466 465 -1
+ Partials 217 216 -1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GEOPY-3010 - Revert topography definition to cell bottom for DC and MT inversions