Filters
The captest.filters module holds all the filters. Each
filter is a first-class object: a BaseSummaryStep
subclass that declares its configuration as typed param parameters and
implements _execute. The filter methods on CapData
are thin wrappers that build the matching step and run() it. Steps may also be
constructed and run directly:
from captest.filters import Irradiance, RepCond
Irradiance(low=200, high=800, custom_name="Irradiance bounds").run(cd)
RepCond(percent_filter=20).run(cd)
Base Classes
BaseSummaryStep is the common ancestor for
everything that appears in the summary table; it owns the run() lifecycle and
the custom_name label. BaseFilter adds the
contract that _execute returns the pandas Index of rows to keep.
|
Common ancestor for steps that appear in the filtering summary. |
|
A pure row-filtering step. |
Filter Steps
Each step removes rows from CapData.data_filtered. The corresponding
CapData.filter_* wrapper builds and runs the step.
|
Filter rows by an irradiance column to a low/high band. |
|
Remove PVsyst intervals operating off the maximum power point. |
|
Remove intervals of array shading. |
|
Filter rows to a time window described by start/end/days/test_date. |
|
Keep (or drop) the timestamps belonging to a list of days. |
|
Remove statistical outliers in the (poa, power) plane via sklearn EllipticEnvelope. |
|
Remove intervals with a power factor below a threshold. |
|
Remove intervals at or above a power threshold. |
|
Apply an arbitrary callable to |
|
Drop rows where redundant sensors in a group disagree beyond a threshold. |
|
Remove intervals where measured GHI doesn't match modeled clear-sky GHI. |
|
Remove intervals where single-axis-tracker backtracking is active. |
|
Remove rows with missing data (NaN) in the regression columns. |
|
Remove intervals where a column's rolling-window standard deviation is at or above |
|
Remove intervals with a large fractional change from the previous interval (a step-change / stability filter). |
|
Remove intervals where a boolean/flag column is truthy. |
|
Remove intervals whose regression residuals are statistical outliers. |
Reporting Conditions
RepCond is a zero-removal step: it computes
CapData.rc and returns the unchanged index, so it appears in the summary at
its position in the filter chain without removing any data.
|
Reporting-conditions calculation as a zero-removal summary step. |
Row-filter Helpers
Standalone row-filtering functions that the step classes (and a few non-filter
CapData methods) build on. These moved here from
capdata.py during the filter-class refactor.
|
Top level filter on irradiance values. |
|
Check dataframe for rows with inconsistent values. |
|
Check series for pairs of values with percent difference above perc_diff. |
|
Calculate percent difference of two values. |
|
Check each value in series <= average of other values. |
|
Return a boolean Series marking single-axis-tracker backtracking. |