def test_qshift(): h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b = qshift('qshift_d') y = coldfilt(lena, h1b, h1b) z = coldfilt_gold(lena, h1b, h1a) assert_almost_equal(y, z)
def test_good_input_size_non_orthogonal(): A = coldfilt(lena[:,:511], (1,1), (1,1)) B = coldfilt_gold(lena[:,:511], (1,1), (1,1)) assert_almost_equal(A, B)
def test_output_size(): Y = coldfilt(lena, (-1,1), (1,-1)) assert Y.shape == (lena.shape[0]/2, lena.shape[1]) Z = coldfilt_gold(lena, (-1,1), (1,-1)) assert_almost_equal(Y, Z)
def test_real_wavelet(): h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b = qshift('qshift_d') A = coldfilt(lena[:,:511], h1b, h1a) B = coldfilt_gold(lena[:,:511], h1b, h1a) assert_almost_equal(A, B)
def test_good_input_size(): A = coldfilt(lena[:,:511], (-1,1), (1,-1)) B = coldfilt_gold(lena[:,:511], (-1,1), (1,-1)) assert_almost_equal(A, B)
def test_qshift(): h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b = qshift('qshift_d') y = coldfilt(mandrill, h1b, h1b) z = coldfilt_gold(mandrill, h1b, h1a) assert_almost_equal(y, z)
def test_output_size(): Y = coldfilt(mandrill, (-1,1), (1,-1)) assert Y.shape == (mandrill.shape[0]/2, mandrill.shape[1]) Z = coldfilt_gold(mandrill, (-1,1), (1,-1)) assert_almost_equal(Y, Z)
def test_good_input_size_non_orthogonal(): A = coldfilt(mandrill[:,:511], (1,1), (1,1)) B = coldfilt_gold(mandrill[:,:511], (1,1), (1,1)) assert_almost_equal(A, B)
def test_good_input_size(): A = coldfilt(mandrill[:,:511], (-1,1), (1,-1)) B = coldfilt_gold(mandrill[:,:511], (-1,1), (1,-1)) assert_almost_equal(A, B)
def test_real_wavelet(): h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b = qshift('qshift_d') A = coldfilt(mandrill[:,:511], h1b, h1a) B = coldfilt_gold(mandrill[:,:511], h1b, h1a) assert_almost_equal(A, B)