Constant#
- class pypillometry.signal.gaussmarkov.Constant(kappa=10000000.0)[source]#
Bases:
ComponentUnknown constant (e.g., the mean of the signal) with a diffuse prior.
A state that does not change, with a prior variance kappa that is very large against the signal. Used with
n_diffuse=1inkalman_loglik(), the likelihood of the other parameters does not depend on the level of the signal (the restricted likelihood, REML), and the smoother returns the posterior of the constant with the other components.- Parameters:
kappa (
float) – prior variance (signal units squared); default 1e7. Not a fitted parameter.
Examples
>>> c = Constant() >>> c.discretise(50.) (array([[1.]]), array([[0.]])) >>> c.param_names ()
Methods
0: the constant does not enter the covariance and the variogram.
Exact discretisation for a time step dt (ms).
dict of the parameters
One-sided power spectral density of the output at frequencies freq (Hz), in signal units squared per Hz; its integral over all frequencies is the variance.
Continuous-time state space (
ContinuousSS).Semivariogram gamma(tau) = k(0) - k(tau) of the output (ms).
copy with some parameters (or structural fields) changed
Details
- psd(freq)[source]#
One-sided power spectral density of the output at frequencies freq (Hz), in signal units squared per Hz; its integral over all frequencies is the variance.
\[S(f) = \frac{2}{1000} H (i\omega - F)^{-1} Q_n (-i\omega - F^\top)^{-1} H^\top, \qquad \omega = 2\pi f / 1000\]- Return type: