k_arr¶
- kgpy.fft.freq.k_arr(n, dx=1.0, radians=False)¶
This is a port of CCK’s k_arr.pro to Python 3. Ported by NCG, 2020-07-31
Generate an array of wave-number values (by default in units of cycles per sample interval), arranged corresponding to the FFT of an N-element array. This is similar, but not identical, to using the helper function scipy.fft.fftfreq to generate arrays of frequencies. The main difference is that scipy.fft.fftfreq is limited to one dimension, and does not have the keyword argument to convert between radians snd cycles. -NCG
- Parameters:
- Returns:
array k, n element array of positive and negative wave-numbers, where the maximum (Nyquist) frequency has a value of pi radians per sample interval. The dx and radians keywords can be used to modidy the units of k.