def flip(di_block, combine=False):
    """
    determines 'normal' direction along the principle eigenvector, then flips the antipodes of
    the reverse mode to the antipode

    Parameters
    ___________
    di_block : nested list of directions
    Return
    D1 : normal mode
    D2 : flipped reverse mode as two DI blocks
    combine : if True return combined D1, D2, nested D,I pairs
    """
    ppars = doprinc(di_block)  # get principle direction
    if combine:
        D3 = []
    D1, D2 = [], []
    for rec in di_block:
        ang = angle([rec[0], rec[1]], [ppars['dec'], ppars['inc']])
        if ang > 90.:
            d, i = (rec[0] - 180.) % 360., -rec[1]
            D2.append([d, i])
            if combine:
                D3.append([d, i])
        else:
            D1.append([rec[0], rec[1]])
            if combine:
                D3.append([rec[0], rec[1]])
    if combine:
        return D3
    else:
        return D1, D2
determines 'normal' direction along the principle eigenvector, then flips the antipodes of
    the reverse mode to the antipode

    Parameters
    ___________
    di_block : nested list of directions
    Return
    D1 : normal mode
    D2 : flipped reverse mode as two DI blocks
    combine : if True return combined D1, D2, nested D,I pairs