def gram_schmidt(data):
    """
    Calculate Gram-Schmidt orthogonalization parameters.
    """
    C = (data.real * data.imag).sum()
    R = (data.real * data.real).sum()
    idata = data.imag - C / R * data.real
    S = (idata * idata).sum()
    return R / S, -C / S
