Commit 86c396c3 authored by Marcella Wijngaarden's avatar Marcella Wijngaarden
Browse files

Add cmd variable to switch off extrinsic burnin (--bayesCBC-skip-ext)

parent b737add1
......@@ -775,12 +775,7 @@ void dshifts(struct Net *net, double *sky, double *params, int NX, struct bayesC
for(id = 0; id<net->Nifo; id++)
{
ecc = 2.0*sky[3]/(1.0+sky[3]*sky[3]);
// XLALComputeDetAMResponse(&Fplus[id], &Fcross[id], (REAL4(*)[3]) net->response[id], sky[0], asin(sky[1]), sky[2], rundata->gmst);
// ComputeDetFant(struct Net *net, double psi, double alpha, double sindelta, double *Fplus, double *Fcross, int id, double gmst)
ComputeDetFant(net, sky[2], sky[0], sky[1], &Fplus[id], &Fcross[id], net->labels[id], rundata->gmst);
printf("Outside ComputeDetFant Fplus %f Fcross %f\n", Fplus[id], Fcross[id]);
F_ant(sky[2], sky[0], sky[1], &Fplus[id], &Fcross[id], net->labels[id], rundata->gmst);
printf("Outside ComputeDetFant Fplus %f Fcross %f\n", Fplus[id], Fcross[id]);
F[id] = sqrt(Fplus[id]*Fplus[id]+ecc*ecc*Fcross[id]*Fcross[id]);
lambda[id] = atan2(ecc*Fcross[id],Fplus[id]);
if(lambda[id] < 0.0) lambda[id] += TPI;
......@@ -861,7 +856,6 @@ void ringfind(struct Net *net, double *tdelays, double *params, double *SNRsq, g
double tolt, x, y, logp, dtd;
int i, id, j, k;
printf("in ringfind!\n");
dtimes = (double*)malloc(sizeof(double)* 5);
tolt = 2.0e-4;
......@@ -896,8 +890,6 @@ void ringfind(struct Net *net, double *tdelays, double *params, double *SNRsq, g
}
printf("done in ringfind!\n");
params[0] = alphax;
params[1] = sindeltax;
......
......@@ -1251,6 +1251,7 @@ void print_help_message(void)
fprintf(stdout," --stochastic use stochastic background model\n");
fprintf(stdout," --bayesCBC use BayesCBC to model inspiral\n");
fprintf(stdout," --bayesCBC-tidal specify BayesCBC waveform used: NRTidal_V or NoNRT_V (default)) (\n");
fprintf(stdout," --bayesCBC-skip-ext skip BayesCBC extrinsic burnin (\n");
fprintf(stdout,"\n");
fprintf(stdout," ----------------------------------------------------------------------------------\n");
fprintf(stdout," --- Priors & Proposals -----------------------------------------------------------\n");
......
......@@ -974,7 +974,7 @@ void print_cbc_run_stats(FILE *fptr, struct Data *data, struct bayesCBC *bayescb
fprintf(fptr, "\n");
fprintf(fptr, " evolve extrinsic/sky in burnin ");
if(bayescbc->intrinsic_only == 0) fprintf(fptr,"ENABLED");
if(bayescbc->intrinsic_only == 0 && data->skyFixFlag == 0) fprintf(fptr,"ENABLED");
else fprintf(fptr, "DISABLED");
fprintf(fptr, "\n");
......
......@@ -1251,8 +1251,6 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
setup_bayescbc_model(bayescbc, data, chain, model[chain->index[ic]], ic);
}
bayescbc->intrinsic_only = 0;
// Quick search to find initial signal
fprintf(stdout, " ======= Start CBC_burnin() ======\n");
fprintf(stdout, " Start #1 intrinsic burnin \n");
......
......@@ -1170,6 +1170,11 @@ void initialize_bayescbc(struct bayesCBC *bayescbc, struct Data *data, struct Ch
if(data->verboseFlag) bayescbc->verbose = 1;
else bayescbc->verbose = 0;
// Debug output mode
if(LALInferenceGetProcParamVal(data->commandLine, "--bayesCBC-skip-ext")) bayescbc->intrinsic_only = 1;
else if (data->skyFixFlag) bayescbc->intrinsic_only = 1; // TODO: Not yet implemented to skip SKY updates only
else bayescbc->intrinsic_only = 0;
// Set run setting when NS in system
if (bayescbc->NRTidal_version != NoNRT_V)
{
......
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