{ } Raw JSON

bundles / scipy latest / scipy / signal / _short_time_fft / ShortTimeFFT / p_range

function

scipy.signal._short_time_fft:ShortTimeFFT.p_range

source: /scipy/signal/_short_time_fft.py :1893

Signature

def   p_range ( self n : int p0 : int | None = None p1 : int | None = None )  →  tuple[int, int]

Summary

Determine and validate slice index range.

Parameters

n : int

Number of samples of input signal, assuming t[0] = 0.

p0 : int | None

First slice index. If 0 then the first slice is centered at t = 0. If None then p_min is used. Note that p0 may be < 0 if slices are left of t = 0.

p1 : int | None

End of interval (last value is p1-1). If None then p_max(n) is used.

Returns

p0_ : int

The fist slice index

p1_ : int

End of interval (last value is p1-1).

Notes

A ValueError is raised if p_min <= p0 < p1 <= p_max(n) does not hold.

See also

ShortTimeFFT

Class this property belongs to.

k_max

First sample index after signal end not touched by a time slice.

k_min

The smallest possible signal index.

lower_border_end

Where pre-padding effects end.

p_max

Index of first non-overlapping upper time slice.

p_min

The smallest possible slice index.

p_num

Number of time slices, i.e., p_max - p_min.

upper_border_begin

Where post-padding effects start.

Aliases

  • scipy.signal.ShortTimeFFT.p_range