* Overlap computation (within LALInferenceLikelihood.c)
REAL8 LALInferenceComputeFrequencyDomainOverlap(LALInferenceIFOData * dataPtr,
- COMPLEX16Vector * freqData1, COMPLEX16Vector * freqData2)
{
if (dataPtr==NULL || freqData1 ==NULL || freqData2==NULL){
- XLAL_ERROR_REAL8(XLAL_EFAULT); }
deltaT = dataPtr->timeData->deltaT; deltaF = 1.0 / (((double)dataPtr->timeData->data->length) * deltaT); lower = ceil(dataPtr->fLow / deltaF); upper = floor(dataPtr->fHigh / deltaF);
for (i=lower; i<=upper; ++i){
overlap += ((4.0*deltaF*(creal(freqData1->data[i])*creal(freqData2->data[i])+cimag(freqData1->data[i])*cimag(freqData2->data[i])))
/ dataPtr->oneSidedNoisePowerSpectrum->data->data[i]);
}