def get_stable_pixels(pixel_disp, wave_arm=100, frac=0.20):
    """

    Parameters
    ----------
    pixel_disp: np.ndarray
        dispersion array
    wave_arm: int
        the arm length in terms of pixels
    frac: float
        the reserved fraction, between 0.00 and 1.00

    Returns
    -------
    ind_stable

    """
    ind_stable = np.zeros_like(pixel_disp, dtype=np.bool)

    for i in range(len(ind_stable)):
        edge_l = np.max([i - wave_arm, 0])
        edge_r = np.min([i + wave_arm, len(pixel_disp)])
        if pixel_disp[i] <= \
                np.percentile(pixel_disp[edge_l:edge_r], frac * 100.):
            ind_stable[i] = True

    return ind_stable