(im_list, satname, prc_cloud_cover=95)
return im_list_upt
Removes from the EE collection very cloudy images (>95% cloud cover)

    KV WRL 2018

    Arguments:
    -----------
    im_list: list
        list of images in the collection
    satname:
        name of the satellite mission
    prc_cloud_cover: int
        percentage of cloud cover acceptable on the images

    Returns:
    -----------
    im_list_upt: list
        updated list of images
Removes from the EE collection very cloudy images (>95% cloud cover)
Removes from the EE collection very cloudy images ( > 95% cloud cover )
def remove_cloudy_images(im_list, satname, prc_cloud_cover=95):
    """
    Removes from the EE collection very cloudy images (>95% cloud cover)

    KV WRL 2018

    Arguments:
    -----------
    im_list: list
        list of images in the collection
    satname:
        name of the satellite mission
    prc_cloud_cover: int
        percentage of cloud cover acceptable on the images

    Returns:
    -----------
    im_list_upt: list
        updated list of images
    """

    # remove very cloudy images from the collection (>95% cloud)
    if satname in ['L5','L7','L8']:
        cloud_property = 'CLOUD_COVER'
    elif satname in ['S2']:
        cloud_property = 'CLOUDY_PIXEL_PERCENTAGE'
    cloud_cover = [_['properties'][cloud_property] for _ in im_list]
    if np.any([_ > prc_cloud_cover for _ in cloud_cover]):
        idx_delete = np.where([_ > prc_cloud_cover for _ in cloud_cover])[0]
        im_list_upt = [x for k,x in enumerate(im_list) if k not in idx_delete]
    else:
        im_list_upt = im_list

    return im_list_upt
def remove_cloudy_images ( im_list , satname , prc_cloud_cover = 95 ) : # remove very cloudy images from the collection (>95% cloud) if satname in [ 'L5' , 'L7' , 'L8' ] : cloud_property = 'CLOUD_COVER' elif satname in [ 'S2' ] : cloud_property = 'CLOUDY_PIXEL_PERCENTAGE' cloud_cover = [ _ [ 'properties' ] [ cloud_property ] for _ in im_list ] if np . any ( [ _ > prc_cloud_cover for _ in cloud_cover ] ) : idx_delete = np . where ( [ _ > prc_cloud_cover for _ in cloud_cover ] ) [ 0 ] im_list_upt = [ x for k , x in enumerate ( im_list ) if k not in idx_delete ] else : im_list_upt = im_list return im_list_upt