Skip to content

hertzforge.drawing.viz.marks

marks

Drawing decisions for marks: what a figure needs to know, with none of the code that draws it.

Functions:

Name Description
averaging_stage_geometry

The averaging as plain stage geometry, with no VTK and no Qt.

shock_stage_geometry

Each shock's analysis window as plain stage geometry: a dict whose

Classes

Functions:

averaging_stage_geometry

averaging_stage_geometry(averaging: Averaging, sample_rate: float, extents: Sequence[float], origin: float = 0.0) -> dict[str, Any]

The averaging as plain stage geometry, with no VTK and no Qt.

These are the numbers that add_averaging_marks puts into a plotter and that the report's canvas figure draws for itself: the analyzed span, and for each frame the rail's baseline, the stage x of the window's sampled points, their weights, the glyph height at each, and the x of the two end caps. They are computed in one place so the two views cannot disagree about where a frame is.

extents are the stage's real ranges (x0, x1, z0, z1), and origin is the record's start time in seconds, since frames are placed on the record's own clock. Everything returned is in stage coordinates: x across, wall for the depth of the back wall the rail is drawn on, z up. Returns span, wall, cap (the end caps' half height), fade (FADE_OPACITY) and frames.

shock_stage_geometry

shock_stage_geometry(shocks: Sequence[Any], extents: Sequence[float], origin: float = 0.0) -> dict[str, Any]

Each shock's analysis window as plain stage geometry: a dict whose windows each hold the slab's span in stage x and its label, the event's number counted from 1. The 3-D counterpart of the regions in plot/shocks.py, used by both the app's stage and the report's canvas, as the averaging's geometry is. The shocks' times are measured from origin, the record's start.