@@ -602,7 +602,20 @@ def _calc_d(aod700, p):
602602def _calc_stats (data , samples_per_window , sample_interval , H ):
603603 """ Calculates statistics for each window, used by Reno-style clear
604604 sky detection functions. Does not return the line length statistic
605- which is provided by _calc_windowed_stat and _line_length
605+ which is provided by _calc_windowed_stat and _line_length.
606+
607+ Calculations are done on a sliding window defined by the Hankel matrix H.
608+ Columns in H define the indices for each window. Each window contains
609+ samples_per_window index values. The first window starts with index 0;
610+ the last window ends at the last index position in data.
611+
612+ In the calculation of data_slope_nstd, a choice is made here where [1]_ is
613+ ambiguous. data_slope_nstd is the standard deviation of slopes divided by
614+ the mean GHI for each interval; see [1]_ Eq. 11. For intervals containing
615+ e.g. 10 values, there are 9 slope values in the standard deviation, and the
616+ mean is calculated using all 10 values. Eq. 11 in [1]_ is ambiguous if
617+ the mean should be calculated using 9 points (left ends of each slope)
618+ or all 10 points.
606619
607620 Parameters
608621 ----------
@@ -624,6 +637,12 @@ def _calc_stats(data, samples_per_window, sample_interval, H):
624637 standard deviation of difference between data points in each window
625638 data_slope : Series
626639 difference between successive data points
640+
641+ References
642+ ----------
643+ .. [1] Reno, M.J. and C.W. Hansen, "Identification of periods of clear
644+ sky irradiance in time series of GHI measurements" Renewable Energy,
645+ v90, p. 520-531, 2016.
627646 """
628647
629648 data_mean = data .values [H ].mean (axis = 0 )
0 commit comments