A small suggestion I have is to simplify the fft calls where possible. For example you should be able to replace the following line:
|
xcorr_raw_this = np.fft.fftshift(np.real(np.fft.ifft(Xcorr_raw_this_padded))) |
With a simpler call to scipy.signal.correlate. Note that you can use method='fft' to force this function to compute the cross-correlation in the frequency domain. By default, method='auto' will take a good guess for which method is faster.
I'm not sure you'll see big performance gains, but its possible.
A small suggestion I have is to simplify the
fftcalls where possible. For example you should be able to replace the following line:muse-python/muse/util.py
Line 394 in d4e5ab1
With a simpler call to
scipy.signal.correlate. Note that you can usemethod='fft'to force this function to compute the cross-correlation in the frequency domain. By default,method='auto'will take a good guess for which method is faster.I'm not sure you'll see big performance gains, but its possible.