Skip to content

Commit 0286c3f

Browse files
committedFeb 14, 2015
use correct heaviside def in morlet
1 parent 01bf18f commit 0286c3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎wavelets/wavelets.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def frequency(self, w, s=1.0):
9898
"""
9999
x = w * s
100100
# heaviside mock
101-
Hw = 0.5 * (np.sign(x) + 1)
101+
Hw = np.array(w)
102+
Hw[w <= 0] = 0
103+
Hw[w > 0] = 1
102104
return np.pi ** -.25 * Hw * np.exp((-(x - self.w0) ** 2) / 2)
103105

104106
def coi(self, s):

0 commit comments

Comments
 (0)
Failed to load comments.