Skip to content

Fix fire vase hull scalar mapping and restore legible custom rendering#208

Merged
ttuff merged 3 commits into
mainfrom
codex/fix-fire-hull-viewer-rendering-issues
Mar 27, 2026
Merged

Fix fire vase hull scalar mapping and restore legible custom rendering#208
ttuff merged 3 commits into
mainfrom
codex/fix-fire-hull-viewer-rendering-issues

Conversation

@ttuff

@ttuff ttuff commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • The custom fire-hull renderer regressed: the vase appeared vertically squished and the hull coloring collapsed to a mostly uniform purple, indicating scalar-to-geometry mapping and display-normalization problems.
  • The change aims to repair the rendering pipeline (data -> scalar -> normalization -> mapping -> interpolation -> shading -> projection) for the fire vase while preserving the improved custom interaction model and keeping fixes narrowly scoped to the fire viewer path.

Description

  • Map climate scalars to mesh vertices by mesh layer / vertex packing order (repeat per time-ring) in plot_climate_filled_hull to ensure per-vertex alignment with verts_km instead of indexing via raw t_days_vert. (See src/cubedynamics/fire_time_hull.py.)
  • Add robust display-only normalization using percentile clipping (default 2nd–98th percentiles with finite fallbacks) and handle NaNs so outliers do not collapse the colormap range. (Renderer-side and fire_plot defaults in src/cubedynamics/verbs/fire.py.)
  • Enable interpolation and correct color attachment by setting intensitymode="vertex" and keeping flatshading=False, and add a developer diagnostic scalar_debug_mode="z" to color by z (time) for vertical-banding verification. (See src/cubedynamics/fire_time_hull.py.)
  • Restore legibility via a display-only z_exaggeration parameter applied to the Plotly scene aspectratio so the vase reads taller without mutating scientific coordinates, and reduce scene scaffolding (background/grid/zeroline suppressed) for a cleaner presentation. (Exposed through fire_plot and forwarded to the hull renderer.)
  • Add a focused unit test file tests/test_fire_hull_viewer_scalars.py to verify scalar-to-vertex ordering, the z diagnostic mapping, and that z_exaggeration is applied.

Testing

  • Added tests in tests/test_fire_hull_viewer_scalars.py which validate layer-ordered scalar attachment, scalar_debug_mode="z", and z_exaggeration application.
  • Ran the targeted test command pytest -q tests/test_fire_hull_viewer_scalars.py tests/test_fire_plot_cube_first.py and all tests passed in this environment.
  • The PR changes are limited to src/cubedynamics/fire_time_hull.py, src/cubedynamics/verbs/fire.py, and the new test file tests/test_fire_hull_viewer_scalars.py.

Codex Task

@ttuff ttuff merged commit 13d46c1 into main Mar 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant