#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 jaidev <jaidev@newton>
#
# Distributed under terms of the MIT license.

"""
=============================================
Wigner-Ville Distribution of a Doppler Signal
=============================================

This example shows the Wigner-Ville distribution of a Doppler signal. The
signal steadily rises and falls, but there are many interference terms present
in the time-friequency plane, due to the bilinearity of the signal.

Figure 4.2 from the tutorial.
"""

from tftb.generators import doppler
from tftb.processing import WignerVilleDistribution

fm, am, iflaw = doppler(256, 50.0, 13.0, 10.0, 200.0)
sig = am * fm
dist = WignerVilleDistribution(sig)
tfr, times, freqs = dist.run()
dist.plot(show_tf=True, kind="contour", scale="log")
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 jaidev <jaidev@newton>
#
# Distributed under terms of the MIT license.

"""
Example from section 2.6 of the tutorial.
Doppler Signal.
"""

from tftb.generators import doppler
from numpy import real
import matplotlib.pyplot as plt

fm, am, _ = doppler(256.0, 200.0, 4000.0 / 60.0, 10.0, 50.0)
signal = am * fm

plt.plot(real(signal))
plt.xlabel('Time')
plt.ylabel('Real part')
plt.title('Doppler')
plt.xlim(0, 256)
plt.grid()
plt.show()
Esempio n. 3
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 jaidev <jaidev@newton>
#
# Distributed under terms of the MIT license.
"""
=============================================
Wigner-Ville Distribution of a Doppler Signal
=============================================

This example shows the Wigner-Ville distribution of a Doppler signal. The
signal steadily rises and falls, but there are many interference terms present
in the time-friequency plane, due to the bilinearity of the signal.

Figure 4.2 from the tutorial.
"""

from tftb.generators import doppler
from tftb.processing import WignerVilleDistribution

fm, am, iflaw = doppler(256, 50.0, 13.0, 10.0, 200.0)
sig = am * fm
dist = WignerVilleDistribution(sig)
tfr, times, freqs = dist.run()
dist.plot(show_tf=True, kind="contour", scale="log")
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 jaidev <jaidev@newton>
#
# Distributed under terms of the MIT license.
"""
==============
Doppler Signal
==============

Generate a Doppler Signal.

Figure 2.8 from the tutorial.
"""

from tftb.generators import doppler
from numpy import real
import matplotlib.pyplot as plt

fm, am, _ = doppler(256.0, 200.0, 4000.0 / 60.0, 10.0, 50.0)
signal = am * fm

plt.plot(real(signal))
plt.xlabel('Time')
plt.ylabel('Real part')
plt.title('Doppler')
plt.xlim(0, 256)
plt.grid()
plt.show()
Esempio n. 5
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 jaidev <jaidev@newton>
#
# Distributed under terms of the MIT license.
"""

"""

from tftb.generators import doppler
import numpy as np
import matplotlib.pyplot as plt

fm, am, iflaw = doppler(512, 200.0, 65.0, 10.0, 50.0)
plt.subplot(211), plt.plot(np.real(am * fm))
plt.title('Doppler')
plt.grid()
plt.xlim(0, 512)
plt.subplot(212), plt.plot(iflaw)
plt.title('Instantaneous Freqeuncy')
plt.grid()
plt.xlim(0, 512)

plt.show()
Esempio n. 6
0
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 jaidev <jaidev@newton>
#
# Distributed under terms of the MIT license.

"""

"""


from tftb.generators import doppler
import numpy as np
import matplotlib.pyplot as plt

fm, am, iflaw = doppler(512, 200.0, 65.0, 10.0, 50.0)
plt.subplot(211), plt.plot(np.real(am * fm))
plt.title('Doppler')
plt.grid()
plt.xlim(0, 512)
plt.subplot(212), plt.plot(iflaw)
plt.title('Instantaneous Freqeuncy')
plt.grid()
plt.xlim(0, 512)

plt.show()