Skip to content

Commit

Permalink
Move recoloring boolean check above call to apply_recoloring
Browse files Browse the repository at this point in the history
  • Loading branch information
kkappler committed Dec 21, 2024
1 parent 080709c commit 021ad30
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions aurora/pipelines/time_series_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ def apply_recoloring(
# No recoloring needed if prewhitening not appiled, or recoloring set to False
if not decimation_obj.prewhitening_type:
return stft_obj
if not decimation_obj.recoloring:
return stft_obj
# TODO Delete after tests (20241220) -- this check has been moved above the call to this function
# if not decimation_obj.recoloring:
# return stft_obj

if decimation_obj.prewhitening_type == "first difference":
# first difference prewhitening correction is to divide by jw
Expand Down Expand Up @@ -194,8 +195,8 @@ def run_ts_to_stft_scipy(
coords={"frequency": ff, "time": time_axis},
)
stft_obj.update({channel_id: xrd})

stft_obj = apply_recoloring(decimation_obj, stft_obj)
if decimation_obj.recoloring:
stft_obj = apply_recoloring(decimation_obj, stft_obj)

return stft_obj

Expand Down Expand Up @@ -318,7 +319,8 @@ def run_ts_to_stft(
detrend_type=decimation_obj.extra_pre_fft_detrend_type,
)

stft_obj = apply_recoloring(decimation_obj, stft_obj)
if decimation_obj.recoloring:
stft_obj = apply_recoloring(decimation_obj, stft_obj)

return stft_obj

Expand Down

0 comments on commit 021ad30

Please sign in to comment.