Skip to content

GEOPY-3010: Revert topography definition to cell bottom for DC and MT inversions - #455

Merged
domfournier merged 5 commits into
developfrom
GEOPY-3010
Jul 29, 2026
Merged

GEOPY-3010: Revert topography definition to cell bottom for DC and MT inversions#455
domfournier merged 5 commits into
developfrom
GEOPY-3010

Conversation

@domfournier

@domfournier domfournier commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

GEOPY-3010 - Revert topography definition to cell bottom for DC and MT inversions

Copilot AI review requested due to automatic review settings July 29, 2026 15:15
@github-actions github-actions Bot changed the title GEOPY-3010 GEOPY-3010: Revert topography definition to cell bottom for DC and MT inversions Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" when forced_to_surface is enabled.
  • Refresh hard-coded regression targets across DC/MT/IP-related run tests to match updated outputs.
  • Format diagnostic printing in check_target using 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.

Comment thread simpeg_drivers/components/topography.py
gmcga
gmcga previously approved these changes Jul 29, 2026

@gmcga gmcga left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as long as the tests are passing.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.29%. Comparing base (295f324) to head (f78dbf5).

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     
Files with missing lines Coverage Δ
simpeg_drivers/components/topography.py 92.98% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@domfournier
domfournier merged commit 23da748 into develop Jul 29, 2026
18 checks passed
@domfournier
domfournier deleted the GEOPY-3010 branch July 29, 2026 20:17
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.

3 participants