Commit 5123aedd authored by Tyson Littenberg's avatar Tyson Littenberg

fix to td wavelet

parent f4dbe995
......@@ -63,8 +63,8 @@ void SineGaussianDuration(double *sigpar, double *tmin, double *tmax)
double tau = Q/(LAL_TWOPI*f0);
*tmin = t0 - 3.*tau;
*tmax = t0 + 3.*tau;
*tmin = t0 - 5.*tau;
*tmax = t0 + 5.*tau;
}
void SineGaussianTime(double *hs, double *sigpar, int N, int flag, double Tobs)
......@@ -86,7 +86,7 @@ void SineGaussianTime(double *hs, double *sigpar, int N, int flag, double Tobs)
double arg;
int n;
SineGaussianBandwidth(sigpar,&tmin,&tmax);
SineGaussianDuration(sigpar,&tmin,&tmax);
int imin = (int)floor(tmin/dt);
int imax = (int)floor(tmax/dt);
......@@ -98,6 +98,7 @@ void SineGaussianTime(double *hs, double *sigpar, int N, int flag, double Tobs)
//brute force
/*
t = 0.0;
for(n=0; n<N; n++)
{
arg = (t-t0)/tau;
......@@ -106,7 +107,7 @@ void SineGaussianTime(double *hs, double *sigpar, int N, int flag, double Tobs)
}*/
//recursive phase
double phase = -LAL_TWOPI*f0*(t-t0) + phi;
double phase = LAL_TWOPI*f0*(t-t0) + phi;
double dphase = LAL_TWOPI*f0*dt;
double dre = cos(dphase)-1;
double dim = sin(dphase);
......
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