ts_shape.events.engineering.startup_events
¤
Classes:
-
StartupDetectionEvents
–Detect equipment startup intervals based on threshold crossings or
StartupDetectionEvents
¤
StartupDetectionEvents(dataframe: DataFrame, target_uuid: str, *, event_uuid: str = 'startup_event', value_column: str = 'value_double', time_column: str = 'systime')
Bases: Base
Detect equipment startup intervals based on threshold crossings or sustained positive slope in a numeric metric (speed, temperature, etc.).
Schema assumptions (columns): - uuid, sequence_number, systime, plctime, is_delta - value_integer, value_string, value_double, value_bool, value_bytes
Methods:
-
detect_startup_by_slope
–Startup intervals where per-second slope >=
min_slope
for at least -
detect_startup_by_threshold
–Startup begins at first crossing above
threshold
(or hysteresis enter) -
get_dataframe
–Returns the processed DataFrame.
Source code in src/ts_shape/events/engineering/startup_events.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
detect_startup_by_slope
¤
detect_startup_by_slope(*, min_slope: float, slope_window: str = '0s', min_duration: str = '0s') -> DataFrame
Startup intervals where per-second slope >= min_slope
for at least
min_duration
. slope_window
is accepted for API completeness but the
current implementation uses instantaneous slope between samples.
Returns:
-
DataFrame
–DataFrame with columns: start, end, uuid, is_delta, method, min_slope, avg_slope.
Source code in src/ts_shape/events/engineering/startup_events.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
detect_startup_by_threshold
¤
detect_startup_by_threshold(*, threshold: float, hysteresis: tuple[float, float] | None = None, min_above: str = '0s') -> DataFrame
Startup begins at first crossing above threshold
(or hysteresis enter)
and is valid only if the metric stays above the (exit) threshold for at
least min_above
.
Returns:
-
DataFrame
–DataFrame with columns: start, end, uuid, is_delta, method, threshold.
Source code in src/ts_shape/events/engineering/startup_events.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
get_dataframe
¤
get_dataframe() -> DataFrame
Returns the processed DataFrame.
Source code in src/ts_shape/utils/base.py
34 35 36 |
|