Time Shifts#

Time Shift Algorithm Module

This module contains the algorithm for detecting time shifts in an unlabeled PV power production data sets. These occur because of the local clock on the data logging system being changed or by incorrect handling of daylight savings. The algorithm works as follows:

  • Estimate solar noon on each day from the data

  • Fit a signal demixing model, assuming a seasonal component and a piecewise constant component

  • Polish the L1 heuristic used to estimate piecewise constant component using iterative reweighting

  • Use piecewise constance component to detect shift points in time and correction amounts

class solardatatools.algorithms.time_shifts.TimeShift#

Bases: object

apply_corrections(data)#
estimate_components(metric, w1, w2, use_ixs, periodic_detector, solver=None, sum_card=False, transition_locs=None)#
invert_corrections(data)#
optimize_w1(metric, w1s, use_ixs, w2, periodic_detector, solver=None, sum_card=False)#
plot_analysis(figsize=None)#
plot_optimization(figsize=(8, 8))#
run(data, use_ixs=None, w1=None, w2=0.001, solar_noon_estimator='com', threshold=0.005, periodic_detector=False, solver=None, sum_card=False, round_shifts_to_hour=True)#