jaxincell._plot¶
Functions¶
|
Production-ready plotting/animation for JAX-in-Cell outputs. |
Module Contents¶
- jaxincell._plot.plot(output, direction: str = 'x', threshold: float = 1e-12, save_mp4: str | None = None, fps: int = 30, dpi: int = 150, show: bool = True, animation_interval: int = 1, save_stride: int = 1, save_dpi: int | None = None, save_crf: int | None = None, save_preset: str | None = None, save_codec: str | None = None)¶
Production-ready plotting/animation for JAX-in-Cell outputs.
- What you get:
Heatmaps (x vs time): E, B (nonzero components), charge density. - IMPORTANT: heatmap color limits are fixed over the whole run using a robust
percentile, so growth/decay in time is visible (no per-frame re-normalization).
Instantaneous E(x,t) overlay: - For each plotted electric-field component, we draw a line on top of the heatmap. - The line is normalized by a single GLOBAL robust scale over the whole run,
so amplitude growth is visible.
Overlay axes have no ticks (prevents clashes with colorbars).
Distribution functions f(v,t) (LAB FRAME; NO drift centering): - Shown as clean line plots in their own subplot(s) (no current-density heatmap). - Solid: current frame - Dashed: initial (t=0), labeled “(initial)”
Phase space (x vs v) for electrons and ions for each requested component: - Uses a robust velocity range per species per component, so ion dynamics remains visible. - Uses LogNorm on counts (with +1 internally) so low-density structure is visible.
- Multi-species:
Uses diagnostics() legacy split if present (velocity_electrons/velocity_ions).
Otherwise combines output[“species”] by charge sign (q<0 as electrons, q>0 as ions).