def find_lpc_bf(x, order, bad_roots, fix_mode, method):
    # find backward LP coefficients
    D, d = make_Dd(x, order, 'b')
    a = find_lpc(D, d, method)

    # stabilize roots if needed
    if bad_roots is not None:
        poles = find_roots(a, 'b')
        poles = fix_roots(poles, bad_roots, fix_mode)
        a = find_coeff(poles, 'b')
    # store the forward coefficients
    backward_a = a.copy()

    # find the forward LP coefficients
    D, d = make_Dd(x, order, 'f')
    a = find_lpc(D, d, method)

    # find poles, reverse poles
    poles = find_roots(a, 'f')
    poles = [1. / pole for pole in poles]
    # stabilize roots if needed
    if bad_roots is not None:
        poles = fix_roots(poles, bad_roots, fix_mode)
    # find the forward predicted, backward ordered coefficients
    forward_a = find_coeff(poles, 'b')

    # average the forward and backward coefficients
    return (forward_a + backward_a) / 2.


#####################################
# root finding and fixing functions #
#####################################
Determind LP coefficient using backward-forward linear prediction.
dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/process/proc_lp.py/find_lpc_bf