Пример #1
0
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()
Пример #2
0
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()
Пример #3
0
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)
Пример #4
0
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)
Пример #5
0
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
Пример #6
0
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
Пример #7
0
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
Пример #8
0
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)