tsdive.SpcAnalysis
dataclass
¶
SpcAnalysis(
baseline: Window,
monitor: Window,
limits: ControlLimits,
sigma: float,
n_monitored: int,
hits: list[RuleHit],
)
An individuals chart: limits from the baseline, rule hits in the window.
frame holds one row per rule hit: timestamp, rule,
detail.
Methods:
| Name | Description |
|---|---|
render |
The report |
to_dict |
The document |
Attributes:
| Name | Type | Description |
|---|---|---|
baseline |
Window
|
|
monitor |
Window
|
|
limits |
ControlLimits
|
|
sigma |
float
|
|
n_monitored |
int
|
|
hits |
list[RuleHit]
|
|
identity |
TagIdentity
|
|
frame |
DataFrame
|
|
render
¶
render() -> str
The report tsdive spc prints for this window, without colour.
Examples:
>>> import tsdive
>>> c = tsdive.spc("data/demo/fic101_demo.parquet",
... "2024-03-30T20:00:00Z/2024-03-31T01:00:00Z",
... "2024-03-31T01:00:00Z/2024-03-31T06:00:00Z")
>>> print(c.render().splitlines()[0])
demo:FIC101.PV 37 rule hits in 300 samples
to_dict
¶
to_dict() -> dict[str, object]
The document tsdive spc --json prints, ready for json.dumps.
The command adds result_kind and tsdive_version in front.