(im_folder, satname)
return filepaths
Create the structure of subfolders for each satellite mission

    KV WRL 2018

    Arguments:
    -----------
    im_folder: str
        folder where the images are to be downloaded
    satname:
        name of the satellite mission

    Returns:
    -----------
    filepaths: list of str
        filepaths of the folders that were created
Create the structure of subfolders for each satellite mission
Create the structure of subfolders for each satellite mission
def create_folder_structure(im_folder, satname):
    """
    Create the structure of subfolders for each satellite mission

    KV WRL 2018

    Arguments:
    -----------
    im_folder: str
        folder where the images are to be downloaded
    satname:
        name of the satellite mission

    Returns:
    -----------
    filepaths: list of str
        filepaths of the folders that were created
    """

    # one folder for the metadata (common to all satellites)
    filepaths = [os.path.join(im_folder, satname, 'meta')]
    # subfolders depending on satellite mission
    if satname == 'L5':
        filepaths.append(os.path.join(im_folder, satname, '30m'))
    elif satname in ['L7','L8']:
        filepaths.append(os.path.join(im_folder, satname, 'pan'))
        filepaths.append(os.path.join(im_folder, satname, 'ms'))
    elif satname in ['S2']:
        filepaths.append(os.path.join(im_folder, satname, '10m'))
        filepaths.append(os.path.join(im_folder, satname, '20m'))
        filepaths.append(os.path.join(im_folder, satname, '60m'))
    # create the subfolders if they don't exist already
    for fp in filepaths:
        if not os.path.exists(fp): os.makedirs(fp)

    return filepaths
def create_folder_structure ( im_folder , satname ) : # one folder for the metadata (common to all satellites) filepaths = [ os . path . join ( im_folder , satname , 'meta' ) ] # subfolders depending on satellite mission if satname == 'L5' : filepaths . append ( os . path . join ( im_folder , satname , '30m' ) ) elif satname in [ 'L7' , 'L8' ] : filepaths . append ( os . path . join ( im_folder , satname , 'pan' ) ) filepaths . append ( os . path . join ( im_folder , satname , 'ms' ) ) elif satname in [ 'S2' ] : filepaths . append ( os . path . join ( im_folder , satname , '10m' ) ) filepaths . append ( os . path . join ( im_folder , satname , '20m' ) ) filepaths . append ( os . path . join ( im_folder , satname , '60m' ) ) # create the subfolders if they don't exist already for fp in filepaths : if not os . path . exists ( fp ) : os . makedirs ( fp ) return filepaths