pvanalytics.features.shading.fixed#

pvanalytics.features.shading.fixed(ghi, daytime, clearsky, interval=None, min_gradient=2)#

Detects shadows from fixed structures such as wires and poles.

Uses morphological image processing methods to identify shadows from fixed local objects in GHI data. GHI data are assumed to be reasonably complete with relatively few missing values and at a fixed time interval nominally of 1 minute over the course of several months. Detection focuses on shadows with relatively short duration. The algorithm forms a 2D image of the GHI data by arranging time of day along the x-axis and day of year along the y-axis. Rapid change in GHI in the x-direction is used to identify edges of shadows; continuity in the y-direction is used to separate local object shading from cloud shadows.

Parameters
  • ghi (Series) – Time series of GHI measurements. Data must be in local time at 1-minute frequency and should cover at least 60 days.

  • daytime (Series) – Boolean series with True for times when the sun is up.

  • clearsky (Series) – Clearsky GHI with same index as ghi.

  • interval (int, optional) – Interval between data points in minutes. If not specified the interval is inferred from the frequency of the index of ghi.

  • min_gradient (float, default 2) – Threshold value for the morphological gradient 3.

Returns

  • Series – Boolean series with true for times that are impacted by shadows.

  • ndarray – A boolean image (black and white) showing the shadows that were detected.

References

1

Martin, C. E., Hansen, C. W., An Image Processing Algorithm to Identify Near-Field Shading in Irradiance Measurements, preprint 2016

2

Reno, M.J. and C.W. Hansen, “Identification of periods of clear sky irradiance in time series of GHI measurements” Renewable Energy, v90, p. 520-531, 2016.

3

https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.morphological_gradient.html