def pixel(sources, settings):
    """
    Remove sources based on pixel coordinates

    input
    ------
    sources - pandas dataframe, SCAMP full catalog
    settings - dictionary, contains the specified filter parameters

    return
    ------
    sources - pandas dataframe, sources data without the sources filtered in this step
    """
    delta_pixel = settings['DELTA_PIXEL']
    for source_number, group in sources.copy().groupby('SOURCE_NUMBER'):
        x_img = group['XWIN_IMAGE']
        y_img = group['YWIN_IMAGE']
        if x_img.max() - x_img.min() < delta_pixel:
            if y_img.max() - y_img.min() < delta_pixel:
                sources = sources[sources.SOURCE_NUMBER != source_number]
    return sources
