Commit 2f0f8e60 authored by John Douglas Veitch's avatar John Douglas Veitch

Working on normalisation

parent 1f9eaa7e
......@@ -1292,6 +1292,11 @@ LALInferenceModel *LALInferenceInitCBCModel(LALInferenceRunState *state) {
LALInferenceRegisterUniformVariableREAL8(state, model->params, "logdistance", log(Dinitial), log(Dmin), log(Dmax), distanceVary) ;
if(! (LALInferenceGetProcParamVal(commandLine,"--margphi") || LALInferenceGetProcParamVal(commandLine, "--margtimephi")))
fprintf(stderr,"ERROR: --margdist requires either --margphi or --margtimephi to be enabled");
/* If using margdist, remove the distance parameters and add the ranges into the model params as a way of passing them in */
REAL8 a = log(Dmin), b=log(Dmax);
LALInferenceAddMinMaxPrior(model->params, "logdistance", &a, &b, LALINFERENCE_REAL8_t);
......@@ -1138,7 +1138,7 @@ static REAL8 LALInferenceFusedFreqDomainLogLikelihood(LALInferenceVariables *cur
if(margdist )
loglikelihood = LALInferenceMarginalDistanceLogLikelihood(dist_min, dist_max, sqrt(S), R);
loglikelihood = LALInferenceMarginalDistanceLogLikelihood(dist_min, dist_max, sqrt(S), 0.5*R);
loglikelihood -= D ;
REAL8 distance_maxl = 2.0*S/R;
LALInferenceAddVariable(currentParams, "distance_maxl", &distance_maxl, LALINFERENCE_REAL8_t, LALINFERENCE_PARAM_OUTPUT);
#include <gsl/gsl_spline.h>
#include <gsl/gsl_interp.h>
#include "cubic_interp.h"
#include <lal/cubic_interp.h>
typedef struct taglog_radial_integrator {
bicubic_interp *region0;
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