GEOPY-2874: Use cyclic colormap by default for declination angle model#417
Open
domfournier wants to merge 3 commits into
Open
GEOPY-2874: Use cyclic colormap by default for declination angle model#417domfournier wants to merge 3 commits into
domfournier wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the magnetic vector model-saving path to assign a cyclic colormap (Matplotlib twilight) to the declination angle model outputs, and adds a regression assertion to ensure the produced declination model uses the expected colormap in the generated .geoh5.
Changes:
- Assign a
ColorMap(name="twilight.TBL", ...)to the saved angle model outputs viaSaveModelGeoH5keyword arguments. - Add a test assertion that the declination model’s
entity_type.color_map.nameistwilight.TBL. - Adjust the test workspace usage to keep a
Workspacehandle available for inspecting produced entities.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
simpeg_drivers/components/factories/directives_factory.py |
Adds a DataType/ColorMap override for magnetic vector model channels to default angle outputs to a cyclic colormap. |
tests/run_tests/driver_mvi_pde_test.py |
Adds a regression assertion on the declination model colormap and opens the output workspace for inspection. |
Comments suppressed due to low confidence (1)
tests/run_tests/driver_mvi_pde_test.py:151
get_inversion_outputis passed the file path whilewsis already open. Intests/utils/targets.py,get_inversion_outputopens a newWorkspace(h5file)when given a path and does not close it, which can leak file handles and double-open the same .geoh5. Prefer passing the existingwsinstance (or updateget_inversion_outputto close workspaces it creates).
output = get_inversion_output(
driver.params.geoh5.h5file, driver.params.out_group.uid
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/GA_4.8 #417 +/- ##
==================================================
+ Coverage 90.43% 90.44% +0.01%
==================================================
Files 110 110
Lines 6535 6542 +7
Branches 827 827
==================================================
+ Hits 5910 5917 +7
Misses 413 413
Partials 212 212
🚀 New features to boost your workflow:
|
benk-mira
approved these changes
May 26, 2026
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-2874 - Use cyclic colormap by default for declination angle model