Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Classe « ShortTimeFFT »

Méthode scipy.signal.ShortTimeFFT.stft

Signature de la méthode stft

def stft(self, x: numpy.ndarray, p0: int | None = None, p1: int | None = None, *, k_offset: int = 0, padding: Literal['zeros', 'edge', 'even', 'odd'] = 'zeros', axis: int = -1) -> numpy.ndarray 

Description

help(ShortTimeFFT.stft)

Perform the short-time Fourier transform.

A two-dimensional matrix with ``p1-p0`` columns is calculated.
The `f_pts` rows represent value at the frequencies `f`. The q-th
column of the windowed FFT with the window `win` is centered at t[q].
The columns represent the values at the frequencies `f`.

Parameters
----------
x
    The input signal as real or complex valued array. For complex values, the
    property `fft_mode` must be set to 'twosided' or 'centered'.
p0
    The first element of the range of slices to calculate. If ``None``
    then it is set to :attr:`p_min`, which is the smallest possible
    slice.
p1
    The end of the array. If ``None`` then `p_max(n)` is used.
k_offset
    Index of first sample (t = 0) in `x`.
padding
    Kind of values which are added, when the sliding window sticks out
    on either the lower or upper end of the input `x`. Zeros are added
    if the default 'zeros' is set. For 'edge' either the first or the
    last value of `x` is used. 'even' pads by reflecting the
    signal on the first or last sample and 'odd' additionally
    multiplies it with -1.
axis
    The axis of `x` over which to compute the STFT.
    If not given, the last axis is used.

Returns
-------
S
    A complex array is returned with the dimension always being larger
    by one than of `x`. The last axis always represent the time slices
    of the STFT. `axis` defines the frequency axis (default second to
    last). E.g., for a one-dimensional `x`, a complex 2d array is
    returned, with axis 0 representing frequency and axis 1 the time
    slices.

See Also
--------
delta_f: Width of the frequency bins of the STFT.
delta_t: Time increment of STFT
f: Frequencies values of the STFT.
invertible: Check if STFT is invertible.
:meth:`~ShortTimeFFT.istft`: Inverse short-time Fourier transform.
p_range: Determine and validate slice index range.
stft_detrend: STFT with detrended segments.
t: Times of STFT for an input signal with `n` samples.
:class:`scipy.signal.ShortTimeFFT`: Class this method belongs to.


Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé