LALPulsar  6.1.0.1-fe68b98
ComputeFstat_DemodHL_Generic.c File Reference

Old (pre-Akos) LALDemod hotloop variant (unrestricted Dterms) More...

Detailed Description

Old (pre-Akos) LALDemod hotloop variant (unrestricted Dterms)

{
/* old 'vanilla' (pre-Akos) LALDemod hotloop algorithm, unrestricted
* Dterms: based on version 5b0343e65a5a820d3e21a2afd9ba72123b05309c of
* XLALComputeFaFb().
*/
/* NOTE: sin[ 2pi (Dphi_alpha - k) ] = sin [ 2pi Dphi_alpha ] = sin [ 2pi kappa_star ],
* therefore the trig-functions need to be calculated only once!
* We choose the value sin[ 2pi kappa_star ] because it is the
* closest to zero and will pose no numerical difficulties !
* As kappa in [0, 1) we can skip the trimming step.
*/
REAL4 s_alpha, c_alpha; /* sin(2pi kappa_alpha) and (cos(2pi kappa_alpha)-1) */
XLALSinCos2PiLUTtrimmed ( &s_alpha, &c_alpha, kappa_star);
c_alpha -= 1.0f;
REAL8 kappa_max = kappa_star + 1.0f * Dterms - 1.0f;
REAL8 x0 = kappa_max;
realXP = 0;
imagXP = 0;
/* count down 2*Dterms values */
for ( UINT4 l = 2 * Dterms; l > 0; l -- )
{
REAL4 realP, imagP; /* real and imaginary parts of Dirichlet-kernel P_alpha_k */
COMPLEX8 Xa = *Xalpha_l;
REAL8 xinv = 1.0 / x0;
/* calculate P_alpha_k */
realP = s_alpha * xinv;
imagP = c_alpha * xinv;
/* calculate P_alpha_k * X_alpha_k */
realXP += realP * crealf(Xa) - imagP * cimagf(Xa);
imagXP += imagP * crealf(Xa) + realP * cimagf(Xa);
Xalpha_l ++; /* point to next frequency-bin */
x0 -= 1.0 ; /* x0-value for next iteration */
} /* for k=kstar-Dterms to kstar+Dterms */
/* real- and imaginary part of e^{i 2 pi lambda_alpha } */
XLALSinCos2PiLUT ( &imagQ, &realQ, lambda_alpha );
}
int l
double REAL8
uint32_t UINT4
float complex COMPLEX8
float REAL4
int XLALSinCos2PiLUT(REAL4 *sin2pix, REAL4 *cos2pix, REAL8 x)
Calculate sin(2*pi*x) and cos(2*pi*x) to roughly 1e-7 precision using a lookup-table and Taylor-expan...
Definition: SinCosLUT.c:97
int XLALSinCos2PiLUTtrimmed(REAL4 *s, REAL4 *c, REAL8 x)
A function that uses the lookup tables to evaluate sin and cos values of 2*Pi*x, but relies on x bein...
Definition: SinCosLUT.c:112

Definition in file ComputeFstat_DemodHL_Generic.c.

Go to the source code of this file.

Macros

#define FUNC   XLALComputeFaFb_Generic
 
#define HOTLOOP_SOURCE   "ComputeFstat_DemodHL_Generic.i"
 

Macro Definition Documentation

◆ FUNC

#define FUNC   XLALComputeFaFb_Generic

Definition at line 37 of file ComputeFstat_DemodHL_Generic.c.

◆ HOTLOOP_SOURCE

#define HOTLOOP_SOURCE   "ComputeFstat_DemodHL_Generic.i"

Definition at line 38 of file ComputeFstat_DemodHL_Generic.c.