def generate_bps(perturbator, t):
    """Generate a motion perturbation field by using the method described in
    :cite:`BPS2006`.

    Parameters
    ----------
    perturbator : dict
      A dictionary returned by initialize_motion_perturbations_bps.
    t : float
      Lead time for the perturbation field (minutes).

    Returns
    -------
    out : ndarray
      Array of shape (2,m,n) containing the x- and y-components of the motion
      vector perturbations, where m and n are determined from the perturbator.

    See also
    --------
    pysteps.noise.motion.initialize_bps

    """
    vsf = perturbator["vsf"]
    p_par = perturbator["p_par"]
    p_perp = perturbator["p_perp"]
    eps_par = perturbator["eps_par"]
    eps_perp = perturbator["eps_perp"]
    V_par = perturbator["V_par"]
    V_perp = perturbator["V_perp"]

    g_par = p_par[0] * pow(t, p_par[1]) + p_par[2]
    g_perp = p_perp[0] * pow(t, p_perp[1]) + p_perp[2]

    return (g_par * eps_par * V_par + g_perp * eps_perp * V_perp) / vsf