Commit 1b351ad3 authored by Marcella Wijngaarden's avatar Marcella Wijngaarden

Update CBC waveform in extrinsic likelihood + less debug output

parent 542dfb34
Pipeline #159232 failed with stages
in 1 minute and 40 seconds
......@@ -4641,8 +4641,6 @@ void projectCBCWaveform(double *ampphase, int N, int NI, double fmin, double Tob
}
}
}
printf("done the loop!\n");
}
void geowave(double *gwave, RealVector *freq, double *params, int N, struct bayesCBC *rundata)
......
......@@ -886,7 +886,7 @@ double EvaluateExtrinsicMarkovianLogLikelihood(struct Network *projection, doubl
if(data->bayesCBCFlag)
{
// for(i=0; i<NI; i++) for(n=0; n<N; n++) c[i][n] = 0.0;
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, extParams, c, projection->dtimes, projection->Fplus, projection->Fcross);
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, params, c, projection->dtimes, projection->Fplus, projection->Fcross);
}
//Form up residual
......@@ -902,8 +902,6 @@ double EvaluateExtrinsicMarkovianLogLikelihood(struct Network *projection, doubl
logL += loglike(imin, imax, r[ifo], invSnf[ifo]);
}
// if(data->bayesCBCFlag) print_projected_cbc_waveform(c[ifo][n]);
free_double_matrix(h,NI-1);
free_double_matrix(r,NI-1);
free_double_matrix(t,NP-1);
......@@ -949,7 +947,7 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
//compute instrument response from cbc waveform at geocenter with extrinsic params
if(data->bayesCBCFlag)
{
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, extParams, c, projection->dtimes, projection->Fplus, projection->Fcross);
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, params, c, projection->dtimes, projection->Fplus, projection->Fcross);
}
//Form up residual
......@@ -993,10 +991,10 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
computeProjectionCoeffs(data, projection, params, data->fmin, data->fmax);
waveformProject(data, projection, params, h, t, data->fmin, data->fmax);
compute instrument response from cbc waveform at geocenter with extrinsic params
// compute instrument response from cbc waveform at geocenter with extrinsic params
if(data->bayesCBCFlag)
{
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, extParams, c, projection->dtimes, projection->Fplus, projection->Fcross);
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, params, c, projection->dtimes, projection->Fplus, projection->Fcross);
}
//Form up residual
......
......@@ -1358,7 +1358,7 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
{
model[chain->index[ic]]->cbcParams[i] = bayescbc->pallx[chain->index[ic]][i];
}
// cbcGeoTemplate(bayescbc, chain->index[ic], data->N, model[chain->index[ic]]->cbcamphase);
// cbcGeoAmpPhase(bayescbc, chain->index[ic], data->N, model[chain->index[ic]]->cbcamphase);
// waveformProject(data, model[chain->index[ic]]->projection, model[chain->index[ic]]->extParams, model[chain->index[ic]]->cbctemplate, model[chain->index[ic]]->cbcamphase, data->fmin, data->fmax);
}
......@@ -1369,7 +1369,6 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
copy_cbc_model(model[chain->index[0]], model_MAP, N, NI, data->NX);
fprintf(stdout, " ======= End of CBC_burnin() ======\n");
for(ic=0; ic<chain->NC; ic++) printf("chain %i -> index %i\n", ic, chain->index[ic]);
}
/******************************************************************************/
......@@ -2743,7 +2742,7 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
bayescbc->mxc[0] = chain->mc;
bayescbc->who = chain->index;
if (bayescbc->debug==1) printf("before BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f \n", chain->index[ic], ic, model_x->logL, model_x->logLnorm, bayescbc->logLx[icbc]);
// if (bayescbc->debug==1) printf("before BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f \n", chain->index[ic], ic, model_x->logL, model_x->logLnorm, bayescbc->logLx[icbc]);
// Do updates
BayesCBC_MCMC(M, N, data->Tobs, data->trigtime, chain->seed, istart, bayescbc, ic, model_x->cbcamphase);
......@@ -2788,7 +2787,7 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
}
}
if (bayescbc->debug==1) printf("after BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f \n", chain->index[ic], ic, model_x->logL, model_x->logLnorm, bayescbc->logLx[icbc]);
// if (bayescbc->debug==1) printf("after BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f \n", chain->index[ic], ic, model_x->logL, model_x->logLnorm, bayescbc->logLx[icbc]);
return;
}
......
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