move waveform printing

parent 16c7d5a5
Pipeline #160568 failed with stages
in 1 minute and 30 seconds
...@@ -1106,7 +1106,10 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b ...@@ -1106,7 +1106,10 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
if(data->runPhase==0)snprintf(modelname,MAXSTRINGSIZE,"%sclean",data->runName); if(data->runPhase==0)snprintf(modelname,MAXSTRINGSIZE,"%sclean",data->runName);
else else
{ {
if(!data->glitchFlag && !data->signalFlag) if(data->cbcFlag)
snprintf(modelname,MAXSTRINGSIZE,"%scbc",data->runName);
else if(!data->glitchFlag && !data->signalFlag)
snprintf(modelname,MAXSTRINGSIZE,"%snoise",data->runName); snprintf(modelname,MAXSTRINGSIZE,"%snoise",data->runName);
else if(data->glitchFlag && !data->signalFlag) else if(data->glitchFlag && !data->signalFlag)
...@@ -1429,6 +1432,15 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b ...@@ -1429,6 +1432,15 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
sprintf(filename,"waveforms/%s_colored_wave_%s_%d.dat", modelname, data->ifos[ifo], frame); sprintf(filename,"waveforms/%s_colored_wave_%s_%d.dat", modelname, data->ifos[ifo], frame);
print_colored_time_domain_waveforms(filename, model[chain->index[0]]->response[ifo], N, data->Tobs, data->imin, data->imax, prior->range[0][0], prior->range[0][1]); print_colored_time_domain_waveforms(filename, model[chain->index[0]]->response[ifo], N, data->Tobs, data->imin, data->imax, prior->range[0][0], prior->range[0][1]);
} }
if(data->cbcFlag)
{
sprintf(filename,"waveforms/%s_cbc_%s_%d.dat", modelname, data->ifos[ifo], frame);
print_time_domain_waveforms(filename, model[chain->index[0]]->cbctemplate[ifo], N, model[chain->index[0]]->Snf[ifo], data->Tobs, data->imin, data->imax, prior->range[0][0], prior->range[0][1]);
sprintf(filename,"waveforms/%s_colored_cbc_%s_%d.dat", modelname, data->ifos[ifo], frame);
print_colored_time_domain_waveforms(filename, model[chain->index[0]]->cbctemplate[ifo], N, data->Tobs, data->imin, data->imax, prior->range[0][0], prior->range[0][1]);
}
} }
frame++; frame++;
} }
...@@ -2631,7 +2643,8 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba ...@@ -2631,7 +2643,8 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
projectCBCWaveform(model_x->cbcamphase, N, NI, fmin, data->Tobs, model_x->extParams, model_x->cbctemplate, projection->dtimes, projection->Fplus, projection->Fcross); projectCBCWaveform(model_x->cbcamphase, N, NI, fmin, data->Tobs, model_x->extParams, model_x->cbctemplate, projection->dtimes, projection->Fplus, projection->Fcross);
// Save 200 waveforms temporarily for checking residuals + template // Save 200 waveforms temporarily for checking residuals + template
if (ic==0 && bayescbc->debug == 1 && chain->mc%(chain->count/200)==0) print_projected_cbc_waveform(bayescbc->SN, data->Tobs, data->trigtime, model_x->cbctemplate, bayescbc->D, N, bayescbc->mxc[0], bayescbc); //if (ic==0 && bayescbc->debug == 1 && chain->mc%(chain->count/200)==0) print_projected_cbc_waveform(bayescbc->SN, data->Tobs, data->trigtime, model_x->cbctemplate, bayescbc->D, N, bayescbc->mxc[0], bayescbc);
// Recompute likelihoods of current chain // Recompute likelihoods of current chain
model_x->logLnorm = 0.0; model_x->logLnorm = 0.0;
......
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