Skip to content

GEOPY-2874: Use cyclic colormap by default for declination angle model#417

Open
domfournier wants to merge 3 commits into
release/GA_4.8from
GEOPY-2874
Open

GEOPY-2874: Use cyclic colormap by default for declination angle model#417
domfournier wants to merge 3 commits into
release/GA_4.8from
GEOPY-2874

Conversation

@domfournier
Copy link
Copy Markdown
Collaborator

@domfournier domfournier commented May 25, 2026

GEOPY-2874 - Use cyclic colormap by default for declination angle model

Copilot AI review requested due to automatic review settings May 25, 2026 20:33
@github-actions github-actions Bot changed the title GEOPY-2874 GEOPY-2874: Use cyclic colormap by default for declination angle model May 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 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 via SaveModelGeoH5 keyword arguments.
  • Add a test assertion that the declination model’s entity_type.color_map.name is twilight.TBL.
  • Adjust the test workspace usage to keep a Workspace handle 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_output is passed the file path while ws is already open. In tests/utils/targets.py, get_inversion_output opens a new Workspace(h5file) when given a path and does not close it, which can leak file handles and double-open the same .geoh5. Prefer passing the existing ws instance (or update get_inversion_output to 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.

Comment thread simpeg_drivers/components/factories/directives_factory.py
Comment thread simpeg_drivers/components/factories/directives_factory.py
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (42b7155) to head (7f1bb0d).

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              
Files with missing lines Coverage Δ
...drivers/components/factories/directives_factory.py 95.61% <100.00%> (+0.12%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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