Skip to content

Add function to plot all maps#215

Open
mhliu0001 wants to merge 3 commits intomasterfrom
plot_maps
Open

Add function to plot all maps#215
mhliu0001 wants to merge 3 commits intomasterfrom
plot_maps

Conversation

@mhliu0001
Copy link
Contributor

This PR adds the function to plot all maps used in the simulation of a context. Solves #105.

To use this feature:

import appletree as apt 
from appletree.plot import plot_maps
# Set up a context
context = apt.ContextRn220()

# Plot all maps (3D maps are skipped unless collapsed)
figures = plot_maps(context)

# Collapse a 3D map to 2D by averaging over the z axis
figures = plot_maps(context, collapse={"s1_correction": {"z": None}})

# Collapse with a range selection on z
figures = plot_maps(
    context,
    collapse={"s1_correction": {"z": (-100, -50)}},
)

# Save all figures to disk
plot_maps(
    context,
    collapse={"s1_correction": {"z": None}},
    save=True,
    save_path="./map_plots",
    fmt=["png", "pdf"],
)

@mhliu0001 mhliu0001 requested a review from dachengx February 13, 2026 03:19
@coveralls
Copy link

coveralls commented Feb 13, 2026

Pull Request Test Coverage Report for Build 21973345323

Details

  • 135 of 199 (67.84%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.0%) to 83.232%

Changes Missing Coverage Covered Lines Changed/Added Lines %
appletree/plot.py 135 199 67.84%
Totals Coverage Status
Change from base Build 21965575783: -1.0%
Covered Lines: 2606
Relevant Lines: 3131

💛 - Coveralls

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.

2 participants