vibe-sketcherDocumentation

vibesketcher.render.porosity

Publication figure of a geometric pore-size distribution (#206).

Drawn from a vibesketcher.document.porosity estimate: the PSD as bars (the stated normalisation per bin), the cumulative curve on the right axis, and provenance lines naming the structure digest, probe, radius table, grid, outcome and the label “geometric planning estimate”. Styling follows the powder overlays: white background, Arial/Helvetica, SVG with PDF/PNG through the publication extra. A distribution without volume is refused, never drawn empty.

Functions

psd_figure(result[, options, fmt, dpi])

SVG, or PDF/PNG through the publication extra.

psd_svg(result[, options])

The PSD figure as standalone SVG (UTF-8).

Classes

PsdFigureOptions(*[, quantity, cumulative, ...])

What the figure shows; every choice is stated.

class vibesketcher.render.porosity.PsdFigureOptions(*, quantity='fraction', cumulative=True, width=640, height=400, title=None, provenance=True)[source]

Bases: BaseModel

What the figure shows; every choice is stated.

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

quantity: Literal['fraction', 'density_per_angstrom']

Bars as the bin fraction or as the density per angstrom of diameter.

cumulative: bool
width: float
height: float
title: str | None
provenance: bool
vibesketcher.render.porosity.psd_svg(result, options=None)[source]

The PSD figure as standalone SVG (UTF-8).

Parameters:
Return type:

bytes

vibesketcher.render.porosity.psd_figure(result, options=None, fmt='svg', *, dpi=300)[source]

SVG, or PDF/PNG through the publication extra.

Parameters:
Return type:

bytes