def convert_to_physical(a_coeffs, b_coeffs, logic_x, logic_y):
    """
    Convert to physical coordinates from logical coordinates.

    Parameters
    ----------
    a_coeffs : array
        Perspective transformation coefficients for alpha.
    b_coeffs : array
        Perspective transformation coefficients for beta.
    logic_x : float
        Logical point in the x direction.
    logic_y : float
        Logical point in the y direction.

    Returns
    -------
    x, y : tuple
        The x and y physical values on the specified grid.
    """
    # x = a(1) + a(2)*l + a(3)*m + a(4)*l*m
    x = (a_coeffs[0] + a_coeffs[1] * logic_x + a_coeffs[2]
         * logic_y + a_coeffs[3] * logic_x * logic_y)
    # y = b(1) + b(2)*l + b(3)*m + b(4)*l*m
    y = (b_coeffs[0] + b_coeffs[1] * logic_x +
         b_coeffs[2] * logic_y + b_coeffs[3] * logic_x * logic_y)
    return x, y