Skip to content
Snippets Groups Projects
Commit ceeb8d58 authored by Jonah Kanner's avatar Jonah Kanner :nerd:
Browse files

Now calculate all moments

git-svn-id: https://svn.ligo.caltech.edu/svn/bayeswave/trunk@120 c56465c9-8126-4a4f-9d7d-ac845eff4865
parent 309e7c85
No related branches found
No related tags found
No related merge requests found
......@@ -423,6 +423,13 @@ int main(int argc, char *argv[])
t_energy_rec = get_rhot(N, hoft_rec, deltaT, rhot_rec);
t0_rec = get_f0(N, rhot_rec, deltaT);
dur_rec = get_band(N, rhot_rec, deltaT, t0_rec);
// Calculate the time moments for the injected signal
double t0_inj, dur_inj, t_energy_inj;
double rhot_inj[N];
t_energy_inj = get_rhot(N, hoft_inj, deltaT, rhot_inj);
t0_inj = get_f0(N, rhot_inj, deltaT);
dur_inj = get_band(N, rhot_inj, deltaT, t0_inj);
// ------ Sanity Checks! -------------
......@@ -462,12 +469,12 @@ int main(int argc, char *argv[])
energy = get_energy(data->imin, data->imax, hrec[ifo], deltaF);
fprintf(stdout, "The total signal energy is: %e \n", energy);
test=0;
fprintf(stdout, "The time domain signal energy is: %e \n", t_energy_rec);
fprintf(stdout, "The time domain signal energy is: %e / %e \n", t_energy_inj, t_energy_rec);
fprintf(stdout, "The injected/recovered signal energy is: %e / %e \n", energy_inj, energy_rec);
fprintf(stdout, "The injected/recovered central frequency is: %e / %e Hz \n", f0_inj, f0_rec);
fprintf(stdout, "The injected/recovered bandwidth is: %e / %e Hz \n", band_inj, band_rec);
fprintf(stdout, "The injected/recovered central time is: %e seconds \n", t0_rec);
fprintf(stdout, "The injected/recovered duration is: %e seconds \n", dur_rec);
fprintf(stdout, "The injected/recovered central time is: %e / %e seconds \n", t0_inj, t0_rec);
fprintf(stdout, "The injected/recovered duration is: %e / %e seconds \n", dur_inj, dur_rec);
}
// ------- End Sanity checks ---------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment