solarforecastarbiter.validation.validator.detect_clipping¶
-
solarforecastarbiter.validation.validator.
detect_clipping
(ac_power, window=4, fraction_in_window=0.75, rtol=0.005, levels=2)[source]¶ Detects clipping in a series of AC power.
Possible clipped power levels are found by detect_levels. Within each sliding window, clipping is indicated when at least fraction_in_window of points are close to a clipped power level.
Parameters: - ac_power (Series) – data to be processed
- window (int) – number of data points defining the length of a rolling window
- fraction_in_window (float) – fraction of points which indicate clipping if AC power at each point is close to the plateau level
- rtol (float) – a point is close to a clipped level M if abs(ac_power - M) < rtol * max(ac_power)
- levels (int) – number of clipped power levels to consider.
Returns: flags (Series) – True when clipping is indicated.