environmentaltools.common.max_moving_window
- environmentaltools.common.max_moving_window(data: DataFrame, duration: int) DataFrame[source]
Select peaks from time series using a moving window.
Identifies peak values that occur at the center of a moving window, effectively filtering out values that are not local maxima within the specified duration.
- Parameters:
data (pd.DataFrame) – Time series data.
duration (int) – Duration of the moving window (in index units).
- Returns:
- DataFrame containing only the detected peaks with
their original timestamps.
- Return type:
pd.DataFrame