tud_lbm.io.plotting.figure_builder

Build composite per-timestep figures from registered plot operators.

Classes

FigureBuilder

Build and save composite figures for saved simulation snapshots.

Module Contents

class tud_lbm.io.plotting.figure_builder.FigureBuilder(config: tud_lbm.config.SimulationConfig, run_dir: str | os.PathLike, dpi: int = 150, fields: list[str] | None = None)[source]

Build and save composite figures for saved simulation snapshots.

config[source]
run_dir[source]
dpi = 150[source]
property data_dir: pathlib.Path[source]

Directory containing timestep .npz files.

property plot_dir: pathlib.Path[source]

Directory where generated plots are written.

property field_operators: list[source]

Configured field plot operators.

property analysis_operators: list[source]

Configured analysis plot operators.

sorted_timed_files() list[tuple[int, pathlib.Path]][source]

Return (timestep, path) pairs sorted by timestep.

build_analysis() list[pathlib.Path][source]

Build standalone analysis figures from all saved snapshots.

build_csv() pathlib.Path | None[source]

Run registry-selected export analysis operators.

Returns the last non-None output path (if any).

render_figure(data: dict[str, numpy.ndarray], timestep: int, history_files: list[pathlib.Path] | None = None) matplotlib.pyplot.Figure | None[source]

Render one timestep into a Figure without saving it.

build(data: dict[str, numpy.ndarray], timestep: int, filename: str | None = None) pathlib.Path | None[source]

Render one timestep figure and save it to disk.

build_all(skip: int = 0) list[pathlib.Path][source]

Build figures for every saved timestep file under data/.

static layout(n: int) tuple[int, int][source]

Public wrapper for selecting a compact subplot layout.