pvanalytics.features.daytime.get_sunrise#

pvanalytics.features.daytime.get_sunrise(daytime_mask, freq=None, data_alignment='L')#

Using the outputs of power_or_irradiance(), derive sunrise values for each day in the associated time series.

This function assumes that each midnight-to-midnight period (according to the timezone of the input data) has one sunrise followed by one sunset. In cases where this is not satisfied (timezone of data is substantially different from the location’s local time, locations near the poles, etc), or in the case of missing data, the returned sunrise and sunset times may be invalid.

Parameters
  • daytime_mask (Series) – Boolean series delineating night periods from day periods, where day is True and night is False.

  • freq (str, optional) – A pandas freqstr specifying the expected timestamp spacing for the series. If None, the frequency will be inferred from the index of daytime_mask.

  • data_alignment (str, default 'L') – The data alignment of the series (left-aligned or right-aligned). Data alignment affects the value selected as sunrise. Options are ‘L’ (left- aligned), ‘R’ (right-aligned), or ‘C’ (center-aligned)

Returns

Series of daily sunrise times with the same index as daytime_mask.

Return type

Series

References

1

Perry K., Meyers B., and Muller, M. “Survey of Time Shift Detection Algorithms for Measured PV Data”, 2023 PV Reliability Workshop (PVRW).

Examples using pvanalytics.features.daytime.get_sunrise#

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Power

PV Fleets QA Process: Power

Identifying and estimating time shifts

Identifying and estimating time shifts