def phases(self): """The frequency-band dependent phases of the spectra of each of the time -series i,j in the analyzer""" phase = tsa.cache_to_phase(self.cache, self.ij) return phase
def test_cache_to_phase(): """ Test phase calculations from cached windowed FFT """ ij = [(0, 1), (1, 0)] x = np.sin(t) + np.sin(2 * t) + np.sin(3 * t) + np.random.rand(t.shape[-1]) y = np.sin(t) + np.sin(2 * t) + np.sin(3 * t) + np.random.rand(t.shape[-1]) ts = np.vstack([x, y]) freqs, cache = tsa.cache_fft(ts, ij) ph = tsa.cache_to_phase(cache, ij)