diff --git a/solardatatools/_osd_signal_decompositions.py b/solardatatools/_osd_signal_decompositions.py index f7d7904a..7bce4b0a 100644 --- a/solardatatools/_osd_signal_decompositions.py +++ b/solardatatools/_osd_signal_decompositions.py @@ -47,7 +47,6 @@ def _osd_l2_l1d1_l2d2p365( signal, - w0=1, w1=1, w2=1e-3, return_all=False, @@ -89,7 +88,7 @@ def _osd_l2_l1d1_l2d2p365( c1 = SumSquare(weight=w0) T = len(signal) - c2 = Aggregate([Fourier(3, T, 365.2425, weight=1e-3), AverageEqual(0)]) + c2 = Aggregate([Fourier(3, T, 365.2425, weight=w2), AverageEqual(0)]) if transition_locs is None: if sum_card: @@ -187,6 +186,7 @@ def _osd_l1_l1d1_l2d2p365( signal, use_ixs=None, w1=1e0, + w2=1e3, transition_locs=None, return_all=False, solver=None, @@ -216,7 +216,7 @@ def _osd_l1_l1d1_l2d2p365( c1 = SumAbs(weight=1) T = len(signal) - c2 = Fourier(3, T, 365.2425, weight=1e-3) + c2 = Fourier(3, T, 365.2425, weight=w2) if transition_locs is None: if sum_card: diff --git a/solardatatools/data_handler.py b/solardatatools/data_handler.py index 5c984d98..676901b5 100644 --- a/solardatatools/data_handler.py +++ b/solardatatools/data_handler.py @@ -183,8 +183,8 @@ def run_pipeline( verbose=True, start_day_ix=None, end_day_ix=None, - w1=None, - w2=1e-3, + time_shift_weight_change_detector=None, + time_shift_weight_seasonal=1e-3, periodic_detector=False, solar_noon_estimator="srss", correct_tz=True, @@ -457,8 +457,8 @@ def run_pipeline( try: self.auto_fix_time_shifts( round_shifts_to_hour=round_shifts_to_hour, - w1=w1, - w2=w2, + w1=time_shift_weight_change_detector, + w2=time_shift_weight_seasonal, estimator=solar_noon_estimator, threshold=daytime_threshold, periodic_detector=periodic_detector, @@ -471,8 +471,8 @@ def run_pipeline( old_analysis = self.time_shift_analysis self.auto_fix_time_shifts( round_shifts_to_hour=round_shifts_to_hour, - w1=w1, - w2=w2, + w1=time_shift_weight_change_detector, + w2=time_shift_weight_seasonal, estimator=solar_noon_estimator, threshold=daytime_threshold, periodic_detector=True, @@ -1127,7 +1127,7 @@ def auto_fix_time_shifts( round_shifts_to_hour=True, w1=None, w2=1e-3, - estimator="com", + estimator="srss", threshold=0.005, periodic_detector=False, solver=None,