rate_of_change
rate_of_change ¤
RateOfChangeEvents ¤
RateOfChangeEvents(
dataframe: DataFrame,
signal_uuid: str,
*,
event_uuid: str = "eng:rate_of_change",
value_column: str = "value_double",
time_column: str = "systime"
)
Bases: Base
Engineering: Rate of Change Events
Detect rapid changes and step jumps in a numeric signal.
Methods: - detect_rapid_change: Flag intervals where rate of change exceeds threshold. - rate_statistics: Per-window rate of change statistics. - detect_step_changes: Sudden value jumps within a short duration.
detect_rapid_change ¤
detect_rapid_change(
threshold: float, window: str = "1m"
) -> pd.DataFrame
Flag intervals where rate of change exceeds threshold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
threshold
|
float
|
Minimum absolute rate (units/second) to flag. |
required |
window
|
str
|
Minimum duration to group rapid change intervals. |
'1m'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: start_time, end_time, max_rate, direction. |
rate_statistics ¤
rate_statistics(window: str = '1h') -> pd.DataFrame
Per-window rate of change statistics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
window
|
str
|
Resample window. |
'1h'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, mean_rate, std_rate, |
DataFrame
|
max_rate, min_rate. |
detect_step_changes ¤
detect_step_changes(
min_delta: float, max_duration: str = "5s"
) -> pd.DataFrame
Detect sudden value jumps within a short duration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_delta
|
float
|
Minimum absolute value change to qualify. |
required |
max_duration
|
str
|
Maximum time window for the step to occur. |
'5s'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: time, value_before, value_after, delta, duration. |