latools/filtering/filters.py
def trim(ind, start=1, end=0):
    """
    Remove points from the start and end of True regions.
    
    Parameters
    ----------
    start, end : int
        The number of points to remove from the start and end of
        the specified filter.
    ind : boolean array
        Which filter to trim. If True, applies to currently active
        filters.
    """

    return np.roll(ind, start) & np.roll(ind, -end)
def trim(ind, start=1, end=0):
    """
    Remove points from the start and end of True regions.
    
    Parameters
    ----------
    start, end : int
        The number of points to remove from the start and end of
        the specified filter.
    ind : boolean array
        Which filter to trim. If True, applies to currently active
        filters.
    """

    return np.roll(ind, start) & np.roll(ind, -end)
Remove points from the start and end of True regions.
    
    Parameters
    ----------
    start, end : int
        The number of points to remove from the start and end of
        the specified filter.
    ind : boolean array
        Which filter to trim. If True, applies to currently active
        filters.