Skip to content

operating_range

operating_range ¤

OperatingRangeEvents ¤

OperatingRangeEvents(
    dataframe: DataFrame,
    signal_uuid: str,
    *,
    event_uuid: str = "eng:operating_range",
    value_column: str = "value_double",
    time_column: str = "systime"
)

Bases: Base

Engineering: Operating Range Analysis

Analyze the operating envelope of a signal — what ranges it operates in, how often, and when the operating point shifts.

Methods: - operating_envelope: Per-window min/max/mean/percentiles. - detect_regime_change: Detect significant shifts in the operating point. - time_in_range: Percentage of time within a defined range per window. - value_distribution: Histogram of signal values.

operating_envelope ¤

operating_envelope(window: str = '1h') -> pd.DataFrame

Per-window operating envelope statistics.

Returns:

Type Description
DataFrame

DataFrame with columns: window_start, min_value, p5,

DataFrame

mean_value, p95, max_value, range_width.

detect_regime_change ¤

detect_regime_change(
    window: str = "1h", shift_threshold: float = 2.0
) -> pd.DataFrame

Detect significant shifts in the operating point between windows.

A regime change is flagged when the window mean differs from the previous window mean by more than shift_threshold * pooled std.

Returns:

Type Description
DataFrame

DataFrame with columns: start, end, uuid, is_delta,

DataFrame

prev_mean, new_mean, shift_magnitude.

time_in_range ¤

time_in_range(
    lower: float, upper: float, window: str = "1h"
) -> pd.DataFrame

Percentage of time within a defined range per window.

Returns:

Type Description
DataFrame

DataFrame with columns: window_start, time_in_range_pct,

DataFrame

time_below_pct, time_above_pct.

value_distribution ¤

value_distribution(n_bins: int = 10) -> pd.DataFrame

Histogram of signal values.

Returns:

Type Description
DataFrame

DataFrame with columns: bin_lower, bin_upper, count, pct,

DataFrame

cumulative_pct.