Commit 52cb60da authored by zetienne's avatar zetienne
Browse files

> SEOBNRv3: Reduce error when computing finite difference derivatives of...

> SEOBNRv3: Reduce error when computing finite difference derivatives of analytic SEOBNRv3 Hamiltonian by increasing the finite difference step size. This greatly improves agreement with SEOBNRv3_opt (which uses analytical derivatives).
> SEOBNRv3/SEOBNRv3_opt: alpha Euler angle is not unwrapped properly in a small fraction (~ 1/100,000) of cases. This is corrected by replacing an if() statement with a simple while() loop that rarely goes to the second iteration.
>
> Closes Redmine 5977: https://bugs.ligo.org/redmine/issues/5977
>
> Author: Tyler Knowles
> Patch approved by: Riccardo Sturani
parent 003aa96e
......@@ -97,7 +97,7 @@ static REAL8 XLALSpinPrecHcapNumDerivWRTParam(
)
{
int debugPK = 0;
static const REAL8 STEP_SIZE = 1.0e-4;
static const REAL8 STEP_SIZE = 2.0e-4;
/** lMax: l index up to which h_{lm} modes are included in the computation of the GW enegy flux: see Eq. in 13 in PRD 86, 024011 (2012) */
static const INT4 lMax = 8;
......@@ -710,7 +710,7 @@ XLALSpinPrecHcapNumDerivWRTParam(
SpinEOBParams * funcParams /**<< EOB Parameters */
)
{
static const REAL8 STEP_SIZE = 1.0e-3;
static const REAL8 STEP_SIZE = 2.0e-3;
HcapDerivParams params;
......
......@@ -85,11 +85,11 @@ static int EulerAnglesI2P(REAL8Vector *Alpha, /**<< output: alpha Euler angle */
}
}
if( i>0 && Alpha->data[i] - Alpha->data[i-1] > 5. ) {
while( i>0 && Alpha->data[i] - Alpha->data[i-1] > 5. ) {
*phaseCounterA = *phaseCounterA - 1;
Alpha->data[i] -= LAL_TWOPI;
}
else if ( i && Alpha->data[i] - Alpha->data[i-1] < -5. ) {
while( i && Alpha->data[i] - Alpha->data[i-1] < -5. ) {
*phaseCounterA = *phaseCounterA + 1;
Alpha->data[i] += LAL_TWOPI;
}
......
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