scipy.signal.ShortTimeFFT.

p_range#

ShortTimeFFT.p_range(n, p0=None, p1=None)[source]#

Determine and validate slice index range.

Parameters:
nint

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

p0int | 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.

p1int | 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).

See also

k_min

The smallest possible signal index.

k_max

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

lower_border_end

Where pre-padding effects end.

p_min

The smallest possible slice index.

p_max

Index of first non-overlapping upper time slice.

p_num

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

upper_border_begin

Where post-padding effects start.

ShortTimeFFT

Class this property belongs to.

Notes

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