예제 #1
0
 def test_gabor(self):
     f = filters.Rectangular(self._G, None, 0.1)
     f = filters.Gabor(self._G, f)
     self._test_methods(f, tight=False, check=False)
     self.assertRaises(ValueError, filters.Gabor, graphs.Sensor(), f)
     f = filters.Regular(self._G)
     self.assertRaises(ValueError, filters.Gabor, self._G, f)
예제 #2
0
파일: fourier.py 프로젝트: naspert/pygsp
    def gft_windowed_gabor(self, s, k):
        r"""Gabor windowed graph Fourier transform.

        Parameters
        ----------
        s : ndarray
            Graph signal in the vertex domain.
        k : function
            Gabor kernel. See :class:`pygsp.filters.Gabor`.

        Returns
        -------
        s : ndarray
            Vertex-frequency representation of the signals.

        Examples
        --------
        >>> G = graphs.Logo()
        >>> s = np.random.normal(size=(G.N, 2))
        >>> s = G.gft_windowed_gabor(s, lambda x: x/(1.-x))
        >>> s.shape
        (1130, 2, 1130)

        """
        from pygsp import filters
        return filters.Gabor(self, k).filter(s)
예제 #3
0
 def test_modulation_gabor(self):
     """Both should be equivalent for deltas centered at the eigenvalues."""
     f = filters.Rectangular(self._G, 0, 0)
     f1 = filters.Modulation(self._G, f, modulation_first=True)
     f2 = filters.Gabor(self._G, f)
     s1 = f1.filter(self._signal)
     s2 = f2.filter(self._signal)
     np.testing.assert_allclose(s1, s2, atol=1e-5)
예제 #4
0
 def test_gabor(self):
     f = filters.Gabor(self._G, lambda x: x / (1. + x))
     self._test_methods(f, tight=False, check=False)
예제 #5
0
 def test_gabor(G, fu):
     g = filters.Gabor(G, fu)