Skip to content

Commit

Permalink
ensured increasing freq vector and added scale to list of tested meth…
Browse files Browse the repository at this point in the history
…ods (#635)
  • Loading branch information
CommonClimate authored Jan 8, 2025
1 parent a9da6af commit a731e06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyleoclim/tests/test_core_Series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ def test_xwave_t6(self):
tau = ts1.time[::10]
_ = ts1.wavelet_coherence(ts2,method='wwz',settings={'tau':tau})

@pytest.mark.parametrize('freq', [None,np.linspace(1/100,1/2,num=20),'log', 'nfft', 'welch'])
@pytest.mark.parametrize('freq', [None,np.linspace(1/100,1/2,num=20),'log', 'nfft', 'welch','scale'])
def test_xwave_t7(self, freq):
''' Test Series.wavelet_coherence() with freq method argument
'''
Expand Down
2 changes: 1 addition & 1 deletion pyleoclim/utils/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ def freq_vector_scale(ts, dj=0.25, s0=None,j1=None, mother='MORLET',param=None):

j = np.arange(0, j1 + 1)
scale = s0 * 2. ** (j * dj)
freq = 1. / (fourier_factor * scale)
freq = np.sort(1. / (fourier_factor * scale)) # ensure increasing order

return freq

Expand Down

0 comments on commit a731e06

Please sign in to comment.