NR's realft replaced with np.fft.rfft
and some bugfixes, mostly typos