Variogram#
- class pypillometry.signal.Variogram(lags, gamma, npairs, variance)[source]#
Bases:
NamedTupleResult of
semivariogram().- Attributes:
- lagsnp.ndarray
lags in ms (1, 2, … samples)
- gammanp.ndarray
semivariance at each lag (signal units squared); NaN where there are no pairs of valid samples
- npairsnp.ndarray
number of pairs of valid samples at each lag
- variancefloat
variance of the valid samples (the sill of a stationary signal)
Methods
The variogram at about log-spaced lags.
Return number of occurrences of value.
Return first index of value.
Details
- at_log_lags(per_decade=12, min_pairs=200)[source]#
The variogram at about log-spaced lags.
Picks per_decade of the lags per factor of 10 (all lags where they are further apart than that), so that fits and plots are not dominated by the many long lags.
- Parameters:
- Return type:
Examples
>>> x = np.random.default_rng(0).normal(size=5000) >>> vg = semivariogram(x, fs=1000, max_lag=1000).at_log_lags(per_decade=4) >>> vg.lags array([ 1., 2., 3., 6., 10., 18., 32., 56., 100., 178., 316., 562., 1000.])
- 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.