Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
- make prewhitening correction depend only on keyword, not all decimation params
  • Loading branch information
kkappler committed Dec 21, 2024
1 parent c81729c commit b7cb76c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aurora/pipelines/time_series_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ def apply_recoloring(
return stft_obj

if decimation_obj.prewhitening_type == "first difference":
freqs = decimation_obj.fft_frequencies
prewhitening_correction = 1.0j * 2 * np.pi * freqs # jw

stft_obj /= prewhitening_correction
# first difference prewhitening correction is to divide by jw
freqs = stft_obj.frequency.data # was freqs = decimation_obj.fft_frequencies
jw = 1.0j * 2 * np.pi * freqs
stft_obj /= jw

# suppress nan and inf to mute later warnings
if prewhitening_correction[0] == 0.0:
if jw[0] == 0.0:
cond = stft_obj.frequency != 0.0
stft_obj = stft_obj.where(cond, complex(0.0))
# elif decimation_obj.prewhitening_type == "ARMA":
Expand Down

0 comments on commit b7cb76c

Please sign in to comment.