pwtools.signal.fft_1d_loop

pwtools.signal.fft_1d_loop(arr, axis=-1)[source]

Like scipy.fft.pack.fft and numpy.fft.fft, perform fft along an axis. Here do this by looping over remaining axes and perform 1D FFTs.

This was implemented as a low-memory version like smooth() to be used in pdos(), which fills up the memory for big MD data. But actually it has the same memory footprint as the plain scipy fft routine. Keep it here anyway as a nice reference for how to loop over remaining axes in the ndarray case.