def pca_lnprior(theta,pca_dict):
    """
    Routine to evaluate the the ln of the prior probability lnPrior,
    from the Gaussian mixture model fit to the distriution of PCA
    coefficients.

    Args:
        theta (`numpy.ndarray`_):
            Parameter vector, where ``theta_pca[0]`` is redshift,
            ``theta_pca[1]`` is the normalization, and
            ``theta_pca[2:npca+1]`` are the PCA coefficients, where npca
            is the PCA dimensionality
        pca_dict (dict):
            Dictionary continaing the PCA information generated by
            ``init_pca``

    Returns:
        float: The log of the prior probability evaluated at the current
        set of coefficients in the parameter vector, i.e.  ``A =
        theta_pca[2:npca+1]``

    """
    gaussian_mixture_model = pca_dict['prior']
    A = theta[2:]
    return gaussian_mixture_model.score_samples(A.reshape(1,-1))