Пример #1
0
def _test_xcorr_versus_CORRELATION_imag_data():
    from spectrum.tools import twosided as func
    x = array([1, 2, 3, 4, 5 + 1.j])

    for norm in ['biased', 'unbiased', 'coeff', None]:
        corr1, l = xcorr(x, x, maxlags=4, norm=norm)
        corr2 = CORRELATION(x, x, maxlags=4, norm=norm)
        assert_array_almost_equal(corr1, func(corr2))
Пример #2
0
def _test_xcorr_versus_CORRELATION_imag_data():
    from spectrum.tools import twosided as func
    x = array([1,2,3,4,5+1.j])

    for norm in ['biased', 'unbiased', 'coeff',None]:
        corr1,l = xcorr(x, x, maxlags=4, norm=norm)
        corr2 = CORRELATION(x, x, maxlags=4, norm=norm)
        assert_array_almost_equal(corr1, func(corr2))