tud_lbm.io.plotting.figure_builder ================================== .. py:module:: tud_lbm.io.plotting.figure_builder .. autoapi-nested-parse:: Build composite per-timestep figures from registered plot operators. Classes ------- .. autoapisummary:: tud_lbm.io.plotting.figure_builder.FigureBuilder Module Contents --------------- .. py:class:: FigureBuilder(config: tud_lbm.config.SimulationConfig, run_dir: str | os.PathLike, dpi: int = 150, fields: list[str] | None = None) Build and save composite figures for saved simulation snapshots. .. py:attribute:: config .. py:attribute:: run_dir .. py:attribute:: dpi :value: 150 .. py:property:: data_dir :type: pathlib.Path Directory containing timestep ``.npz`` files. .. py:property:: plot_dir :type: pathlib.Path Directory where generated plots are written. .. py:property:: field_operators :type: list Configured field plot operators. .. py:property:: analysis_operators :type: list Configured analysis plot operators. .. py:method:: sorted_timed_files() -> list[tuple[int, pathlib.Path]] Return ``(timestep, path)`` pairs sorted by timestep. .. py:method:: build_analysis() -> list[pathlib.Path] Build standalone analysis figures from all saved snapshots. .. py:method:: build_csv() -> pathlib.Path | None Run registry-selected export analysis operators. Returns the last non-``None`` output path (if any). .. py:method:: render_figure(data: dict[str, numpy.ndarray], timestep: int, history_files: list[pathlib.Path] | None = None) -> matplotlib.pyplot.Figure | None Render one timestep into a Figure without saving it. .. py:method:: build(data: dict[str, numpy.ndarray], timestep: int, filename: str | None = None) -> pathlib.Path | None Render one timestep figure and save it to disk. .. py:method:: build_all(skip: int = 0) -> list[pathlib.Path] Build figures for every saved timestep file under data/. .. py:method:: layout(n: int) -> tuple[int, int] :staticmethod: Public wrapper for selecting a compact subplot layout.