def coi(self):
"""The Cone of Influence is the region near the edges of the
input signal in which edge effects may be important.
Return a tuple (T, S) that describes the edge of the cone
of influence as a single line in (time, scale).
"""
Tmin = self.time.min()
Tmax = self.time.max()
Tmid = Tmin + (Tmax - Tmin) / 2
s = np.logspace(np.log10(self.scales.min()),
np.log10(self.scales.max()),
100)
c1 = Tmin + self.wavelet.coi(s)
c2 = Tmax - self.wavelet.coi(s)
C = np.hstack((c1[np.where(c1 < Tmid)], c2[np.where(c2 > Tmid)]))
S = np.hstack((s[np.where(c1 < Tmid)], s[np.where(c2 > Tmid)]))
# sort w.r.t time
iC = C.argsort()
sC = C[iC]
sS = S[iC]
return sC, sS
评论列表
文章目录