pymks/filter.py
def convolve(self, X):
        """
        Convolve X with a kernel in frequency space.

        Args:
            X: array to be convolved

        Returns:
            correlation of X with the kernel
        """
        Fkernel_shape = np.array(self.Fkernel.shape)[self.axes]
        FX = np.fft.fftn(X, axes=self.axes, s=Fkernel_shape)
        Fy = self._sum(FX * self.Fkernel)
        correlation = np.real_if_close(
            np.fft.ifftn(Fy, axes=self.axes))
        return np.real_if_close(np.fft.fftshift(correlation, axes=self.axes),
                                tol=1e7)

        Convolve X with a kernel in frequency space.

        Args:
            X: array to be convolved

        Returns:
            correlation of X with the kernel
        
Convolve X with a kernel in frequency space.
Convolve X with a kernel in frequency space .
def convolve(self, X):
        Fkernel_shape = np.array(self.Fkernel.shape)[self.axes]
        FX = np.fft.fftn(X, axes=self.axes, s=Fkernel_shape)
        Fy = self._sum(FX * self.Fkernel)
        correlation = np.real_if_close(
            np.fft.ifftn(Fy, axes=self.axes))
        return np.real_if_close(np.fft.fftshift(correlation, axes=self.axes),
                                tol=1e7)
def convolve ( self , X ) : Fkernel_shape = np . array ( self . Fkernel . shape ) [ self . axes ] FX = np . fft . fftn ( X , axes = self . axes , s = Fkernel_shape ) Fy = self . _sum ( FX * self . Fkernel ) correlation = np . real_if_close ( np . fft . ifftn ( Fy , axes = self . axes ) ) return np . real_if_close ( np . fft . fftshift ( correlation , axes = self . axes ) , tol = 1e7 )
Convolve X with a kernel in frequency space.
Convolve X with a kernel in frequency space .
"""
        Convolve X with a kernel in frequency space.

        Args:
            X: array to be convolved

        Returns:
            correlation of X with the kernel
        """
correlation of X with the kernel
correlation of X with the kernel
self
X
array to be convolved
array to be convolved