Commit 3216f486 authored by Tyson Littenberg's avatar Tyson Littenberg

Merge branch 'issue_100' into 'master'

widen priors for glitch buster

See merge request lscsoft/bayeswave!187
parents 15e2bd4b 483d7657
Pipeline #157542 passed with stages
in 1 minute
......@@ -336,15 +336,19 @@ int main(int argc, char *argv[])
/*
Start wavelet model in a particular state
*/
if(data->waveletStartFlag)
{
fprintf(stdout, " ===== Wavelet Starting Parameters ======\n");
kickstart_glitch_model(data, prior, model[0]);
fprintf(stdout, " ========================================\n");
}
if(data->waveletStartFlag)
{
fprintf(stdout, " ===== Wavelet Starting Parameters ======\n");
kickstart_glitch_model(data, prior, model[0]);
for(ifo=0; ifo<data->NI; ifo++)
{
for(ic=1; ic<chain->NC; ic++) copy_int_model(model[0],model[ic],data->N,data->NI,ifo);
}
fprintf(stdout, " ========================================\n");
}
......@@ -387,6 +391,12 @@ int main(int argc, char *argv[])
{
asd[2*i] = data->s[ifo][2*i];//sqrt(psd[ifo][i]/2.);
asd[2*i+1] = data->s[ifo][2*i+1];//sqrt(psd[ifo][i]/2.);
if(data->waveletStartFlag)
{
asd[2*i] = data->r[ifo][2*i];
asd[2*i+1] = data->r[ifo][2*i+1];
}
}
for(i=0; i<(imax-imin); i++)
......
......@@ -148,16 +148,7 @@ void kickstart_glitch_model(struct Data *data, struct Prior *prior, struct Model
fclose(waveletStartFile);
//fill residual
FILE *tempfile = fopen("tempfile.dat","w");
for(i=0; i<data->N; i++) data->r[ifo][i] = data->s[ifo][i] - model->glitch[ifo]->templates[i];
for(i=0; i<data->N/2; i++)
{
data->r[ifo][i] = data->s[ifo][i] - model->glitch[ifo]->templates[i];
fprintf(tempfile,"%lg %lg %lg\n",data->r[ifo][2*i]*data->r[ifo][2*i]+data->r[ifo][2*i+1]*data->r[ifo][2*i+1] ,
data->s[ifo][2*i]*data->s[ifo][2*i]+data->s[ifo][2*i+1]*data->s[ifo][2*i+1] ,
model->glitch[ifo]->templates[2*i]*model->glitch[ifo]->templates[2*i]+model->glitch[ifo]->templates[2*i+1]*model->glitch[ifo]->templates[2*i+1]);
}
fclose(tempfile);
}
}
free(params);
......
......@@ -442,11 +442,11 @@ void initialize_priors(struct Data *data, struct Prior *prior, int omax)
Amax = 1.0e-3;
}
//Use S6 strain as default
//wide default
else
{
Amin = 4.78089288388547e-25;
Amax = 7.7811322411338e-20;
Amin = 1e-25;
Amax = 1e-18;
}
//double dt = data->Tobs/(double)data->tsize;
......@@ -573,11 +573,11 @@ void reset_priors(struct Data *data, struct Prior *prior)
Amax = 1.0e-3;
}
//Use S6 strain as default
//default
else
{
Amin = 4.78089288388547e-25;
Amax = 7.7811322411338e-20;
Amin = 1e-25;
Amax = 1e-18;
}
double Qmin = data->Qmin;
......
......@@ -79,7 +79,7 @@ void set_bayesline_priors(char *channel, struct BayesLineParams *bayesline, doub
else
{
bayesline->priors->SAmin = 1.0e-51*Tobs/4.0;
bayesline->priors->SAmax = 5.0e-36*Tobs/4.0;
bayesline->priors->SAmax = 5.0e-34*Tobs/4.0;
bayesline->priors->LQmin = 1.0e1;
bayesline->priors->LQmax = 1.0e9;
bayesline->priors->LAmin = 1.0e-45;
......
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