Clear Day Detection#

Clear Day Detection Module

This module contains functions for detecting clear days in historical PV solar data sets.

class solardatatools.clear_day_detection.ClearDayDetection#

Bases: object

filter_for_sparsity(data, w1=6000.0, solver='OSQP')#
find_clear_days(data, smoothness_threshold=0.9, energy_threshold=0.8, boolean_out=True, solver='CLARABEL')#

This function quickly finds clear days in a PV power data set. The input to this function is a 2D array containing standardized time series power data. This will typically be the output from solardatatools.data_transforms.make_2d. The filter relies on two estimates of daily “clearness”: the smoothness of each daily signal as measured by the l2-norm of the 2nd order difference, and seasonally-adjusted daily energy. Seasonal adjustment of the daily energy if obtained by solving a local quantile regression problem, which is a convex optimization problem and is solvable with cvxpy. The parameter th controls the relative weighting of the daily smoothness and daily energy in the final filter in a geometric mean. A value of 0 will rely entirely on the daily energy and a value of 1 will rely entirely on daily smoothness.

Parameters:
  • D – A 2D numpy array containing a solar power time series signal.

  • th – A parameter that tunes the filter between relying of daily smoothness and daily energy

Returns:

A 1D boolean array, with True values corresponding to clear days in the data set

plot_analysis(figsize=None)#