visualdynamics.plot.shocks¶
shocks
¶
Shock windows marked on the time history they were found in.
A shock window is a span of the record, the windows do not overlap, and each one is a single event. Each is drawn as a shaded region with its number on it, so that "shock 3" in a table of spectra can be matched to one of the events on the time history.
The regions can be dragged, because the detection is an estimate: a
window that starts a little late, or ends before the ringdown is over,
is corrected by moving its edge instead of changing the threshold. A
window is held to its neighbors and cannot be dragged over one. With
locked the regions cannot be dragged, which is what a report or a
plot saved to a file uses.
Classes:
| Name | Description |
|---|---|
ShockOverlay |
The shock windows on one plot, and dragging them. |
Classes¶
ShockOverlay
¶
ShockOverlay(plot: Any, shocks: Sequence[Shock], colors: Mapping[str, str], changed: Callable[..., None] | None = None, locked: bool = False, common: bool = False, limit: float | None = None, origin: float = 0.0)
The shock windows on one plot, and dragging them.
The overlay owns only its own plot items. The shocks are stored on
the time history; the overlay is given them and calls changed with
the new list when one is dragged. changed is a callback and not a
Qt signal because the overlay is not a QObject: it is a few items on
another object's plot and is removed with that plot.
With common the series is held at one length, so resizing any
window resizes all of them; limit is the end of the record in
seconds, which a shared length cannot pass. origin is the time of
the record's first sample, the zero the shocks' start times count
from.
Methods:
| Name | Description |
|---|---|
set_shocks |
Draw these shocks in place of the current ones, without redrawing the plot. |