diff --git a/tftb/processing/base.py b/tftb/processing/base.py index bee2e57..8bc1e08 100644 --- a/tftb/processing/base.py +++ b/tftb/processing/base.py @@ -61,7 +61,8 @@ def _make_window(self): h += 1 - np.remainder(h, 2) from scipy import hamming fwindow = hamming(int(h)) - fwindow = fwindow / np.linalg.norm(fwindow) + # No need to normalize the window + # fwindow = fwindow / np.linalg.norm(fwindow) return fwindow def plot(self, ax=None, kind='cmap', show=True, default_annotation=True, diff --git a/tftb/processing/cohen.py b/tftb/processing/cohen.py index 0a36bd6..96bb837 100644 --- a/tftb/processing/cohen.py +++ b/tftb/processing/cohen.py @@ -258,5 +258,6 @@ def smoothed_pseudo_wigner_ville(signal, timestamps=None, freq_bins=None, from tftb.generators import fmlin sig = fmlin(128, 0.1, 0.4)[0] spec = PseudoWignerVilleDistribution(sig) - spec.run() - spec.plot() + tfr, _, _ = spec.run() + from scipy.io import savemat + savemat("/tmp/foo.mat", dict(tfr2=tfr)) diff --git a/tftb/processing/tests/test_cohen.py b/tftb/processing/tests/test_cohen.py index 5bdd7d0..ed9994b 100644 --- a/tftb/processing/tests/test_cohen.py +++ b/tftb/processing/tests/test_cohen.py @@ -16,7 +16,6 @@ from tftb.processing import cohen from tftb.generators import fmsin, fmlin from tftb.tests.base import TestBase -from nose import SkipTest class TestCohen(TestBase): @@ -75,7 +74,6 @@ def test_wigner_ville_regionprops(self): def test_pseudo_wv_energy(self): """Test the energy property of the pseudo WV representation.""" - raise SkipTest("Known failure.") signal, _ = fmsin(128) signal = signal / 128.0 tfr, _, _ = cohen.PseudoWignerVilleDistribution(signal).run()