Welcome to gccestimating’s documentation!
Generalized Cross Correlation Estimators.
Istanciation Signatures:
gcc = GCC(sig1, sig2, fftlen)
gcc = GCC.from_spectra(spec1, spec2, onesided=True)
Estimators:
gcc.cc(), gcc.roth(), gcc.scot(), gcc.phat(), gcc.ht()
gcc.gamma12()
- class gccestimating.GCC(sig1=None, sig2=None, fftlen=None)[source]
Returns a GCC instance.
Provides estimation methods for Generalized Cross Correlation.
- Parameters:
- sig1ndarray
First signal.
- sig2ndarray
Second signal.
- fftlenint or None
Length of fft to be computed. If None, it will be calculated automatically as next power of two.
- Returns:
- gccGCC
Examples
- Attributes:
Methods
Estimate
(name, sig, spec)Data of an Estimate.
cc
()Returns GCC estimate
Returns the coherence.
eckart
(sig0, noise1, noise2)Returns an eckart estimate.
from_spectra
(spec1, spec2[, onesided])Returns a GCC instance.
gamma12
()Returns gamma12 $gamma_{12}(f)$
ht
()Returns GCC HT estimate
phat
()Returns GCC PHAT estimate
roth
()Returns GCC Roth estimate
scot
()Returns GCC SCOT estimate
- classmethod from_spectra(spec1, spec2, onesided=True)[source]
Returns a GCC instance.
- Parameters:
- spec1ndarray
First spectrum.
- spec2ndarray
Second spectrum.
- onesidedbool
If you provide twosided Spectra (e.g. of comples signals) set to False. Default is True.
- Returns:
- gccGCC
- property spec11
Returns auto power spectrum of first signal.
- property spec22
Returns auto power spectrum of second signal.
- property spec12
Returns cross power spectrum of first and second signal.
- class Estimate(name: str, sig: ndarray, spec: ndarray)[source]
Data of an Estimate. Instances are returned by estimators in GCC.
- Parameters:
- namestr
Name of the estimator.
- signdarray
Estimator signal array (Rxy(t), Cross Correlation).
- specndarray
Estimator spectrum (Rxy(f)).
Methods
index_to_lag
- scot()[source]
Returns GCC SCOT estimate
Smoothed gamma12 Transformed GCC.
$mathcal{F}^{-1} (S_{xy}/sqrt{S_{xx}S_{yy}})$