@@ -168,7 +168,7 @@ def test_no_models(self):
168
168
os .environ ["PATH" ] = ""
169
169
170
170
self .assertEqual (uwapm .models (), [])
171
-
171
+
172
172
class SignalTestSuite (MyTestCase ):
173
173
174
174
def test_time (self ):
@@ -178,12 +178,12 @@ def test_time(self):
178
178
def test_cw (self ):
179
179
self .assertArrayEqual (signal .cw (10000 , 0.1 , 50000 ), np .sin (2 * np .pi * 10000 * np .arange (5000 , dtype = np .float64 )/ 50000 ), precision = 6 )
180
180
self .assertArrayEqual (signal .cw (10000 , 0.1 , 50000 , complex_output = True ), np .exp (2j * np .pi * 10000 * np .arange (5000 , dtype = np .complex128 )/ 50000 ), precision = 6 )
181
- self .assertArrayEqual (signal .cw (10000 , 0.1 , 50000 , ('tukey' , 0.1 )), sp .tukey (5000 , 0.1 )* np .sin (2 * np .pi * 10000 * np .arange (5000 , dtype = np .float64 )/ 50000 ), precision = 2 )
181
+ self .assertArrayEqual (signal .cw (10000 , 0.1 , 50000 , ('tukey' , 0.1 )), sp .windows . tukey (5000 , 0.1 )* np .sin (2 * np .pi * 10000 * np .arange (5000 , dtype = np .float64 )/ 50000 ), precision = 2 )
182
182
183
183
def test_sweep (self ):
184
184
self .assertArrayEqual (signal .sweep (5000 , 10000 , 0.1 , 50000 ), sp .chirp (np .arange (5000 , dtype = np .float64 )/ 50000 , 5000 , 0.1 , 10000 , 'linear' ))
185
185
self .assertArrayEqual (signal .sweep (5000 , 10000 , 0.1 , 50000 , 'hyperbolic' ), sp .chirp (np .arange (5000 , dtype = np .float64 )/ 50000 , 5000 , 0.1 , 10000 , 'hyperbolic' ))
186
- self .assertArrayEqual (signal .sweep (5000 , 10000 , 0.1 , 50000 , window = ('tukey' , 0.1 )), sp .tukey (5000 , 0.1 )* sp .chirp (np .arange (5000 , dtype = np .float64 )/ 50000 , 5000 , 0.1 , 10000 ), precision = 2 )
186
+ self .assertArrayEqual (signal .sweep (5000 , 10000 , 0.1 , 50000 , window = ('tukey' , 0.1 )), sp .windows . tukey (5000 , 0.1 )* sp .chirp (np .arange (5000 , dtype = np .float64 )/ 50000 , 5000 , 0.1 , 10000 ), precision = 2 )
187
187
188
188
def test_envelope (self ):
189
189
x = np .random .normal (0 , 1 , 1000 )
0 commit comments