WaveletCoherenceResult.significant#

WaveletCoherenceResult.significant()[source]#

Where coherence exceeds the surrogate level, outside the cone of influence.

Return type:

NDArray[bool]

Returns:

(S, T) flags; False throughout a scale whose level is nan (cone everywhere) and inside the cone at any scale.

Raises:

SpecificationError – If no surrogates were run.

Example

Independent white noise is significant at about alpha of the dates outside the cone:

>>> rng = np.random.default_rng(0)
>>> a, b = rng.standard_normal(256), rng.standard_normal(256)
>>> res = WaveletCoherence(per_octave=4, surrogates=100, seed=0).compute(a, b)
>>> hit = res.significant()
>>> bool(0.01 < hit[~res.cone].mean() < 0.1)
True
>>> WaveletCoherence(surrogates=0).compute(a, b).significant()
Traceback (most recent call last):
    ...
cultivars.exceptions.SpecificationError: no significance level: rerun ...