contrib/stack/topsStack/s1_select_ion.py
def check_aoi(group, s, n):
    '''
    check each group to see if it fully covers [s, n], if not remove the acquistion
    s: south bound
    n: north bound
    '''

    print('\nchecking if each acquistion fully covers user specifed south/north bound [{}, {}]'.format(s, n))

    acquistion_removed_indices = []
    ngroup = len(group)
    for i in range(ngroup):
        snwe = acquistion_snwe(group[i])
        if not (snwe[0] <= s and snwe[1] >= n):
            acquistion_removed_indices.append(i)

    #remove acquistions
    if acquistion_removed_indices != []:
        group_new = [group[i] for i in range(ngroup) if i not in acquistion_removed_indices]
        print('acquistions removed:')
        for i in acquistion_removed_indices:
            for j in range(len(group[i])):
                print('%s %3d'%(os.path.basename(group[i][j].safe_file), i+1))
    else:
        group_new = group
        print('no acquistions removed')

    return group_new

    check each group to see if it fully covers [s, n], if not remove the acquistion
    s: south bound
    n: north bound
    
check each group to see if it fully covers [s, n], if not remove the acquistion
s: south bound
n: north bound
check each group to see if it fully covers [ s n ] if not remove the acquistion s : south bound n : north bound
def check_aoi(group, s, n):
    print('\nchecking if each acquistion fully covers user specifed south/north bound [{}, {}]'.format(s, n))
    acquistion_removed_indices = []
    ngroup = len(group)
    for i in range(ngroup):
        snwe = acquistion_snwe(group[i])
        if not (snwe[0] <= s and snwe[1] >= n):
            acquistion_removed_indices.append(i)
    if acquistion_removed_indices != []:
        group_new = [group[i] for i in range(ngroup) if i not in acquistion_removed_indices]
        print('acquistions removed:')
        for i in acquistion_removed_indices:
            for j in range(len(group[i])):
                print('%s %3d'%(os.path.basename(group[i][j].safe_file), i+1))
    else:
        group_new = group
        print('no acquistions removed')
    return group_new
def check_aoi ( group , s , n ) : print ( '\nchecking if each acquistion fully covers user specifed south/north bound [{}, {}]' . format ( s , n ) ) acquistion_removed_indices = [ ] ngroup = len ( group ) for i in range ( ngroup ) : snwe = acquistion_snwe ( group [ i ] ) if not ( snwe [ 0 ] <= s and snwe [ 1 ] >= n ) : acquistion_removed_indices . append ( i ) if acquistion_removed_indices != [ ] : group_new = [ group [ i ] for i in range ( ngroup ) if i not in acquistion_removed_indices ] print ( 'acquistions removed:' ) for i in acquistion_removed_indices : for j in range ( len ( group [ i ] ) ) : print ( '%s %3d' % ( os . path . basename ( group [ i ] [ j ] . safe_file ) , i + 1 ) ) else : group_new = group print ( 'no acquistions removed' ) return group_new
check each group to see if it fully covers [s, n], if not remove the acquistion
s: south bound
n: north bound
check each group to see if it fully covers [ s n ] if not remove the acquistion s : south bound n : north bound
'''
    check each group to see if it fully covers [s, n], if not remove the acquistion
    s: south bound
    n: north bound
    ''' #remove acquistions
group
s
n