bloc.plotting.stability_map#
Shared palette and isoline machinery for carbon stability maps.
Single source of truth for the CH4 reactor-map figures
(sandbox/ch4_reactor_map/plot_common.py) and the live Trajectory Dashboard
(bloc.plotting.trajectory_dashboard), so the static PNG maps and the
interactive dashboard draw identical isolines from the same data and share
the GUI’s species palette.
Attributes#
Functions#
|
Return the isoline levels actually reached by the scalar field z. |
|
Interpolate + smooth the trajectory point cloud into a contourable grid. |
Module Contents#
- bloc.plotting.stability_map.CATEGORY_COLORS: Dict[str, str]#
- bloc.plotting.stability_map.LINE_COLOR = '#1a1a1a'#
- bloc.plotting.stability_map.SOLID_CARBON_ISOLINE_LEVELS_PCT = [10, 20, 30, 40, 50, 60, 70, 80, 90]#
- bloc.plotting.stability_map.active_isoline_levels(z, levels_pct=None)#
Return the isoline levels actually reached by the scalar field z.
- bloc.plotting.stability_map.isoline_grid(x, log_tau, z, *, grid_n=240, sigma=5.0, support=0.5)#
Interpolate + smooth the trajectory point cloud into a contourable grid.
(x, log_tau, z)are per-sample trajectory states (temperature axis,log10residence time, scalar field). A regulargrid_n``² grid is linearly interpolated from the cloud, then smoothed with a NaN-aware Gaussian filter: the data and the valid-mask are smoothed separately and divided, keeping only cells with mask weight above ``supportso contours do not bleed past the reachable region.Returns
(xi, yi, grid_z)withxi/yithe 1-D grid axes (yiinlog10 tau), orNonewhen no meaningful grid can be built (degenerate/collinear cloud, or interpolation produced no finite values).