Commit baed3f57 authored by Katerina Chatziioannou's avatar Katerina Chatziioannou

Merge branch 'asymmetric-window' into 'master'

Add offset to window placement. Correct BayesWavePost time array samples

Closes #101

See merge request lscsoft/bayeswave!189
parents 3216f486 37ff59c8
Pipeline #159248 passed with stages
in 1 minute and 36 seconds
......@@ -588,13 +588,15 @@ void reset_priors(struct Data *data, struct Prior *prior)
double fmax = data->fmax;
double betamin = -1.0;
double betamax = 1.0;
double offset;
//restrict prior range for wavelet time to 1 second around trigger
if(data->runPhase==1)
{
tmin = data->Tobs/2.0-data->Twin/2.0;
tmax = data->Tobs/2.0+data->Twin/2.0;
offset = data->trigtime - (data->starttime + data->Tobs/2.0);
tmin = data->Tobs/2.0-data->Twin/2.0 + offset;
tmax = data->Tobs/2.0+data->Twin/2.0 + offset;
}
/*
if(data->amplitudePriorFlag)
......
......@@ -2626,13 +2626,16 @@ void write_time_freq_samples(struct Data *data)
double Tobs = data->Tobs;
double deltaF = 1./data->Tobs;
double offset;
offset = data->trigtime - (data->starttime + data->Tobs/2.0);
char filename[MAXSTRINGSIZE];
sprintf(filename,"%spost/timesamp.dat",data->runName);
FILE *timesamp = fopen(filename, "w");
sprintf(filename,"%spost/freqsamp.dat",data->runName);
FILE *freqsamp = fopen(filename, "w");
double t0 = Tobs-2.0;
double t0 = Tobs/2.0 + offset;
double f;
double t;
int i;
......
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