pactools.utils.spectrum.Coherence¶
-
class
pactools.utils.spectrum.
Coherence
(block_length=1024, fft_length=None, step=None, wfunc=<function hamming>, fs=1.0)[source]¶ Coherence estimator
- Parameters
- block_lengthint
Length of each signal block, on which we estimate the spectrum
- fft_lengthint or None
Length of FFT, should be greater or equal to block_length. If None, it is set to block_length
- stepint or None
Step between successive blocks If None, it is set to half the block length (i.e. 0.5 overlap)
- wfuncfunction
Function used to compute the weitghting window on each block. Examples: np.ones, np.hamming, np.bartlett, np.blackman, …
- fsfloat
Sampling frequency
- donormboolean
If True, the amplitude is normalized
-
__init__
(self, block_length=1024, fft_length=None, step=None, wfunc=<function hamming at 0x7fd5ecd21d30>, fs=1.0)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self[, block_length, fft_length, …])Initialize self.
check_params
(self)fit
(self, sigs_a, sigs_b)Computes the coherence for two signals.
main_frequency
(self)Extract the frequency of the maximum in the spectrum
periodogram
(self, signals[, hold, mean_psd])Computes the estimation (in dB) for each epoch in a signal
plot
(self[, fig, ax])Not Implemented