chaotic_pfc.analysis.sweep_plotting_3d

sweep_plotting_3d.py

Plotly-based 3-D visualisation of a stack of Kaiser β-sweeps.

Aggregates a directory of per-β .npz checkpoints (produced by chaotic-pfc run sweep beta-sweep) into a single 3-D volume λ_max(N_z, ω_c, β) and renders it as an interactive surface stack.

Plotly is an optional dependency declared under the viz3d extra: install with pip install -e .[viz3d]. Importing this module without Plotly installed will raise an actionable ImportError.

Functions

aggregate_beta_sweeps(data_dir)

Load every per-β sweep under data_dir into a single volume.

plot_3d_beta_volume(h_volume, betas, orders, ...)

Render a stack of λ_max surfaces, one per β.

chaotic_pfc.analysis.sweep_plotting_3d.aggregate_beta_sweeps(data_dir)[source]

Load every per-β sweep under data_dir into a single volume.

Parameters:

data_dir (str | Path) – Root directory containing one sub-directory per β, each with a variables_lyapunov.npz file (matches the layout produced by run sweep beta-sweep).

Returns:

  • h_volume (ndarray, shape (Nbeta, Ncoef, Ncut)) – λ_max indexed by (β, order, cutoff).

  • betas (ndarray, shape (Nbeta,)) – β values, sorted ascending.

  • orders (ndarray)

  • cutoffs (ndarray)

Return type:

tuple[ndarray[tuple[Any, …], dtype[_ScalarT]], ndarray[tuple[Any, …], dtype[_ScalarT]], ndarray[tuple[Any, …], dtype[_ScalarT]], ndarray[tuple[Any, …], dtype[_ScalarT]]]

Notes

Sweeps with incompatible grids (e.g. bandstop vs lowpass, which use different order ranges) are grouped separately. The function returns the largest group and logs a warning when sweeps are skipped.

chaotic_pfc.analysis.sweep_plotting_3d.plot_3d_beta_volume(h_volume, betas, orders, cutoffs, save_path=None)[source]

Render a stack of λ_max surfaces, one per β.

Each β contributes a 2-D heat-coloured surface placed at altitude z = β over the (N_z, ω_c) plane. The user can rotate, zoom and pick the slice they want in the browser.

Parameters:
Return type:

plotly.graph_objects.Figure