Commit 12a394ce authored by Matthew David Pitkin's avatar Matthew David Pitkin

ppe_init.[c,h],ppe_likelihood.c: allow use of multi-variate GMM prior

Original: 1770da7a3f4e36e1e04eea4e57e34c536435d3ec
parent 2d1d5919
......@@ -51,6 +51,9 @@ void add_correlation_matrix( LALInferenceVariables *ini,
void sum_data( LALInferenceRunState *runState );
void LogSampleToFile(LALInferenceVariables *algorithmParams, LALInferenceVariables *vars);
void LogSampleToArray(LALInferenceVariables *algorithmParams, LALInferenceVariables *vars);
REAL8Vector** parse_gmm_means(CHAR *meanstr, UINT4 npars, UINT4 nmodes);
gsl_matrix** parse_gmm_covs(CHAR *covstr, UINT4 npars, UINT4 nmodes);
CHAR* get_bracketed_string(CHAR *dest, const CHAR *bstr, int openbracket, int closebracket);
void initialise_threads(LALInferenceRunState *state, INT4 nthreads);
#ifdef __cplusplus
......
......@@ -512,9 +512,9 @@ REAL8 priorFunction( LALInferenceRunState *runState, LALInferenceVariables *para
}
}
}
/* check if using a 1d Gaussian Mixture Model prior */
else if( LALInferenceCheck1DGMMPrior(runState->priorArgs, item->name) ){
prior += LALInference1DGMMPrior( runState->priorArgs, item->name, value );
/* check if using a Gaussian Mixture Model prior */
else if( LALInferenceCheckGMMPrior(runState->priorArgs, item->name) ){
prior += LALInferenceGMMPrior( runState->priorArgs, item->name, value );
}
/* check for log(uniform) prior */
else if( LALInferenceCheckLogUniformPrior(runState->priorArgs, item->name) ){
......@@ -551,7 +551,7 @@ REAL8 priorFunction( LALInferenceRunState *runState, LALInferenceVariables *para
LALInferenceGetCorrelatedPrior( runState->priorArgs, corlist->data[0], &cor, &invcor, &mu, &sigma, &idx );
/* get the log prior (this only works properly if the parameter values have been prescaled so as to be from a
* Gaussian of zero mean and unit variance, which happens on line 473) */
* Gaussian of zero mean and unit variance, which happens on line 510) */
vals = gsl_vector_view_array( corVals->data, corVals->length );
XLAL_CALLGSL( gsl_blas_dgemv(CblasNoTrans, 1., invcor, &vals.vector, 0., vm) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment