def test_pburg(): p = pburg(marple_data, 15, NFFT=4096) p.plot(sides='centerdc') print(p) # test real case p = pburg(data_cosine(), 15, NFFT=4096) p()
def test_arma_spectrum(): from spectrum import datasets from spectrum import FourierSpectrum s = ParametricSpectrum(datasets.data_cosine(), sampling=1024, ar_order=30, ma_order=15)
def test_fourier_spectrum(): from spectrum import datasets from spectrum import FourierSpectrum s = FourierSpectrum(datasets.data_cosine(), sampling=1024, NFFT=512) s.periodogram() s.plot() s = FourierSpectrum(datasets.marple_data, sampling=1024, NFFT=512) s.periodogram() s.plot() print(s)
def test_fourier_spectrum(): from spectrum import datasets from spectrum import FourierSpectrum s = FourierSpectrum(datasets.data_cosine(), sampling=1024, NFFT=512) s.periodogram() s.plot() s = FourierSpectrum(datasets.marple_data, sampling=1024, NFFT=512) s.periodogram() s.plot() print s
def test_fourier_spectrum(): from spectrum import datasets from spectrum import FourierSpectrum s = FourierSpectrum(datasets.data_cosine(), sampling=1024, NFFT=512) s.periodogram() s.plot() s = FourierSpectrum(datasets.marple_data, sampling=1024, NFFT=512) s.periodogram() s.plot() s.window = "hanning" # same as default (nothing happens) s.window = "hann" try: s.window = "dummy" assert False except: assert True print(s) s.lag = -1 s.lag = 5