File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 111111====
112112
113113- matplotlib in dev install
114- - unit test to check that they are equal when signal is real
115114- example file with hydra
116115- manifest file to not include file in package
117116- GitHub actions
Original file line number Diff line number Diff line change @@ -35,3 +35,22 @@ def test_fft():
3535
3636 # check results
3737 assert np .allclose (fft_out , fft_out )
38+
39+
40+ def test_fft_complex ():
41+
42+ # create complex signal
43+ signal = np .random .randn (n ) + 1j * np .random .randn (n )
44+
45+ # create complex filter
46+ filter = np .random .randn (n ) + 1j * np .random .randn (n )
47+
48+ # create object
49+ fft_convolver = FFTConvolve (filter = filter , length = len (signal ))
50+
51+ # convolve
52+ fft_out = fft_convolver (signal )
53+
54+ # check results
55+ fft_naive = np .convolve (signal , filter , mode = "full" )
56+ assert np .allclose (fft_out , fft_naive )
You can’t perform that action at this time.
0 commit comments