pvanalytics.quality.gaps.stale_values_round#

pvanalytics.quality.gaps.stale_values_round(x, window=6, decimals=3, mark='tail')#

Identify stale values by rounding.

A value is considered stale if it is part of a sequence of length window of values that are identical when rounded to decimals decimal places.

Parameters
  • x (Series) – Data to be processed.

  • window (int, default 6) – Number of consecutive identical values for a data point to be considered stale.

  • decimals (int, default 3) – Number of decimal places to round to.

  • mark (str, default 'tail') –

    How much of the window to mark True when a sequence of stale values is detected. Can be one of ‘tail’, ‘end’, or ‘all’.

    • If ‘tail’ (the default) then every point in the window except the first point is marked True.

    • If ‘end’ then the first window - 1 values in a stale sequence sequence are marked False and all subsequent values in the sequence are marked True.

    • If ‘all’ then every point in the window including the first point is marked True.

Returns

True for each value that is part of a stale sequence of data.

Return type

Series

Raises

ValueError – If mark is not one of ‘tail’, ‘end’, or ‘all’.

Notes

Based on code from the pvfleets_qa_analysis project. Copyright (c) 2020 Alliance for Sustainable Energy, LLC.

Examples using pvanalytics.quality.gaps.stale_values_round#

Stale Data Periods

Stale Data Periods

PV Fleets QA Process: Temperature

PV Fleets QA Process: Temperature

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Power

PV Fleets QA Process: Power