Sanitize fire time-hull mesh inputs to prevent disappearing Plotly meshes#212
Merged
Sanitize fire time-hull mesh inputs to prevent disappearing Plotly meshes#212
Conversation
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.
Motivation
fire_plotrenders that disappear when the Plotly scene is interacted with, which is consistent with unstable WebGL behavior caused by non-finite mesh arrays.plot_climate_filled_hullrobust to imperfect hull geometry (NaNs or invalid triangle references) so visualizations remain stable.Description
_sanitize_mesh_inputstoplot_climate_filled_hullwhich drops vertices with non-finite coordinates or per-vertex times, remaps triangle indices after compaction, and discards triangles that reference removed or out-of-bounds vertices, with clear errors if nothing renderable remains.test_plot_climate_filled_hull_drops_nonfinite_vertices_and_remaps_tristhat injects a NaN vertex and asserts the producedMesh3darrays are finite, in-bounds, and thatintensitylength matches the surviving vertex count.Testing
pytest tests/test_fire_hull_viewer_scalars.py -qwhich passed.pytest tests/test_fire_plot_cube_first.py tests/test_gridmet_safety.py -qwhich passed.Codex Task