tsdive.ScreenAnalysis
dataclass
¶
ScreenAnalysis(
baseline: Window,
monitor: Window,
result: ScreenResult,
k: float,
*,
mode_path: str | None = None,
provisional: ProvisionalBaseline | None = None,
regimes: dict[str, RegimeBaseline] | None = None,
alignment: tuple[Alignment, Alignment] | None = None,
)
One screen, whether it used one baseline or one per regime.
provisional and regimes are the two ways a baseline is built;
exactly one is populated, and both the text and the JSON read the same
object rather than screening the window twice. frame holds the
monitored rows the screen flagged.
Methods:
| Name | Description |
|---|---|
render |
The report |
to_dict |
The document |
Attributes:
| Name | Type | Description |
|---|---|---|
baseline |
Window
|
|
monitor |
Window
|
|
result |
ScreenResult
|
|
k |
float
|
|
mode_path |
str | None
|
|
provisional |
ProvisionalBaseline | None
|
|
regimes |
dict[str, RegimeBaseline] | None
|
|
alignment |
tuple[Alignment, Alignment] | None
|
|
identity |
TagIdentity
|
|
frame |
DataFrame
|
|
render
¶
render() -> str
The report tsdive screen prints for this window, without colour.
Examples:
>>> import tsdive
>>> s = tsdive.screen("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(s.render().splitlines()[0])
demo:FIC101.PV flagged 29 of 300 (9.7%)
to_dict
¶
to_dict() -> dict[str, object]
The document tsdive screen --json prints, ready for json.dumps.
The command adds result_kind and tsdive_version in front.