Skip to main content
Version: 0.0.98

ts_shape.events.engineering.warmup_analysis

Classes
NameDescription
WarmUpCoolDownEventsEngineering: Warm-Up / Cool-Down Analysis

WarmUpCoolDownEvents​

classsource
WarmUpCoolDownEvents(
dataframe: pd.DataFrame,
signal_uuid: str,
*,
event_uuid: str = "eng:warmup",
value_column: str = "value_double",
time_column: str = "systime"
) -> None

Bases: Base

Engineering: Warm-Up / Cool-Down Analysis

Detect and characterize warm-up and cool-down curves — common for ovens, extruders, molds, hydraulic systems. Analyzes the shape, consistency, and timing of monotonic temperature/pressure ramps.

Methods:

  • detect_warmup: Intervals where signal rises by at least min_rise.
  • detect_cooldown: Intervals where signal falls by at least min_fall.
  • warmup_consistency: Compare warm-up durations and rates for consistency.
  • time_to_target: Time from warmup start until target value is reached.
Functions
NameDescription
detect_warmupDetect intervals where signal rises by at least min_rise.
detect_cooldownDetect intervals where signal falls by at least min_fall.
warmup_consistencyCompare warm-up curves for consistency in duration and rate.
time_to_targetTime from each ramp start until target value is reached.
Parameters
NameTypeDescriptionDefault
dataframeDataFrameLong-format timeseries frame (one row per sample, uuid identifies the signal).required
signal_uuidstrUUID of the signal to analyze.required
event_uuidstrUUID stamped on emitted events.'eng:warmup'
value_columnstrColumn holding the signal values.'value_double'
time_columnstrTimestamp column.'systime'

detect_warmup​

methodsource
detect_warmup(
min_rise: float, min_duration: str = "1min", *, max_pause: int = 0
) -> pd.DataFrame

Detect intervals where signal rises by at least min_rise.

Parameters
NameTypeDescriptionDefault
min_risefloatMinimum total value increase to qualify.required
min_durationstrMinimum duration of the ramp.'1min'
max_pauseintNumber of consecutive flat or reversed sample steps tolerated inside a ramp (default 0: any pause ends it).0
Returns
TypeDescription
DataFrameDataFrame with columns: start, end, uuid, source_uuid, is_delta,
DataFramestart_value, end_value, rise, duration_seconds, avg_rate.

detect_cooldown​

methodsource
detect_cooldown(
min_fall: float, min_duration: str = "1min", *, max_pause: int = 0
) -> pd.DataFrame

Detect intervals where signal falls by at least min_fall.

Parameters
NameTypeDescriptionDefault
min_fallfloatMinimum total value decrease to qualify (positive number).required
min_durationstrMinimum duration of the ramp.'1min'
max_pauseintNumber of consecutive flat or reversed sample steps tolerated inside a ramp (default 0: any pause ends it).0
Returns
TypeDescription
DataFrameDataFrame with columns: start, end, uuid, source_uuid, is_delta,
DataFramestart_value, end_value, fall, duration_seconds, avg_rate.

warmup_consistency​

methodsource
warmup_consistency(min_rise: float, min_duration: str = '1min') -> pd.DataFrame

Compare warm-up curves for consistency in duration and rate.

Parameters
NameTypeDescriptionDefault
min_risefloatMinimum total value increase for a warm-up, passed to :meth:detect_warmup.required
min_durationstrMinimum warm-up duration (pandas offset string), passed to :meth:detect_warmup.'1min'
Returns
TypeDescription
DataFrameDataFrame with columns: start, end, duration_seconds, uuid,
DataFramesource_uuid, warmup_index, avg_rate,
DataFramedeviation_from_median_duration,
DataFramedeviation_from_median_duration_seconds. start / end are
DataFramethe warm-up's bounds; the deviation from the median warm-up
DataFrameduration is in seconds.
DataFrameCanonical twin columns: deviation_from_median_duration_seconds
DataFrame(after deviation_from_median_duration); it holds the same
DataFramevalues as the deprecated column right before it, which is removed
DataFramein the next major release.

time_to_target​

methodsource
time_to_target(target_value: float, direction: str = 'rising') -> pd.DataFrame

Time from each ramp start until target value is reached.

Parameters
NameTypeDescriptionDefault
target_valuefloatThe target value to reach.required
directionstr'rising' or 'falling'.'rising'
Returns
TypeDescription
DataFrameDataFrame with columns: start, end (= target_reached_at),
DataFrameduration_seconds, uuid, source_uuid, target_reached_at,
DataFrametime_to_target_seconds, overshoot. overshoot is how far the
DataFramesignal goes beyond the target (0 when it does not) from the
DataFrametime the target is reached until the next ramp starts, or the
DataFrameend of the data for the last ramp.