Skip to content

Commit

Permalink
improvements to consistency and readability
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeyers committed Jul 16, 2024
1 parent b2f29fb commit 6caa417
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions solardatatools/_osd_signal_decompositions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

def _osd_l2_l1d1_l2d2p365(
signal,
w0=1,
w1=1,
w2=1e-3,
return_all=False,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions solardatatools/data_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6caa417

Please sign in to comment.