Skip to content

Commit

Permalink
scipy windows bugfix & requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLecocq committed Jul 30, 2024
1 parent 5b12a78 commit 9a67c55
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion msnoise/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ def stack(data, stack_method="linear", pws_timegate=10.0, pws_power=2,
coh = 1. / data.shape[0] * np.abs(phasestack)

timegate_samples = int(pws_timegate * goal_sampling_rate)
coh = np.convolve(ss.boxcar(timegate_samples) /
coh = np.convolve(ss.windows.boxcar(timegate_samples) /
timegate_samples, coh, 'same')
coh = np.power(coh, pws_power)
for c in data:
Expand Down
2 changes: 1 addition & 1 deletion msnoise/s05compute_mwcs2.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
def get_window(window="boxcar", half_win=3):
window_len = 2 * half_win + 1
if window == "boxcar":
w = scipy.signal.boxcar(window_len).astype('complex')
w = scipy.signal.windows.boxcar(window_len).astype('complex')
else:
w = scipy.signal.windows.hann(window_len).astype('complex')
return w / window_len
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'pandas',
'matplotlib',
'sqlalchemy<2', # TEMP needed as it breaks flask-admin
'sqlalchemy-utils',
'obspy',
'click',
'pymysql',
Expand Down

0 comments on commit 9a67c55

Please sign in to comment.