Commit fd41267d authored by Patrick Godwin's avatar Patrick Godwin
Browse files

reference_psd.fixed_duration_bandpass_kernel(): use fftpack to leverage pyfftw if available

parent fc563d9f
Pipeline #201235 failed with stages
in 2 minutes and 56 seconds
......@@ -878,7 +878,7 @@ def fixed_duration_bandpass_kernel(rate, flow = 0, fhigh = float("inf"), duratio
ix1 = numpy.logical_and(f <= -flow, f >= -fhigh)
ix2 = numpy.logical_and(f >= flow, f <= fhigh)
filt[numpy.logical_not(numpy.logical_or(ix1, ix2))] = 0.
filt = numpy.real(scipy.ifft(scipy.fftpack.ifftshift(filt))) / nsamps
filt = numpy.real(fftpack.ifft(fftpack.ifftshift(filt))) / nsamps
window = numpy.sinc(2 * f / rate)
out = numpy.roll(filt, nsamps / 2) * window
out /= (out**2).sum()**.5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment