Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2========================================================= 

3Legacy discrete Fourier transforms (:mod:`scipy.fftpack`) 

4========================================================= 

5 

6.. warning:: 

7 

8 This submodule is now considered legacy, new code should use 

9 :mod:`scipy.fft`. 

10 

11Fast Fourier Transforms (FFTs) 

12============================== 

13 

14.. autosummary:: 

15 :toctree: generated/ 

16 

17 fft - Fast (discrete) Fourier Transform (FFT) 

18 ifft - Inverse FFT 

19 fft2 - 2-D FFT 

20 ifft2 - 2-D inverse FFT 

21 fftn - N-D FFT 

22 ifftn - N-D inverse FFT 

23 rfft - FFT of strictly real-valued sequence 

24 irfft - Inverse of rfft 

25 dct - Discrete cosine transform 

26 idct - Inverse discrete cosine transform 

27 dctn - N-D Discrete cosine transform 

28 idctn - N-D Inverse discrete cosine transform 

29 dst - Discrete sine transform 

30 idst - Inverse discrete sine transform 

31 dstn - N-D Discrete sine transform 

32 idstn - N-D Inverse discrete sine transform 

33 

34Differential and pseudo-differential operators 

35============================================== 

36 

37.. autosummary:: 

38 :toctree: generated/ 

39 

40 diff - Differentiation and integration of periodic sequences 

41 tilbert - Tilbert transform: cs_diff(x,h,h) 

42 itilbert - Inverse Tilbert transform: sc_diff(x,h,h) 

43 hilbert - Hilbert transform: cs_diff(x,inf,inf) 

44 ihilbert - Inverse Hilbert transform: sc_diff(x,inf,inf) 

45 cs_diff - cosh/sinh pseudo-derivative of periodic sequences 

46 sc_diff - sinh/cosh pseudo-derivative of periodic sequences 

47 ss_diff - sinh/sinh pseudo-derivative of periodic sequences 

48 cc_diff - cosh/cosh pseudo-derivative of periodic sequences 

49 shift - Shift periodic sequences 

50 

51Helper functions 

52================ 

53 

54.. autosummary:: 

55 :toctree: generated/ 

56 

57 fftshift - Shift the zero-frequency component to the center of the spectrum 

58 ifftshift - The inverse of `fftshift` 

59 fftfreq - Return the Discrete Fourier Transform sample frequencies 

60 rfftfreq - DFT sample frequencies (for usage with rfft, irfft) 

61 next_fast_len - Find the optimal length to zero-pad an FFT for speed 

62 

63Note that ``fftshift``, ``ifftshift`` and ``fftfreq`` are numpy functions 

64exposed by ``fftpack``; importing them from ``numpy`` should be preferred. 

65 

66Convolutions (:mod:`scipy.fftpack.convolve`) 

67============================================ 

68 

69.. module:: scipy.fftpack.convolve 

70 

71.. autosummary:: 

72 :toctree: generated/ 

73 

74 convolve 

75 convolve_z 

76 init_convolution_kernel 

77 destroy_convolve_cache 

78 

79""" 

80 

81 

82__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft', 

83 'fft2','ifft2', 

84 'diff', 

85 'tilbert','itilbert','hilbert','ihilbert', 

86 'sc_diff','cs_diff','cc_diff','ss_diff', 

87 'shift', 

88 'fftfreq', 'rfftfreq', 

89 'fftshift', 'ifftshift', 

90 'next_fast_len', 

91 'dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn' 

92 ] 

93 

94from .basic import * 

95from .pseudo_diffs import * 

96from .helper import * 

97from .realtransforms import * 

98 

99from scipy._lib._testutils import PytestTester 

100test = PytestTester(__name__) 

101del PytestTester