Daytime#

Daytime Module

This module contains a function for finding the daytime period of a power time series

solardatatools.daytime.detect_sun(data, threshold)#
solardatatools.daytime.find_daytime(data_matrix, threshold=0.01)#

Function for creating a boolean mask of time periods when the sun is up on a PV system, based on a a power signal. The data is scaled so that “night time” data is approximately zero and the maximum power output approximately 1. We take the 5th and 95th percentiles for the top and bottom scale factors instead of using the maximum and the minimum. This provides robustness again outlier measurements. Then, daytime is chosen as scaled values larger than the threshold, which has a default value of 0.01, i.e. power measurements larger than 1% of the 95th percentile. If the 95th percentile corresponds to “one sun” of irradiance or 1000 W/m^2, this default threshold value represents irradiance levels above 10 W/m^2.

Parameters:
  • data_matrix – A power data matrix, possibly with NaN values

  • threshold – daytime threshold

Returns:

boolean mask of daytime periods, matching the power matrix

solardatatools.daytime.scale_data(data, return_metrics=False)#