Repository navigation
feat: viz layer + postprocess + attribution workflow (close gap G) - #4
Merged
Merged
Conversation
…ib stays optional)
…ng-rate docstring (code review)
…utionResult satisfies it
…cies -> DISORT -> all plots + attribution)
- ci.yml: install .[dev,plot] so matplotlib-backed viz tests run
- test_bulk_species: importorskip('Aerosol3D') (aerosol3d absent in CI)
- aerosol.py: OpacPresetName(str, Enum) -> StrEnum (ruff UP042)
- scene.py: set_satellite passed 'source' twice -> build defaults dict
(fixes 'SourceConfig() got multiple values for source')
- test_composite_aerosol_unit: np.trapz -> np.trapezoid (numpy 2.x)
- test_postprocess_grid: drop unused xarray import (F401)
- ruff format (12 files)
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
Implements the missing plotting layer (spec gap G) plus its post-processing and attribution-orchestration support.
New
pyradtran/viz/— pure data-in→fig-out plotting (no Runner/libRadtran coupling); matplotlib lazy-imported via theplotextra:rt.py: plot_spectral, plot_flux_profile, plot_budget, plot_heating_rate, plot_rt_overviewcomposite.py: plot_composite_optics, plot_block_profilesattribution.py: plot_component_attribution (LEGO "killer plot")_style.py: publication-grade theme + colorblind-safe palettecore/postprocess.py— pure dataset transforms: add_budget_vars/compute_budget (T/R/A), evaluate_composite_on_grid, evaluate_blocks_on_gridworkflow/attribution.py— compute_component_attribution (leave-one-out, N+1 runs)examples/multicomponent_viz/run_demo.py— self-contained comprehensive demo (MieSpecies → DISORT → all plots + attribution)Changed
core/output_parser.py— retain physical zout altitudes (resolve_zout_tokens: "toa"→km);HEATING_RATE_COLUMNconstantcore/runner.py— thread resolved zout intoparse_outputoptics/mie.py— numpy 2.x compat (_trapzshim;np.trapzremoved in 2.0)Tests
29/29 viz/postprocess/workflow/public-API (synthetic data, headless, no libRadtran). Optics suite unblocked by the mie fix (52 pass; 3 pre-existing test-file
np.trapzfailures out of scope).Known limitations
heating_rate="local"emits no heating column here (open item O1).Runner.execute_manyswallows per-scene exceptions and fails onCompositeAerosol(ProcessPoolExecutor pickling) — flagged for a separate fix; the workflow's injectedexecute_manylets callers run sequentially.