Beispiel #1
0
    def test_BER_FFFFT(self):
        p = gfdm.get_defaultGFDM('small')
        D = do_map(p, np.arange(p.K * p.M))
        x = do_modulate(p, D)

        Dh = DefaultDemodulator(p, 'ZFFFT').demodulate(x)
        nt.assert_array_almost_equal(D, Dh)
Beispiel #2
0
    def test_small_MF(self):
        p = gfdm.get_defaultGFDM('small')
        p.pulse = 'dirichlet'

        D = do_map(p, np.arange(p.K * p.M))
        x = do_modulate(p, D)

        Dh = DefaultDemodulator(p, 'MF').demodulate(x)
        nt.assert_array_almost_equal(D, Dh)
Beispiel #3
0
    def test_withKset(self):
        p = gfdm.get_defaultGFDM('BER')
        p.M = 5
        del p.Mon
        p.K = 6
        p.Kset = (0, 1, 3, 5)
        p.L = p.K

        D = do_map(p, np.arange(p.M * len(p.Kset)))
        x = do_modulate(p, D)

        Dh = DefaultDemodulator(p, 'ZFFFT').demodulate(x)
        nt.assert_array_almost_equal(D, Dh)
Beispiel #4
0
    def test_customReceiverFilter(self):
        p = gfdm.get_defaultGFDM('small')
        p.pulse = 'rc_fd'

        D = do_map(p, np.arange(p.K * p.M))
        x = do_modulate(p, D)

        g = gfdmutil.get_receiver_pulse(p, 'ZF')
        Dm = DefaultDemodulator(p, 'custom')
        Dm.setFilter(pulse=g, L=16)

        Dh = Dm.demodulate(x)
        nt.assert_array_almost_equal(D, Dh)