solarforecastarbiter.validation.validator.detect_stale_values

solarforecastarbiter.validation.validator.detect_stale_values(x, window=6, rtol=1e-05, atol=1e-08)[source]

Detects stale data.

For a window of length N, the last value (index N-1) is considered stale if all values in the window are close to the first value (index 0).

Parameters:
  • x (Series) – data to be processed
  • window (int, default 6) – number of consecutive values which, if unchanged, indicates stale data
  • rtol (float, default 1e-5) – relative tolerance for detecting a change in data values
  • atol (float, default 1e-8) – absolute tolerance for detecting a change in data values
  • rtol and atol have the same meaning as in numpy.allclose (Parameters) –
Returns:

flags (Series) – True if the value is part of a stale sequence of data

Raises:

ValueError if window < 2