def test_001_t (self):
        # set up fg
	src_data = (-3 + 1j , 4 + 2j, -5 + 5j, 2)
	for i in range(6000):
		src_data = src_data + (-3 + 1j , 4 + 2j, -5 + 5j, 2)
        #expected_result0 = (-3 + 1j, -4 + 2j, -5 + 5j, -2)
	#expected_result1 = (4 + 2j, -3 - 1j , 2 , -5 -5j)
        src = blocks.vector_source_c(src_data)
        mmtx = mimo.alamouti_encode_cc()

	add = blocks.add_cc()

	mmrx = mimo.alamouti_decode_cc()
        dst = blocks.vector_sink_c()

        self.tb.connect(src, mmtx)
        self.tb.connect((mmtx,0), (add,0))
	self.tb.connect((mmtx,1), (add,1))
	self.tb.connect(add, (mmrx,0))
	self.tb.connect(add, (mmrx,1))
	self.tb.connect(mmrx, dst)
        self.tb.run ()
        # check data
	result_data = dst.data()
	print len(result_data)
	#for i in range(len(result_data)):
	#	print result_data[i]
	#	print src_data[i]
        self.assertComplexTuplesAlmostEqual(src_data , result_data, 1025)
    def test_001_t(self):
        # set up fg
        src_data = (-3 + 1j, 4 + 2j, -5 + 5j, 2)
        for i in range(6000):
            src_data = src_data + (-3 + 1j, 4 + 2j, -5 + 5j, 2)

    #expected_result0 = (-3 + 1j, -4 + 2j, -5 + 5j, -2)
        #expected_result1 = (4 + 2j, -3 - 1j , 2 , -5 -5j)
        src = blocks.vector_source_c(src_data)
        mmtx = mimo.alamouti_encode_cc()

        add = blocks.add_cc()

        mmrx = mimo.alamouti_decode_cc()
        dst = blocks.vector_sink_c()

        self.tb.connect(src, mmtx)
        self.tb.connect((mmtx, 0), (add, 0))
        self.tb.connect((mmtx, 1), (add, 1))
        self.tb.connect(add, (mmrx, 0))
        self.tb.connect(add, (mmrx, 1))
        self.tb.connect(mmrx, dst)
        self.tb.run()
        # check data
        result_data = dst.data()
        print len(result_data)
        #for i in range(len(result_data)):
        #	print result_data[i]
        #	print src_data[i]
        self.assertComplexTuplesAlmostEqual(src_data, result_data, 1025)
    def notest_001_t (self):
	src_data = (-3 + 1j , 4 + 2j, -5 + 5j, 2)
	#alamouti code ant1
        exp_data0 = (-3 + 1j, -4 + 2j, -5 + 5j, -2)
	#alamouti code ant2
	exo_data1 = (4 + 2j, -3 - 1j , 2 , -5 -5j)

        src = blocks.vector_source_c(src_data)
        mm = mimo.alamouti_encode_cc()
        dst0 = blocks.vector_sink_c()	
        dst1 = blocks.vector_sink_c()
        self.tb.connect(src, mm)
	self.tb.connect((mm,0), dst0)
	self.tb.connect((mm,1), dst1)
        self.tb.run ()
        # check data
	result_data0 = dst0.data()	
	result_data1 = dst1.data()
        self.assertComplexTuplesAlmostEqual(exp_data0, result_data0, 5)
        self.assertComplexTuplesAlmostEqual(exp_data1, result_data1, 5)
    def notest_001_t(self):
        src_data = (-3 + 1j, 4 + 2j, -5 + 5j, 2)
        #alamouti code ant1
        exp_data0 = (-3 + 1j, -4 + 2j, -5 + 5j, -2)
        #alamouti code ant2
        exo_data1 = (4 + 2j, -3 - 1j, 2, -5 - 5j)

        src = blocks.vector_source_c(src_data)
        mm = mimo.alamouti_encode_cc()
        dst0 = blocks.vector_sink_c()
        dst1 = blocks.vector_sink_c()
        self.tb.connect(src, mm)
        self.tb.connect((mm, 0), dst0)
        self.tb.connect((mm, 1), dst1)
        self.tb.run()
        # check data
        result_data0 = dst0.data()
        result_data1 = dst1.data()
        self.assertComplexTuplesAlmostEqual(exp_data0, result_data0, 5)
        self.assertComplexTuplesAlmostEqual(exp_data1, result_data1, 5)