nussl/separation/primitive/ft2d.py
def filter_quadrants(data, quadrants_to_keep):
        """
        Filters the quadrants of the incoming 2DFT, deleting the ones not in 
        `quadrants_to_keep`. Those are zero'd out. This can be used to separate
        upward moving from downward moving spectro-temporal patterns.
        
        .. code-block:: none
        
            1: shape[0] // 2:, :shape[1] // 2
            2: :shape[0] // 2, :shape[1] // 2
            3: :shape[0] // 2, shape[1] // 2:
            4: shape[0] // 2:, shape[1] // 2:
        
        Args:
            data ([type]): [description]
            quadrants_to_keep ([type]): [description]
        
        Returns:
            [type]: [description]
        """

        shape = data.shape
        for quadrant in range(4):
            if quadrant not in quadrants_to_keep:
                if quadrant == 0:
                    data[shape[0] // 2:, :shape[1] // 2] = 0
                elif quadrant == 1:
                    data[:shape[0] // 2, :shape[1] // 2] = 0
                elif quadrant == 2:
                    data[:shape[0] // 2, shape[1] // 2:] = 0
                elif quadrant == 3:
                    data[shape[0] // 2:, shape[1] // 2:] = 0
        return data

        Filters the quadrants of the incoming 2DFT, deleting the ones not in 
        `quadrants_to_keep`. Those are zero'd out. This can be used to separate
        upward moving from downward moving spectro-temporal patterns.
        
        .. code-block:: none
        
            1: shape[0] // 2:, :shape[1] // 2
            2: :shape[0] // 2, :shape[1] // 2
            3: :shape[0] // 2, shape[1] // 2:
            4: shape[0] // 2:, shape[1] // 2:
        
        Args:
            data ([type]): [description]
            quadrants_to_keep ([type]): [description]
        
        Returns:
            [type]: [description]
        
Filters the quadrants of the incoming 2DFT, deleting the ones not in
`quadrants_to_keep`. Those are zero'd out. This can be used to separate
upward moving from downward moving spectro-temporal patterns.

code-block:: none


Filters the quadrants of the incoming 2DFT deleting the ones not in ` quadrants_to_keep ` . Those are zero ' d out . This can be used to separate upward moving from downward moving spectro - temporal patterns . code - block :: none
def filter_quadrants(data, quadrants_to_keep):
        shape = data.shape
        for quadrant in range(4):
            if quadrant not in quadrants_to_keep:
                if quadrant == 0:
                    data[shape[0] // 2:, :shape[1] // 2] = 0
                elif quadrant == 1:
                    data[:shape[0] // 2, :shape[1] // 2] = 0
                elif quadrant == 2:
                    data[:shape[0] // 2, shape[1] // 2:] = 0
                elif quadrant == 3:
                    data[shape[0] // 2:, shape[1] // 2:] = 0
        return data
def filter_quadrants ( data , quadrants_to_keep ) : shape = data . shape for quadrant in range ( 4 ) : if quadrant not in quadrants_to_keep : if quadrant == 0 : data [ shape [ 0 ] // 2 : , : shape [ 1 ] // 2 ] = 0 elif quadrant == 1 : data [ : shape [ 0 ] // 2 , : shape [ 1 ] // 2 ] = 0 elif quadrant == 2 : data [ : shape [ 0 ] // 2 , shape [ 1 ] // 2 : ] = 0 elif quadrant == 3 : data [ shape [ 0 ] // 2 : , shape [ 1 ] // 2 : ] = 0 return data
Filters the quadrants of the incoming 2DFT, deleting the ones not in
`quadrants_to_keep`.
Filters the quadrants of the incoming 2DFT deleting the ones not in ` quadrants_to_keep ` .
"""
        Filters the quadrants of the incoming 2DFT, deleting the ones not in 
        `quadrants_to_keep`. Those are zero'd out. This can be used to separate
        upward moving from downward moving spectro-temporal patterns.
        
        .. code-block:: none
        
            1: shape[0] // 2:, :shape[1] // 2
            2: :shape[0] // 2, :shape[1] // 2
            3: :shape[0] // 2, shape[1] // 2:
            4: shape[0] // 2:, shape[1] // 2:
        
        Args:
            data ([type]): [description]
            quadrants_to_keep ([type]): [description]
        
        Returns:
            [type]: [description]
        """
None
[type]
data
None
quadrants_to_keep
None