Commit 15e2bd4b authored by James Clark's avatar James Clark

Merge branch 'master' of git.ligo.org:lscsoft/bayeswave

parents 2efb0fba f1ea8277
Pipeline #154102 passed with stages
in 7 minutes and 24 seconds
......@@ -69,9 +69,8 @@ void draw_glitch_amplitude(double *params, double *Snf, gsl_rng *seed, double To
invmax = 1./max;
i = (int)(params[1]*Tobs);
double SNRmin = range[3][0]*SineGaussianSNR(params, Snf, Tobs);
double SNRmax = range[3][1]*SineGaussianSNR(params, Snf, Tobs);
double SNRmin = (range[3][0]/params[3])*SineGaussianSNR(params, Snf, Tobs);
double SNRmax = (range[3][1]/params[3])*SineGaussianSNR(params, Snf, Tobs);
k = 0;
SNR = SNRmin + (SNRmax-SNRmin)*uniform_draw(seed);
......@@ -109,8 +108,11 @@ void draw_glitch_amplitude(double *params, double *Snf, gsl_rng *seed, double To
}
//SNR defined with Sn(f) but Snf array holdes <n_i^2>
//params[3] = SNR/sqrt((params[2]/(2.0*RT2PI*params[1]))/(Snf[i]*2.0/Tobs));
/*
SNR1 == SineGaussianSNR(params)/A
Ay = SNRy / SNR1 = SNRy / (SineGaussianSNR(paramsy)/Ay)
= Ay * SNRy/SineGaussianSNR(paramsy)
*/
params[3] *= SNR/SineGaussianSNR(params, Snf, Tobs);
}
......@@ -176,8 +178,11 @@ void draw_signal_amplitude(double *params, double *Snf, gsl_rng *seed, double To
}
//SNR defined with Sn(f) but Snf array holdes <n_i^2>
//params[3] = SNR/sqrt((params[2]/(2.0*RT2PI*params[1]))/(Snf[i]*2.0/Tobs));
/*
SNR1 == SineGaussianSNR(params)/A
Ay = SNRy / SNR1 = SNRy / (SineGaussianSNR(paramsy)/Ay)
= Ay * SNRy/SineGaussianSNR(paramsy)
*/
params[3] *= SNR/SineGaussianSNR(params, Snf, Tobs);
// FILE *temp=fopen("prior.dat","a");
......
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