__init__.py 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. """
  2. ==================================================
  3. Discrete Fourier transforms (:mod:`scipy.fftpack`)
  4. ==================================================
  5. Fast Fourier Transforms (FFTs)
  6. ==============================
  7. .. autosummary::
  8. :toctree: generated/
  9. fft - Fast (discrete) Fourier Transform (FFT)
  10. ifft - Inverse FFT
  11. fft2 - Two dimensional FFT
  12. ifft2 - Two dimensional inverse FFT
  13. fftn - n-dimensional FFT
  14. ifftn - n-dimensional inverse FFT
  15. rfft - FFT of strictly real-valued sequence
  16. irfft - Inverse of rfft
  17. dct - Discrete cosine transform
  18. idct - Inverse discrete cosine transform
  19. dctn - n-dimensional Discrete cosine transform
  20. idctn - n-dimensional Inverse discrete cosine transform
  21. dst - Discrete sine transform
  22. idst - Inverse discrete sine transform
  23. dstn - n-dimensional Discrete sine transform
  24. idstn - n-dimensional Inverse discrete sine transform
  25. Differential and pseudo-differential operators
  26. ==============================================
  27. .. autosummary::
  28. :toctree: generated/
  29. diff - Differentiation and integration of periodic sequences
  30. tilbert - Tilbert transform: cs_diff(x,h,h)
  31. itilbert - Inverse Tilbert transform: sc_diff(x,h,h)
  32. hilbert - Hilbert transform: cs_diff(x,inf,inf)
  33. ihilbert - Inverse Hilbert transform: sc_diff(x,inf,inf)
  34. cs_diff - cosh/sinh pseudo-derivative of periodic sequences
  35. sc_diff - sinh/cosh pseudo-derivative of periodic sequences
  36. ss_diff - sinh/sinh pseudo-derivative of periodic sequences
  37. cc_diff - cosh/cosh pseudo-derivative of periodic sequences
  38. shift - Shift periodic sequences
  39. Helper functions
  40. ================
  41. .. autosummary::
  42. :toctree: generated/
  43. fftshift - Shift the zero-frequency component to the center of the spectrum
  44. ifftshift - The inverse of `fftshift`
  45. fftfreq - Return the Discrete Fourier Transform sample frequencies
  46. rfftfreq - DFT sample frequencies (for usage with rfft, irfft)
  47. next_fast_len - Find the optimal length to zero-pad an FFT for speed
  48. Note that ``fftshift``, ``ifftshift`` and ``fftfreq`` are numpy functions
  49. exposed by ``fftpack``; importing them from ``numpy`` should be preferred.
  50. Convolutions (:mod:`scipy.fftpack.convolve`)
  51. ============================================
  52. .. module:: scipy.fftpack.convolve
  53. .. autosummary::
  54. :toctree: generated/
  55. convolve
  56. convolve_z
  57. init_convolution_kernel
  58. destroy_convolve_cache
  59. """
  60. # List of possibly useful functions in scipy.fftpack._fftpack:
  61. # drfft
  62. # zfft
  63. # zrfft
  64. # zfftnd
  65. # destroy_drfft_cache
  66. # destroy_zfft_cache
  67. # destroy_zfftnd_cache
  68. from __future__ import division, print_function, absolute_import
  69. __all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
  70. 'fft2','ifft2',
  71. 'diff',
  72. 'tilbert','itilbert','hilbert','ihilbert',
  73. 'sc_diff','cs_diff','cc_diff','ss_diff',
  74. 'shift',
  75. 'fftfreq', 'rfftfreq',
  76. 'fftshift', 'ifftshift',
  77. 'next_fast_len',
  78. ]
  79. from .basic import *
  80. from .pseudo_diffs import *
  81. from .helper import *
  82. from numpy.dual import register_func
  83. for k in ['fft', 'ifft', 'fftn', 'ifftn', 'fft2', 'ifft2']:
  84. register_func(k, eval(k))
  85. del k, register_func
  86. from .realtransforms import *
  87. __all__.extend(['dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn',
  88. 'idstn'])
  89. from scipy._lib._testutils import PytestTester
  90. test = PytestTester(__name__)
  91. del PytestTester