Skip to content
Snippets Groups Projects

two minor bugs that were causing occasionally crazy anderson-darling results

Merged Tyson Littenberg requested to merge tyson-littenberg/bayeswave:i_hate_cit into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
+ 3
2
@@ -3361,8 +3361,8 @@ void anderson_darling_test(char *outdir, int ifo, double fmin, double Tobs, char
mu_re += re;
mu_im += im;
}
mu_re/=(double)(N/2);
mu_im/=(double)(N/2);
mu_re/=(double)(Nsamp/2);
mu_im/=(double)(Nsamp/2);
//get covariances
for(n=0; n<Nsamp/2; n++)
@@ -3482,6 +3482,7 @@ void anderson_darling_test(char *outdir, int ifo, double fmin, double Tobs, char
// p-value of A^2
double p = 1.-AD(Nsamp,A);
free(samples);
sprintf(filename,"%s/%s_anderson_darling_%s.dat",outdir,model,ifos[ifo]);
FILE *afile = fopen(filename,"w");
fprintf(afile,"%lg %lg\n",A, p);
Loading