solarforecastarbiter.datamodel.QualityFlagFilter

class solarforecastarbiter.datamodel.QualityFlagFilter(quality_flags: Tuple[str, ...] = ('UNEVEN FREQUENCY', 'LIMITS EXCEEDED', 'CLEARSKY EXCEEDED', 'DAYTIME STALE VALUES', 'INCONSISTENT IRRADIANCE COMPONENTS'), discard_before_resample: bool = True, resample_threshold_percentage: float = 10.0)[source]

Quality flag filters to be applied in a report.

Parameters:
  • quality_flags (Tuple of str) – Strings corresponding to BITMASK_DESCRIPTION_DICT or DERIVED_MASKS keys. These periods will be excluded from the analysis.
  • discard_before_resample (bool, default True) – Determines if points should be discarded before resampling or only during resampling (when resample_threshold_percentage is exceeded).
  • resample_threshold_percentage (float, default 10.) – The percentage of points in a resampled interval that must be flagged for the resampled interval to be flagged.

Notes

If discard_before_resample is True, the quality_flags are applied to the data before it is resampled. During resampling, intervals are discarded if resample_threshold_percentage is exceeded.

If discard_before_resample is False, the quality_flags are only considered during the resampling operation. The quality_flags of the raw observations are combined with OR, the total number of flagged points within a resample period is computed, and intervals are discarded where resample_threshold_percentage is exceeded.

__init__(quality_flags: Tuple[str, ...] = ('UNEVEN FREQUENCY', 'LIMITS EXCEEDED', 'CLEARSKY EXCEEDED', 'DAYTIME STALE VALUES', 'INCONSISTENT IRRADIANCE COMPONENTS'), discard_before_resample: bool = True, resample_threshold_percentage: float = 10.0) → None

Methods

__init__(quality_flags, …] = (, , , , ), …)
from_dict(input_dict[, raise_on_extra]) Construct a dataclass from the given dict, matching keys with the class fields.
replace(**kwargs) Convience wrapper for dataclasses.replace() to create a new dataclasses from the old with the given keys replaced.
to_dict() Convert the dataclass into a dictionary suitable for uploading to the API.

Attributes

discard_before_resample
quality_flags
resample_threshold_percentage