def Y_i(i,A,X):
    """
    Calculate band `i` of the coordinate rotation described in equation 8 of
    Lyzenga 1978.

    Parameters
    ----------
    i : int
        The band number of `Y` to calculate.
    A : np.array
        The coordinate system rotation parameters calculated by the method
        `Aij` and described in Appendix B of Lyzenga 1978.
    X : np.ma.MaskedArray
        The array of log transformed radiance values from equation B1 of
        Lyzenga 1978.

    Returns
    -------
    np.array
        A single band of the bands described in equation 8 of Lyzenga 1978. The
        band will be depth-invariant if `i` < `N` (the number of bands).
    """
    return (A[i,:] * X[...,:]).sum(2)