Improve dipole source tests - #1711
Merged
Merged
Conversation
Compare the root mean square of the difference between the expected and the actual values of the resulting fields. Related to #1709
Just to see if the tests passes when we compare them element-wise.
santisoler
marked this pull request as draft
October 10, 2025 18:46
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1711 +/- ##
==========================================
- Coverage 85.91% 85.91% -0.01%
==========================================
Files 418 418
Lines 54559 54561 +2
Branches 5206 5206
==========================================
Hits 46877 46877
- Misses 6279 6280 +1
- Partials 1403 1404 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jcapriot
approved these changes
Oct 11, 2025
jcapriot
left a comment
Member
There was a problem hiding this comment.
These look like they’ll be much more effective as tests.
lheagy
approved these changes
Oct 12, 2025
lheagy
left a comment
Member
There was a problem hiding this comment.
Yep, good call. Many thanks @santisoler!!
santisoler
marked this pull request as ready for review
October 14, 2025 18:48
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.
Summary
Improve the assertions in dipole source tests for EM. Compute the root mean square of the difference between the numerical and analytic fields in FDEM, and check it's below a certain tolerance. Use
np.testing.assert_allclosein TDEM tests to compare the predicted data for both the B and H formulations.PR Checklist
expect style.
to a Pull Request
@simpeg/simpeg-developerswhen ready for review.Reference issue
Related to #1709
What does this implement/fix?
Additional information