contrib/stack/topsStack/s1_select_ion.py
def check_different_starting_ranges(group):
    '''
    checking if there are different starting ranges in each acquistion.
    '''

    print('\nchecking if there are different starting ranges in each acquistion')

    acquistion_removed_indices = []
    ngroup = len(group)
    for i in range(ngroup):
        ngroupi = len(group[i])
        for j in range(1, ngroupi):
            if group[i][0].startingRanges != group[i][j].startingRanges:
                acquistion_removed_indices.append(i)
                #print('++++++++++++++{} {}'.format(group[i][0].safe_file, group[i][j].safe_file))
                break

    #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

    checking if there are different starting ranges in each acquistion.
    
checking if there are different starting ranges in each acquistion.
checking if there are different starting ranges in each acquistion .
def check_different_starting_ranges(group):
    print('\nchecking if there are different starting ranges in each acquistion')
    acquistion_removed_indices = []
    ngroup = len(group)
    for i in range(ngroup):
        ngroupi = len(group[i])
        for j in range(1, ngroupi):
            if group[i][0].startingRanges != group[i][j].startingRanges:
                acquistion_removed_indices.append(i)
                break
    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_different_starting_ranges ( group ) : print ( '\nchecking if there are different starting ranges in each acquistion' ) acquistion_removed_indices = [ ] ngroup = len ( group ) for i in range ( ngroup ) : ngroupi = len ( group [ i ] ) for j in range ( 1 , ngroupi ) : if group [ i ] [ 0 ] . startingRanges != group [ i ] [ j ] . startingRanges : acquistion_removed_indices . append ( i ) break 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
checking if there are different starting ranges in each acquistion.
checking if there are different starting ranges in each acquistion .
'''
    checking if there are different starting ranges in each acquistion.
    ''' #print('++++++++++++++{} {}'.format(group[i][0].safe_file, group[i][j].safe_file)) #remove acquistions
group