Commit f1ea8277 authored by Tyson Littenberg's avatar Tyson Littenberg
Browse files

Merge branch 'review_v106' into 'master'

Review v106

See merge request !185
parents 6f55330f 7f9d40fc
Pipeline #148062 passed with stages
in 7 minutes and 13 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