Commit 59af5517 authored by Katerina Chatziioannou's avatar Katerina Chatziioannou
Browse files

switch some flags

parent 58e15430
Pipeline #159525 failed with stages
in 1 minute and 5 seconds
......@@ -622,7 +622,7 @@ int main(int argc, char *argv[])
struct bayesCBC *bayescbc = malloc(sizeof(struct bayesCBC));
if (data->bayesCBCFlag)
if (data->cbcModelFlag)
{
// Initialize baeyscbc with default values & allocate memory
......@@ -679,6 +679,7 @@ int main(int argc, char *argv[])
data->cleanFlag = 1;
data->glitchFlag = 1;
data->signalFlag = 0;
data->cbcFlag = 0;
data->runPhase = 0;
......@@ -948,6 +949,7 @@ int main(int argc, char *argv[])
data->cleanFlag = 0;
data->glitchFlag = 0;
data->signalFlag = 1;
data->cbcFlag = 0;
initialize_chain(chain,1);
......@@ -990,6 +992,7 @@ int main(int argc, char *argv[])
data->cleanFlag = 0;
data->glitchFlag = 1;
data->signalFlag = 0;
data->cbcFlag = 0;
initialize_chain(chain,1);
......@@ -1026,6 +1029,7 @@ int main(int argc, char *argv[])
data->cleanFlag = 0;
data->glitchFlag = 0;
data->signalFlag = 0;
data->cbcFlag = 0;
initialize_chain(chain,1);
......@@ -1068,6 +1072,7 @@ int main(int argc, char *argv[])
data->cleanFlag = 0;
data->glitchFlag = 1;
data->signalFlag = 1;
data->cbcFlag = 0;
initialize_chain(chain,1);
......@@ -1084,6 +1089,49 @@ int main(int argc, char *argv[])
data->fullModelFlag = 0;
}
/******************************************************************************/
/* */
/* CBC Characterization phase */
/* */
/******************************************************************************/
if(data->cbcModelFlag)
{
data->runPhase = 1;
reset_priors(data, prior);
//Initialize proposal ratios for GW search phase
chain->modelRate = 1; //always do signal model updates
if(data->constantLogLFlag)
chain->rjmcmcRate = 0.01;
else
chain->rjmcmcRate = 0.5;
//Shut off RJMCMC if --fixD argument given
if(data->rjFlag==0) chain->rjmcmcRate = 0.0;
data->cleanFlag = 0;
data->cbcFlag = 1;
if (data->GlitchCBCFlag) data->glitchFlag = 1; //cbc signal + glitch wavelets
if (data->SignalCBCFlag) data->signalFlag = 1; //cbc signal + signal wavelets
initialize_chain(chain,1);
reset_likelihood(data);
reset_priors(data, prior);
reset_model(data, chain, prior, model);
printf("characterizing cbc model...\n\n");
RJMCMC(data, model, bayesline, bayescbc, chain, prior, &data->logZsignal, &data->varZsignal);
//shut off signal model for checkpointing
data->cbcModelFlag = 0;
}
fprintf(evidence,"CBC %.12g %lg\n",data->logZsignal,data->varZsignal);
fflush(evidence);
/******************************************************************************/
/* */
/* Output log- and normalized evidence */
......
......@@ -288,23 +288,26 @@ struct Data
int runPhase; // (0: cleaning, 1: not cleaning phase)
int noiseSimFlag; // REMOVE
int bayesLineFlag; // use BayesLine
int bayesCBCFlag; // use BayesCBC
int stochasticFlag; // whether you use the stochastic model
// type of run modes available (uses a combination of the models below)
int fullModelFlag;
int noiseModelFlag;
int glitchModelFlag;
int signalModelFlag;
int noiseModelFlag;
int glitchModelFlag;
int signalModelFlag;
int cleanModelFlag;
int cleanOnlyFlag;
int cbcOnlyFlag;
int cbcModelFlag;
int GlitchCBCFlag;
int SignalCBCFlag;
int cleanOnlyFlag;
// models available
int cleanFlag;
int glitchFlag;
int signalFlag;
int noiseFlag;
int cbcFlag;
int skyFixFlag; //fix the sky location to the given values
......
......@@ -864,13 +864,11 @@ void print_run_flags(FILE *fptr, struct Data *data, struct Prior *prior)
fprintf(fptr, " signal model is .......... ");
if(!data->signalFlag) fprintf(fptr, "DISABLED");
else if(!data->glitchFlag || data->cbcOnlyFlag) fprintf(fptr, "REQUIRED");
else fprintf(fptr, "ENABLED");
fprintf(fptr, "\n");
fprintf(fptr, " cbc model is ............. ");
if(!data->bayesCBCFlag) fprintf(fptr, "DISABLED");
else if(data->cbcOnlyFlag) fprintf(fptr, "REQUIRED");
if(!data->cbcModelFlag) fprintf(fptr, "DISABLED");
else fprintf(fptr, "ENABLED");
fprintf(fptr, "\n");
......@@ -961,6 +959,8 @@ void print_cbc_run_stats(FILE *fptr, struct Data *data, struct bayesCBC *bayescb
fprintf(fptr, " ============ BayesCBC Settings ===========\n");
fprintf(fptr, " nr. semi-intrinsic params (NX) %i\n", bayescbc->NX);
//ADD INFO ABOUT WHETHER YOU ARE RUNNING WITH SIGNAL OR GLITCH
fprintf(fptr, " tidal version ");
if(bayescbc->NRTidal_version == NoNRT_V) fprintf(fptr,"NoNRT_V");
else if(bayescbc->NRTidal_version == NRTidal_V) fprintf(fptr,"NRTidal_V");
......@@ -1012,7 +1012,7 @@ void print_chain_files(struct Data *data, struct Chain *chain, struct Model **mo
}
//print bayescbc parameters
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
print_cbc_model(chain->cbcChainFile[ic], bayescbc, chain->index[ic], data->Tobs);
}
......@@ -1045,7 +1045,7 @@ void flush_chain_files(struct Data *data, struct Chain *chain, int ic)
}
//flush cbc file
if(data->bayesCBCFlag) fflush(chain->cbcChainFile[ic]);
if(data->cbcModelFlag) fflush(chain->cbcChainFile[ic]);
}
void print_model(FILE *fptr, struct Data *data, struct Chain *chain, struct Model *model)
......@@ -1443,7 +1443,9 @@ void parse_command_line(struct Data *data, struct Chain *chain, struct Prior *pr
//models off by default
data->fullModelFlag = 0;
data->cleanOnlyFlag = 0;
data->cbcOnlyFlag = 0;
data->cbcModelFlag = 0;
data->GlitchCBCFlag = 0;
data->SignalCBCFlag = 0;
//assume the data are analyzable
data->loudGlitchFlag = 0;
......@@ -1588,12 +1590,31 @@ void parse_command_line(struct Data *data, struct Chain *chain, struct Prior *pr
{
data->noiseModelFlag = 0;
data->glitchModelFlag = 0;
data->signalModelFlag = 1;
data->signalModelFlag = 0;
data->fullModelFlag = 0;
data->cbcOnlyFlag = 1;
data->bayesCBCFlag = 1;
data->cbcModelFlag = 1;
}
// TODO: This should also make fixIntrinsicParameters required
ppt = LALInferenceGetProcParamVal(commandLine, "--GlitchCBC");
if(ppt)
{
data->noiseModelFlag = 0;
data->glitchModelFlag = 0;
data->signalModelFlag = 0;
data->fullModelFlag = 0;
data->cbcModelFlag = 1;
data->GlitchCBCFlag = 1;
}
ppt = LALInferenceGetProcParamVal(commandLine, "--SignalCBC");
if(ppt)
{
data->noiseModelFlag = 0;
data->glitchModelFlag = 0;
data->signalModelFlag = 0;
data->fullModelFlag = 0;
data->cbcModelFlag = 1;
data->SignalCBCFlag = 1;
}
ppt = LALInferenceGetProcParamVal(commandLine, "--fullOnly");
......@@ -1708,10 +1729,6 @@ void parse_command_line(struct Data *data, struct Chain *chain, struct Prior *pr
if(ppt) data->bayesLineFlag = 1;
else data->bayesLineFlag = 0;
ppt = LALInferenceGetProcParamVal(commandLine, "--bayesCBC");
if(ppt) data->bayesCBCFlag = 1;
else data->bayesCBCFlag = 0;
ppt = LALInferenceGetProcParamVal(commandLine, "--bayesCBC-tidal");
data->NX = 7;
if(ppt)
......
......@@ -195,9 +195,9 @@ void recompute_residual(struct Data *data, struct Model **model, struct Chain *c
for(i=0; i<data->N; i++)
{
data->r[ifo][i] = data->s[ifo][i];
if(data->glitchFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->signalFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->bayesCBCFlag) data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
if(data->glitchFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->signalFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->cbcModelFlag) data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
}
}
......@@ -390,7 +390,7 @@ double EvaluateMarkovianLogLikelihood(int typ, int ii, int det, struct Model *mx
}
}
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
//subtract current CBC model from residual
for(i=0; i<N; i++)
......@@ -678,7 +678,7 @@ double EvaluateMarkovianLogLikelihood(int typ, int ii, int det, struct Model *mx
r[ifo][j] -= ry[ifo][j];
r[ifo][k] -= ry[ifo][k];
}
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
r[ifo][j] -= my->cbctemplate[ifo][j];
r[ifo][k] -= my->cbctemplate[ifo][k];
......@@ -704,7 +704,7 @@ double EvaluateMarkovianLogLikelihood(int typ, int ii, int det, struct Model *mx
r[det][j] = s[det][j] - ry[det][j] - gy[det][j];
r[det][k] = s[det][k] - ry[det][k] - gy[det][k];
if (data->bayesCBCFlag)
if (data->cbcModelFlag)
{
r[det][j] -= my->cbctemplate[det][j];
r[det][k] -= my->cbctemplate[det][k];
......@@ -760,7 +760,7 @@ double EvaluateMarkovianLogLikelihood(int typ, int ii, int det, struct Model *mx
r[ifo][j] -= ry[ifo][j];
r[ifo][k] -= ry[ifo][k];
}
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
r[ifo][j] -= my->cbctemplate[ifo][j];
r[ifo][k] -= my->cbctemplate[ifo][k];
......@@ -788,7 +788,7 @@ double EvaluateMarkovianLogLikelihood(int typ, int ii, int det, struct Model *mx
r[det][j] = s[det][j] - ry[det][j] - gy[det][j];
r[det][k] = s[det][k] - ry[det][k] - gy[det][k];
if (data->bayesCBCFlag)
if (data->cbcModelFlag)
{
r[det][j] -= my->cbctemplate[det][j];
r[det][k] -= my->cbctemplate[det][k];
......@@ -815,7 +815,7 @@ double EvaluateMarkovianLogLikelihood(int typ, int ii, int det, struct Model *mx
{
r[ifo][i] -= ry[ifo][i];
}
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
r[ifo][i] -= my->cbctemplate[ifo][i];
}
......@@ -883,7 +883,7 @@ double EvaluateExtrinsicMarkovianLogLikelihood(struct Network *projection, doubl
//compute instrument response from cbc waveform at geocenter with extrinsic params
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
// for(i=0; i<NI; i++) for(n=0; n<N; n++) c[i][n] = 0.0;
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, params, c, projection->dtimes, projection->Fplus, projection->Fcross);
......@@ -895,9 +895,9 @@ double EvaluateExtrinsicMarkovianLogLikelihood(struct Network *projection, doubl
for(n=0; n<N; n++)
{
r[ifo][n] = d[ifo][n];
if(data->signalFlag && !data->cbcOnlyFlag) r[ifo][n] -= h[ifo][n];
if(data->glitchFlag && !data->cbcOnlyFlag) r[ifo][n] -= g[ifo][n];
if(data->bayesCBCFlag) r[ifo][n] -= c[ifo][n];
if(data->signalFlag) r[ifo][n] -= h[ifo][n];
if(data->glitchFlag) r[ifo][n] -= g[ifo][n];
if(data->cbcModelFlag) r[ifo][n] -= c[ifo][n];
}
logL += loglike(imin, imax, r[ifo], invSnf[ifo]);
}
......@@ -945,7 +945,7 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
waveformProject(data, projection, params, h, t, data->fmin, data->fmax);
//compute instrument response from cbc waveform at geocenter with extrinsic params
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, params, c, projection->dtimes, projection->Fplus, projection->Fcross);
}
......@@ -956,9 +956,9 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
for(n=0; n<N; n++)
{
r[ifo][n] = d[ifo][n];
if(data->signalFlag && !data->cbcOnlyFlag) r[ifo][n] -= h[ifo][n];
if(data->glitchFlag && !data->cbcOnlyFlag) r[ifo][n] -= g[ifo][n];
if(data->bayesCBCFlag) r[ifo][n] -= c[ifo][n];
if(data->signalFlag) r[ifo][n] -= h[ifo][n];
if(data->glitchFlag) r[ifo][n] -= g[ifo][n];
if(data->cbcModelFlag) r[ifo][n] -= c[ifo][n];
}
}
......@@ -992,7 +992,7 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
waveformProject(data, projection, params, h, t, data->fmin, data->fmax);
// compute instrument response from cbc waveform at geocenter with extrinsic params
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
projectCBCWaveform(amphase, N, NI, fmin, data->Tobs, params, c, projection->dtimes, projection->Fplus, projection->Fcross);
}
......@@ -1003,9 +1003,9 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
for(n=0; n<N; n++)
{
r[ifo][n] = d[ifo][n];
if(data->signalFlag && !data->cbcOnlyFlag) r[ifo][n] -= h[ifo][n];
if(data->glitchFlag && !data->cbcOnlyFlag) r[ifo][n] -= g[ifo][n];
if(data->bayesCBCFlag) r[ifo][n] -= c[ifo][n];
if(data->signalFlag) r[ifo][n] -= h[ifo][n];
if(data->glitchFlag) r[ifo][n] -= g[ifo][n];
if(data->cbcModelFlag) r[ifo][n] -= c[ifo][n];
}
}
logL = 0.0;
......
......@@ -344,9 +344,9 @@ static void restart_sampler(struct Data *data, struct Chain *chain, struct Prior
for(i=0; i<data->N; i++)
{
data->r[ifo][i] = data->s[ifo][i];
if(data->signalFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model[ic]->response[ifo][i];
if(data->glitchFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= glitch[ifo]->templates[i];
if(data->bayesCBCFlag) data->r[ifo][i] -= model[ic]->cbctemplate[ifo][i];
if(data->signalFlag) data->r[ifo][i] -= model[ic]->response[ifo][i];
if(data->glitchFlag) data->r[ifo][i] -= glitch[ifo]->templates[i];
if(data->cbcModelFlag) data->r[ifo][i] -= model[ic]->cbctemplate[ifo][i];
}
if(!data->constantLogLFlag)
{
......@@ -407,7 +407,7 @@ static void restart_sampler(struct Data *data, struct Chain *chain, struct Prior
}
//Parameters for reproducing CBC model
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
sprintf(filename,"chains/cbc_model.dat.%i",ic);
chain->cbcChainFile[ic] = fopen(filename,"w");
......@@ -1025,7 +1025,7 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
print_run_stats(stdout, data, chain);
print_run_flags(stdout, data, prior);
if (data->bayesCBCFlag) print_cbc_run_stats(stdout, data, bayescbc);
if (data->cbcModelFlag) print_cbc_run_stats(stdout, data, bayescbc);
int N = data->N;
int NI = data->NI;
......@@ -1246,7 +1246,7 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
/******************************************************************************/
// BayesCBC model independent burnin
if (data->runPhase && (data->signalFlag||data->glitchFlag||data->fullModelFlag) && data->bayesCBCFlag)
if (data->runPhase && data->cbcModelFlag)
{
// Pass the most recent model parameters to BayesCBC structure
......@@ -1318,16 +1318,16 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
chain->beta = 1./chain->temperature[ic];
//This function executes [cycle] intrinsic parameter updates for the geocenter signal(RJMCMC or MCMC)
if(!data->fixIntrinsicFlag) EvolveIntrinsicParameters(data, prior, model, chain, tf, chain->seed, ic);
if((data->glitchFlag || data->signalFlag) && !data->fixIntrinsicFlag) EvolveIntrinsicParameters(data, prior, model, chain, tf, chain->seed, ic);
//This function executes [cycle] extrinsic parameter updates, common to all geocenter wavelets.
if((model[chain->index[ic]]->signal[0]->size>0 || data->bayesCBCFlag) && !data->fixExtrinsicFlag && chain->mc > 1) EvolveExtrinsicParameters(data, prior, model, chain, chain->seed, ic);
if((model[chain->index[ic]]->signal[0]->size>0 || data->cbcModelFlag) && !data->fixExtrinsicFlag && chain->mc > 1) EvolveExtrinsicParameters(data, prior, model, chain, chain->seed, ic);
//update PSD with BayesLine
if(data->bayesLineFlag) EvolveBayesLineParameters(data, model, bayesline, chain, prior, ic);
// Evolve BayesCBC
if(data->bayesCBCFlag) EvolveBayesCBCParameters(data, model, bayescbc, chain, ic);
if(data->cbcModelFlag) EvolveBayesCBCParameters(data, model, bayescbc, chain, ic);
}
......@@ -1642,9 +1642,9 @@ void EvolveBayesLineParameters(struct Data *data, struct Model **model, struct B
for(i=0; i<N; i++)
{
data->r[ifo][i] = data->s[ifo][i];
if(data->signalFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->bayesCBCFlag) data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
if(data->signalFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->cbcModelFlag) data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
}
//re-run Markovian, full spectrum, full model part of BayesLine
......@@ -1663,9 +1663,9 @@ void EvolveBayesLineParameters(struct Data *data, struct Model **model, struct B
for(i=0; i< N; i++)
{
data->r[ifo][i] = data->s[ifo][i];
if(data->signalFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->bayesCBCFlag) data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
if(data->signalFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->cbcModelFlag) data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
}
model_x->detLogL[ifo] = loglike(data->imin, data->imax, data->r[ifo], model_x->invSnf[ifo]);
......@@ -1835,7 +1835,7 @@ void EvolveIntrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
acc=1;
if(data->signalFlag) copy_int_model(model_x, model_y, N, NI,-1);
if(data->glitchFlag) for(ifo=0; ifo<NI; ifo++) copy_int_model(model_x, model_y, N, NI, ifo);
if(data->bayesCBCFlag) copy_cbc_model(model_x, model_y, N, NI, data->NX);
if(data->cbcModelFlag) copy_cbc_model(model_x, model_y, N, NI, data->NX);
for(mc=1; mc<=M; mc++)
{
......@@ -2586,8 +2586,8 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
for(i=0; i<N; i++)
{
data->r[ifo][i] = data->s[ifo][i];
if(data->signalFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->signalFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
bayescbc->D[ifo][i] = data->r[ifo][i];
}
......@@ -2622,8 +2622,8 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
for(i=0; i< N; i++)
{
data->r[ifo][i] = data->s[ifo][i];
if(data->signalFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag && !data->cbcOnlyFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
if(data->signalFlag) data->r[ifo][i] -= model_x->response[ifo][i];
if(data->glitchFlag) data->r[ifo][i] -= model_x->glitch[ifo]->templates[i];
data->r[ifo][i] -= model_x->cbctemplate[ifo][i];
}
......@@ -2727,7 +2727,7 @@ void EvolveExtrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
Shf_Geocenter_full(data, model_x->projection, model_x->Snf, model_x->SnGeo, model_x->extParams);
for(i=1; i<ienddim; i++)
{
if (!data->cbcOnlyFlag) logpx += (data->signal_amplitude_prior(smodel[0]->intParams[smodel[0]->index[i]],SnGeox, data->Tobs, prior->sSNRpeak));
if (!data->cbcModelFlag) logpx += (data->signal_amplitude_prior(smodel[0]->intParams[smodel[0]->index[i]],SnGeox, data->Tobs, prior->sSNRpeak));
}
}
//logpx += dim*log(paramsx[5]);
......@@ -2800,7 +2800,7 @@ void EvolveExtrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
for(i=1; i<ienddim; i++)
{
intParams[i][3] = smodel[0]->intParams[smodel[0]->index[i]][3]*paramsy[5];//amplitude
if (!data->cbcOnlyFlag) test += checkrange(intParams[i],prior->range, smodel[0]->dimension);
if (!data->cbcModelFlag) test += checkrange(intParams[i],prior->range, smodel[0]->dimension);
}
//check extrinsic parameters
......@@ -2815,7 +2815,7 @@ void EvolveExtrinsicParameters(struct Data *data, struct Prior *prior, struct Mo
{
//model_x->projection has be updated by data->extrinsic_likelihood, so it stores F+ and Fx for params_y.
Shf_Geocenter_full(data, model_x->projection, model_x->Snf, SnGeoy, paramsy);
if (!data->cbcOnlyFlag) for(i=1; i<ienddim; i++) logpy += (data->signal_amplitude_prior(intParams[i],SnGeoy, data->Tobs, prior->sSNRpeak));
if (!data->cbcModelFlag) for(i=1; i<ienddim; i++) logpy += (data->signal_amplitude_prior(intParams[i],SnGeoy, data->Tobs, prior->sSNRpeak));
}
logH = (logLy - logLx)*chain->beta + logpy - logpx + logJ;
......
......@@ -843,7 +843,7 @@ void initialize_model(struct Model *model, struct Data *data, struct Prior *prio
}
//Initial cbc template must be zero
if(data->bayesCBCFlag)
if(data->cbcModelFlag)
{
for (ifo=0; ifo<NI; ifo++)
{
......
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