Spectrum#
- class pypillometry.signal.Spectrum(freqs, power, nwindows, window)[source]#
Bases:
NamedTupleResult of
spectrum().- Attributes:
- freqsnp.ndarray
frequencies in Hz (without 0)
- powernp.ndarray
one-sided power spectral density (signal units squared per Hz); NaN if no window could be used
- nwindowsint
number of windows that were averaged
- windowfloat
length of the windows in ms
Methods
The spectrum averaged in log-spaced frequency bands.
Return number of occurrences of value.
Return first index of value.
Details
- at_log_freqs(per_decade=20)[source]#
The spectrum averaged in log-spaced frequency bands.
A Welch spectrum has equally spaced frequencies, so most of its points (and most of its scatter) are at the highest frequencies. The mean power in per_decade bands per factor of 10 gives a smoother curve on logarithmic axes; bands without a frequency are left out.
- count(value, /)#
Return number of occurrences of value.
- index(value, start=0, stop=sys.maxsize, /)#
Return first index of value.
Raises ValueError if the value is not present.