20#include <lal/UserInput.h>
21#include <lal/CWMakeFakeData.h>
22#include <lal/SinCosLUT.h>
23#include <lal/GenerateSpinOrbitCW.h>
24#include <lal/TimeSeries.h>
41 fprintf( stderr,
"Finding SFTs... " );
52 if (
params->IFO->length == 1 ) {
53 constraints.detector =
params->IFO->data[0];
55 constraints.minStartTime = &
start;
56 constraints.maxStartTime = &
end;
81 fprintf(
LOG,
"Extracting band from SFTs... " );
82 fprintf( stderr,
"Extracting band from SFTs... " );
153 fprintf( stderr,
"Coherently adding SFT data... " );
160 memset( backgroundScaling->
data, 0,
sizeof(
REAL4 )*backgroundScaling->
length );
171 INT4Vector *whichSFTinMultiSFTvector = NULL, *whichIFOsToBeUsed = NULL;
174 memset( whichSFTinMultiSFTvector->
data, 0, whichSFTinMultiSFTvector->
length *
sizeof(
INT4 ) );
177 REAL4VectorAligned *twoPsiVec = NULL, *sin2psiVec = NULL, *cos2psiVec = NULL, *Fplus0s = NULL, *Fcross0s = NULL, *FplusXs = NULL, *FcrossXs = NULL, *aVals = NULL, *bVals = NULL;
181 for (
UINT4 ii = 0; ii < twoPsiVec->
length; ii++ ) {
182 twoPsiVec->
data[ii] = 0.03125 * ii;
193 alignedREAL8Vector *GWfrequencies = NULL, *GWfrequencyBins = NULL, *SFTfrequencies = NULL, *scaledSFTfrequencies = NULL;
197 SFTfrequencies->data[0] = multiSFTvector->
data[0]->
data[0].
f0;
198 for (
UINT4 ii = 1; ii < SFTfrequencies->length; ii++ ) {
199 SFTfrequencies->data[ii] = SFTfrequencies->data[ii - 1] + multiSFTvector->
data[0]->
data[0].
deltaF;
202 memcpy( GWfrequencies->
data, SFTfrequencies->data,
sizeof(
REAL8 )*SFTfrequencies->length );
204 for (
UINT4 ii = 0; ii < GWfrequencies->
length; ii++ ) {
212 alignedREAL8Vector *delta0vals = NULL, *deltaXvals = NULL, *delta0valsSubset = NULL, *deltaXvalsSubset = NULL, *floorDelta0valsSubset = NULL, *floorDeltaXvalsSubset = NULL, *diffFloorDeltaValsSubset = NULL, *roundDelta0valsSubset = NULL, *roundDeltaXvalsSubset = NULL, *diffRoundDeltaValsSubset = NULL, *TwoPiGWfrequenciesTau = NULL, *absDiffFloorDeltaValsSubset = NULL;
213 REAL4VectorAligned *TwoPiGWfrequenciesTau_f = NULL, *sinTwoPiGWfrequenciesTau = NULL, *cosTwoPiGWfrequenciesTau = NULL;
244 for (
UINT4 ii = 0; ii < twoPiTauVals->
length; ii++ ) {
251 for (
UINT4 ii = twoPiTauVals->
length; ii > 0; ii-- ) {
254 for (
UINT4 ii = 1; ii < twoPiTauVals->
length; ii++ ) {
264 if ( cosiSign == 1 )
for (
UINT4 ii = 0; ii < cosiVals->
length; ii++ ) {
265 cosiVals->
data[ii] = 1.0 - 0.05 * ii;
266 }
else if ( cosiSign == -1 )
for (
UINT4 ii = 0; ii < cosiVals->
length; ii++ ) {
267 cosiVals->
data[ii] = -0.05 * ii;
268 }
else for (
UINT4 ii = 0; ii < cosiVals->
length; ii++ ) {
269 cosiVals->
data[ii] = 1.0 - 0.05 * ii * 2.0;
276 REAL4VectorAligned *Aplus0s = NULL, *AplusXs = NULL, *Across0s = NULL, *AcrossXs = NULL;
295 REAL8 newFmin = SFTfrequencies->data[10];
296 REAL8 newBand = round( ( SFTfrequencies->data[SFTfrequencies->length - 11] - SFTfrequencies->data[10] ) *
params->Tsft ) /
params->Tsft;
304 pulsarParams.Amp.aPlus = 0.0;
305 pulsarParams.Amp.aCross = 0.0;
306 pulsarParams.Amp.psi = 0.0;
307 pulsarParams.Amp.phi0 = 0.0;
310 pulsarParams.Doppler.refTime = spinEpoch;
319 pulsarParams.Doppler.ecc = 0.0;
321 pulsarParams.Doppler.argp = 0.0;
326 for (
UINT4 ii = 0; ii < combinedSFTs->
length; ii++ ) {
328 memset( whichIFOsToBeUsed->data, 0, whichIFOsToBeUsed->length *
sizeof(
INT4 ) );
330 for (
UINT4 jj = 0; jj < multiSFTvector->
length; jj++ ) {
332 whichIFOsToBeUsed->data[jj] = 1;
342 for (
UINT4 jj = 0; jj < numFbinsInBackground; jj++ ) {
343 backgroundScaling->
data[fftnum2 * numFbinsInBackground + jj] = 1.0;
348 for (
UINT4 jj = 0; jj < GWfrequencies->
length; jj++ ) {
349 GWfrequencies->
data[jj] = GWfreqInSSB->
data->
data[fftnum2];
355 BOOLEAN createSFT = 1, computeAntenna0 = 1, computeDelta0vals = 1;
356 for (
UINT4 jj = 0; jj < multiSFTvector->
length; jj++ ) {
357 if ( jj == 0 && whichIFOsToBeUsed->data[jj] == 1 ) {
362 whichSFTinMultiSFTvector->
data[0]++;
363 }
else if ( jj > 0 && whichIFOsToBeUsed->data[jj] == 1 ) {
377 if ( computeAntenna0 ) {
397 REAL4 detPhaseArg = 0.0, detPhaseMag = 0.0;
400 for (
UINT4 kk = 0; kk < cosiVals->
length && !loopbroken; kk++ ) {
405 for (
UINT4 ll = 0; ll < cos2psiVec->length && !loopbroken; ll++ ) {
406 COMPLEX8 complexnumerator =
crectf( AplusXs->data[ll], AcrossXs->data[ll] );
408 if ( cabsf( complexdenominator ) > 1.0e-6 ) {
409 COMPLEX8 complexval = complexnumerator / complexdenominator;
410 detPhaseMag += fminf( cabsf( complexval ), 10.0 );
411 detPhaseArg += (
REAL4 )gsl_sf_angle_restrict_pos( (
REAL8 )cargf( complexval ) );
419 detPhaseMag /= (
REAL4 )( cosiVals->
length * cos2psiVec->length );
420 detPhaseArg /= (
REAL4 )( cosiVals->
length * cos2psiVec->length );
429 for (
UINT4 kk = 0; kk < cos2psiVec->length && !loopbroken; kk++ ) {
430 COMPLEX16 complexnumerator =
crect( AplusXs->data[kk], AcrossXs->data[kk] );
432 if ( cabs( complexdenominator ) > 1.0e-6 ) {
433 COMPLEX16 complexval = complexnumerator / complexdenominator;
434 detPhaseMag +=
fmin( cabs( complexval ), 10.0 );
435 detPhaseArg += gsl_sf_angle_restrict_pos( carg( complexval ) );
442 detPhaseMag /= (
REAL4 )( cos2psiVec->length );
443 detPhaseArg /= (
REAL4 )( cos2psiVec->length );
446 REAL4 sin2psi = 0.0, cos2psi = 0.0;
448 if ( sin2psi > 1.0 ) {
451 if ( sin2psi < -1.0 ) {
454 if ( cos2psi > 1.0 ) {
457 if ( cos2psi < -1.0 ) {
460 REAL4 Fplus0 = multiAMcoeffs->
data[0]->
a->
data[fftnum] * cos2psi + multiAMcoeffs->
data[0]->
b->
data[fftnum] * sin2psi;
461 REAL4 Fcross0 = multiAMcoeffs->
data[0]->
b->
data[fftnum] * cos2psi - multiAMcoeffs->
data[0]->
a->
data[fftnum] * sin2psi;
462 REAL4 FplusX = multiAMcoeffs->
data[jj]->
a->
data[fftnum] * cos2psi + multiAMcoeffs->
data[jj]->
b->
data[fftnum] * sin2psi;
463 REAL4 FcrossX = multiAMcoeffs->
data[jj]->
b->
data[fftnum] * cos2psi - multiAMcoeffs->
data[jj]->
a->
data[fftnum] * sin2psi;
465 for (
UINT4 kk = 0; kk < cosiVals->
length && !loopbroken; kk++ ) {
466 COMPLEX16 complexnumerator =
crect( FplusX * onePlusCosiSqOver2Vals->data[kk], FcrossX * cosiVals->
data[kk] );
467 COMPLEX16 complexdenominator =
crect( Fplus0 * onePlusCosiSqOver2Vals->data[kk], Fcross0 * cosiVals->
data[kk] );
468 if ( cabs( complexdenominator ) > 1.0e-6 ) {
469 COMPLEX16 complexval = complexnumerator / complexdenominator;
470 detPhaseMag +=
fmin( cabs( complexval ), 10.0 );
471 detPhaseArg += gsl_sf_angle_restrict_pos( carg( complexval ) );
482 REAL8 sin2psi = sin( 2.0 * psi ), cos2psi = cos( 2.0 * psi );
483 REAL8 Fplus0 = multiAMcoeffs->
data[0]->
a->
data[fftnum] * cos2psi + multiAMcoeffs->
data[0]->
b->
data[fftnum] * sin2psi;
484 REAL8 Fcross0 = multiAMcoeffs->
data[0]->
b->
data[fftnum] * cos2psi - multiAMcoeffs->
data[0]->
a->
data[fftnum] * sin2psi;
485 REAL8 FplusX = multiAMcoeffs->
data[jj]->
a->
data[fftnum] * cos2psi + multiAMcoeffs->
data[jj]->
b->
data[fftnum] * sin2psi;
486 REAL8 FcrossX = multiAMcoeffs->
data[jj]->
b->
data[fftnum] * cos2psi - multiAMcoeffs->
data[jj]->
a->
data[fftnum] * sin2psi;
491 if ( cabs( complexdenominator ) > 1.0e-6 ) {
492 COMPLEX16 complexval = complexnumerator / complexdenominator;
493 detPhaseMag = (
REAL4 )
fmin( cabs( complexval ), 10.0 );
494 detPhaseArg = (
REAL4 )gsl_sf_angle_restrict_pos( carg( complexval ) );
502 if ( detPhaseMag != 0.0 && whichIFOsToBeUsed->data[0] == 0 && detPhaseMag < 1.0 ) {
512 if ( computeDelta0vals ) {
519 memcpy( delta0valsSubset->data, &( delta0vals->
data[10] ),
sizeof(
REAL8 )*delta0valsSubset->length );
526 if ( computeDelta0vals ) {
527 computeDelta0vals = 0;
535 memcpy( deltaXvalsSubset->data, &( deltaXvals->data[10] ),
sizeof(
REAL8 )*deltaXvalsSubset->length );
539 for (
UINT4 kk = 0; kk < diffRoundDeltaValsSubset->length; kk++ ) {
540 INT4 shiftVal = (
INT4 )diffRoundDeltaValsSubset->data[kk];
541 shiftVector->
data[kk] = shiftVal;
550 scaling->data[kk] = DirichletScaling0->
data[kk] / DirichletScalingX->data[kk];
558 for (
UINT4 kk = 0; kk < Dratio->
length; kk++ )
if ( cabsDratio->
data[kk] != 0.0 ) {
559 Dratio->
data[kk] /= cabsDratio->
data[kk];
563 if ( cabsDratio->
data[kk] != 0.0 ) {
564 Dratio->
data[kk] /= cabsDratio->
data[kk];
573 for (
UINT4 kk = 0; kk < absDiffFloorDeltaValsSubset->length; kk++ )
if ( absDiffFloorDeltaValsSubset->data[kk] >= 1.0 ) {
574 TwoPiGWfrequenciesTau->data[kk + 10] -=
LAL_PI;
580 for (
UINT4 kk = 0; kk < TwoPiGWfrequenciesTau->length; kk++ ) {
581 TwoPiGWfrequenciesTau_f->
data[kk] = (
REAL4 )TwoPiGWfrequenciesTau->data[kk];
588 COMPLEX8 complexfactor = detPhaseVal *
crectf( cosTwoPiGWfrequenciesTau->data[kk + 10], -sinTwoPiGWfrequenciesTau->data[kk + 10] ) * conj( Dratio->
data[kk] );
590 REAL4 noiseWeighting = 1.0;
591 if ( kk >= numSFTbins2skip && kk < numFbinsInBackground + numSFTbins2skip && createSFT ) {
593 backgroundScaling->
data[fftnum2 * numFbinsInBackground + ( kk - numSFTbins2skip )] = detPhaseMag * detPhaseMag;
595 backgroundScaling->
data[fftnum2 * numFbinsInBackground + ( kk - numSFTbins2skip )] = detPhaseMag * detPhaseMag;
597 }
else if ( kk >= numSFTbins2skip && kk < numFbinsInBackground + numSFTbins2skip && !createSFT ) {
598 noiseWeighting = backgroundRatio->
data[jj]->
data[fftnum];
600 backgroundScaling->
data[fftnum2 * numFbinsInBackground + ( kk - numSFTbins2skip )] += noiseWeighting * detPhaseMag * detPhaseMag;
602 backgroundScaling->
data[fftnum2 * numFbinsInBackground + ( kk - numSFTbins2skip )] += noiseWeighting * detPhaseMag * detPhaseMag;
607 sftcopySubset->
data->
data[kk] = multiSFTvector->
data[jj]->
data[whichSFTinMultiSFTvector->
data[jj]].
data->
data[kk + 10 - shiftVector->
data[kk]] * noiseWeighting * complexfactor;
617 whichSFTinMultiSFTvector->
data[jj]++;
694 sourceParams.psi = pulsarParams->
Amp.
psi;
695 sourceParams.aPlus = pulsarParams->
Amp.
aPlus;
696 sourceParams.aCross = pulsarParams->
Amp.
aCross;
697 sourceParams.phi0 = pulsarParams->
Amp.
phi0;
699 sourceParams.position.latitude = pulsarParams->
Doppler.
Delta;
700 sourceParams.position.longitude = pulsarParams->
Doppler.
Alpha;
703 sourceParams.orbitEpoch = pulsarParams->
Doppler.
tp;
705 sourceParams.oneMinusEcc = 1.0 - pulsarParams->
Doppler.
ecc;
706 sourceParams.rPeriNorm = pulsarParams->
Doppler.
asini * sourceParams.oneMinusEcc;
707 sourceParams.angularSpeed = (
LAL_TWOPI / pulsarParams->
Doppler.
period ) * sqrt( ( 1.0 + pulsarParams->
Doppler.
ecc ) / pow( sourceParams.oneMinusEcc, 3.0 ) );
711 sourceParams.deltaT = 5;
713 sourceParams.epoch = tepoch;
714 sourceParams.length = (
UINT4 )round(
duration / sourceParams.deltaT );
731 for (
UINT4 ii = 0; ii < downsampledSeriesLength; ii++ ) {
732 memcpy( tempVector->
data, &( sourceSignal.f->data->data[ii * stepsize] ),
sizeof(
REAL4 )*tempVector->
length );
758 fprintf(
LOG,
"Converting band to powers... " );
759 fprintf( stderr,
"Converting band to powers... " );
770 UINT4 nonexistantsft = 0;
780 for (
UINT4 ii = 0; ii < numffts; ii++ ) {
781 if ( ii - nonexistantsft < sfts->length ) {
782 SFTtype *sft = &( sfts->
data[ii - nonexistantsft] );
787 for (
UINT4 jj = 0; jj < sftlength; jj++ ) {
788 tfdata->
data[ii * sftlength + jj] = (
REAL4 )normAbsSFTcoeffSq->
data[jj];
791 memset( &( tfdata->
data[ii * sftlength] ), 0,
sizeof(
REAL4 )*sftlength );
795 memset( &( tfdata->
data[ii * sftlength] ), 0,
sizeof(
REAL4 )*sftlength );
806 fprintf( stderr,
"Duty factor = %f\n", 1.0 - (
REAL4 )nonexistantsft / (
REAL4 )numffts );
891 for (
UINT4 ii = 0; ii < multiSFTvector->
length; ii++ ) {
901 for (
UINT4 jj = 0; jj < removeTheseSFTs->
length; jj++ )
if ( removeTheseSFTs->
data[jj] == 0 && tfdata->
data[jj * sftlength] != 0.0 ) {
908 for (
UINT4 jj = 0; jj < removeTheseSFTs->
length; jj++ ) {
909 if ( removeTheseSFTs->
data[jj] == 0 && tfdata->
data[jj * sftlength] != 0.0 ) {
948 for (
UINT4 ii = 0; ii < filenames->
length; ii++ ) {
956 UINT4 startSFTindex = 0, endSFTindex = 0;
959 if ( timestamp <
t0 ) {
961 }
else if ( timestamp >=
t0 && timestamp +
Tsft <=
t0 +
dur ) {
963 }
else if ( timestamp +
Tsft >
t0 +
dur ) {
990 if ( squeezedMultiTS->
length < 2 ) {
999 LIGOTimeGPS earliestTimestamp, lastTimesample, currentTimestamp;
1001 INT4 ifoWithSmallestGPS = -1, ifoWithLargestGPS = -1;
1002 for (
UINT4 ii = 0; ii < squeezedMultiTS->
length; ii++ ) {
1003 if ( ifoWithSmallestGPS < 0 ) {
1004 smallestGPS = squeezedMultiTS->
data[ii]->
data[0];
1005 ifoWithSmallestGPS = ii;
1006 }
else if (
XLALGPSCmp( &( squeezedMultiTS->
data[ifoWithSmallestGPS]->
data[0] ), &( squeezedMultiTS->
data[ii]->
data[0] ) ) > 0 ) {
1007 smallestGPS = squeezedMultiTS->
data[ii]->
data[0];
1008 ifoWithSmallestGPS = ii;
1010 if ( ifoWithLargestGPS < 0 ) {
1012 ifoWithLargestGPS = ii;
1015 ifoWithLargestGPS = ii;
1018 earliestTimestamp = smallestGPS;
1019 lastTimesample = largestGPS;
1021 currentTimestamp = earliestTimestamp;
1026 memset( indexInTimestampVector->
data, 0,
sizeof(
UINT4 )*indexInTimestampVector->
length );
1027 UINT4 totalnumTimestamps = 0;
1028 while (
XLALGPSCmp( ¤tTimestamp, &lastTimesample ) < 0 ) {
1030 for (
UINT4 ii = 0; ii < squeezedMultiTS->
length; ii++ ) {
1031 if ( indexInTimestampVector->
data[ii] < squeezedMultiTS->
data[ii]->
length &&
XLALGPSCmp( ¤tTimestamp, &( squeezedMultiTS->
data[ii]->
data[indexInTimestampVector->
data[ii]] ) ) == 0 && !foundTimestamp ) {
1033 totalnumTimestamps++;
1034 ( indexInTimestampVector->
data[ii] )++;
1035 }
else if ( indexInTimestampVector->
data[ii] < squeezedMultiTS->
data[ii]->
length &&
XLALGPSCmp( ¤tTimestamp, &( squeezedMultiTS->
data[ii]->
data[indexInTimestampVector->
data[ii]] ) ) == 0 && foundTimestamp ) {
1036 ( indexInTimestampVector->
data[ii] )++;
1043 memset( indexInTimestampVector->
data, 0,
sizeof(
UINT4 )*indexInTimestampVector->
length );
1051 ifoWithSmallestGPS = -1;
1052 for (
UINT4 jj = 0; jj < squeezedMultiTS->
length; jj++ ) {
1053 if ( indexInTimestampVector->
data[jj] < squeezedMultiTS->
data[jj]->
length && ifoWithSmallestGPS < 0 ) {
1054 smallestGPS = squeezedMultiTS->
data[jj]->
data[indexInTimestampVector->
data[jj]];
1055 ifoWithSmallestGPS = jj;
1056 }
else if ( indexInTimestampVector->
data[jj] < squeezedMultiTS->
data[jj]->
length &&
XLALGPSCmp( &( squeezedMultiTS->
data[ifoWithSmallestGPS]->
data[indexInTimestampVector->
data[ifoWithSmallestGPS]] ), &( squeezedMultiTS->
data[jj]->
data[indexInTimestampVector->
data[jj]] ) ) > 0 ) {
1057 smallestGPS = squeezedMultiTS->
data[jj]->
data[indexInTimestampVector->
data[jj]];
1058 ifoWithSmallestGPS = jj;
1061 output->data[ii] = smallestGPS;
1062 for (
UINT4 jj = 0; jj < squeezedMultiTS->
length; jj++ ) {
1063 if ( indexInTimestampVector->
data[jj] < squeezedMultiTS->
data[jj]->
length &&
XLALGPSCmp( &( squeezedMultiTS->
data[jj]->
data[indexInTimestampVector->
data[jj]] ), &smallestGPS ) == 0 ) {
1064 ( indexInTimestampVector->
data[jj] )++;
1078 UINT4 nonZeroLength = 0;
1086 ret->
length = nonZeroLength;
1088 for (
UINT4 ii = 0; ii < nonZeroLength; ii++ ) {
1089 while (
multiTS->data[whichTS]->length == 0 ) {
1115 for (
UINT4 ii = 0; ii < GPStimes->
length; ii++ ) {
1116 memset( outputfile->
data, 0,
sizeof(
CHAR )*outputfile->
length );
1117 sprintf( outputfile->
data,
"%s/%s-%s",
params->outdirectory,
params->IFO->data[ii],
"timestamps.dat" );
1119 FILE *INSFTTIMES = NULL;
1126 fclose( INSFTTIMES );
1184 fprintf( stderr,
"Marking bad SFTs... " );
1198 REAL8 ksthreshold = 1.358 / ( sqrt( numfbins ) + 0.12 + 0.11 / sqrt( numfbins ) );
1201 REAL8 kuiperthreshold = 1.747 / ( sqrt( numfbins ) + 0.155 + 0.24 / sqrt( numfbins ) );
1204 INT4 badsfts = 0, totalsfts = 0;
1205 REAL8 kstest = 0.0, kuipertest = 0.0;
1206 for (
INT4 ii = 0; ii < numffts; ii++ ) {
1207 if ( tfdata->
data[ii * numfbins] != 0.0 ) {
1209 memcpy( tempvect->
data, &( tfdata->
data[ii * numfbins] ),
sizeof(
REAL4 )*tempvect->
length );
1212 if ( kstest > ksthreshold || kuipertest > kuiperthreshold ) {
1223 fprintf( stderr,
"Fraction excluded in K-S and Kuiper's tests = %f\n", (
REAL4 )badsfts / (
REAL4 )totalsfts );
1238 fprintf( stderr,
"Removing bad SFTs... " );
1240 for (
UINT4 ii = 0; ii < badsfts->
length; ii++ )
if ( badsfts->
data[ii] == 1 ) {
1241 memset( &( tfdata->
data[ii * numfbins_tfdata] ), 0,
sizeof(
REAL4 )*numfbins_tfdata );
1259 REAL8 minfbin = round( uvar->fmin * uvar->Tsft - uvar->dfmax * uvar->Tsft - 0.5 * ( uvar->blksize - 1 ) - (
REAL8 )( maxbinshift ) - 6.0 ) / uvar->Tsft + 0.1 / uvar->Tsft;
1260 REAL8 maxfbin = round( ( uvar->fmin + uvar->fspan ) * uvar->Tsft + uvar->dfmax * uvar->Tsft + 0.5 * ( uvar->blksize - 1 ) + (
REAL8 )( maxbinshift ) + 6.0 ) / uvar->Tsft - 0.1 / uvar->Tsft;
1287 REAL8 TwoSpectFmin = round( uvar->fmin * uvar->Tsft - uvar->dfmax * uvar->Tsft - 0.5 * ( uvar->blksize - 1 ) - (
REAL8 )maxbinshift - 6.0 ) / uvar->Tsft;
1288 REAL8 TwoSpectBand = round( uvar->fspan * uvar->Tsft + 2.0 * uvar->dfmax * uvar->Tsft + ( uvar->blksize - 1 ) + (
REAL8 )( 2.0 * maxbinshift ) + 12.0 ) / uvar->Tsft;
1292 if (
XLALUserVarWasSet( &uvar->injFmin ) &&
XLALUserVarWasSet( &uvar->injBand ) && uvar->injFmin <= TwoSpectFmin && uvar->injFmin + uvar->injBand >= TwoSpectFmin + TwoSpectBand ) {
1293 DataParams.fMin = uvar->injFmin;
1294 DataParams.Band = uvar->injBand;
1296 DataParams.fMin = TwoSpectFmin;
1297 DataParams.Band = TwoSpectBand;
1299 DataParams.multiIFO.length =
detectors->length;
1301 DataParams.multiIFO.sites[ii] =
detectors->sites[ii];
1303 DataParams.multiNoiseFloor.length =
detectors->length;
1305 DataParams.multiNoiseFloor.sqrtSn[ii] = 0.0;
1308 DataParams.randSeed = uvar->injRandSeed;
1309 DataParams.SFTWindowType =
"Hann";
1310 DataParams.SFTWindowParam = 0;
1320 if ( !uvar->signalOnly ) {
1326 if ( DataParams.fMin != TwoSpectFmin ) {
1334 if ( !uvar->signalOnly ) {
1337 DataParams.multiNoiseFloor.sqrtSn[ii] = multiNoiseFloor.
sqrtSn[ii];
1340 fprintf( stderr,
"Generating noise SFTs... " );
1344 if ( DataParams.fMin != TwoSpectFmin ) {
1369 DataParams.multiNoiseFloor.sqrtSn[ii] = 0.0;
1374 FILE *SIGNALOUT = NULL, *MARGINALIZEDSIGNALOUT = NULL;
1376 XLAL_CHECK_NULL( ( SIGNALOUT = fopen( uvar->printSignalData,
"w" ) ) != NULL,
XLAL_EIO,
"Failed to open %s for writing\n", uvar->printSignalData );
1379 XLAL_CHECK_NULL( ( MARGINALIZEDSIGNALOUT = fopen( uvar->printMarginalizedSignalData,
"w" ) ) != NULL,
XLAL_EIO,
"Failed to open %s for writing\n", uvar->printMarginalizedSignalData );
1387 if ( DataParams.fMin != TwoSpectFmin ) {
1393 memset( aveSFTsPower->
data, 0,
sizeof(
REAL8 )*aveSFTsPower->
length );
1412 for (
UINT4 jj = 0; jj < aveSFTsPower->
length; jj++ ) {
1413 fprintf( SIGNALOUT,
"%.9g %.9g\n", DataParams.fMin + jj / uvar->Tsft, aveSFTsPower->
data[jj] / multiSFTvector->
data[0]->
length );
1422 memset( marginalizedSignalData->
data, 0,
sizeof(
REAL8 )*marginalizedSignalData->
length );
1423 for (
UINT4 jj = 0; jj < 300; jj++ ) {
1424 REAL8 cosi = 2.0 * gsl_rng_uniform( rng ) - 1.0;
1433 if ( DataParams.fMin != TwoSpectFmin ) {
1439 for (
UINT4 ll = 0; ll < marginalizedSignalData->
length; ll++ ) {
1440 marginalizedSignalData->
data[ll] += ( 2.0 * ( creal( sft->
data->
data[ll] ) * creal( sft->
data->
data[ll] ) + cimag( sft->
data->
data[ll] ) * cimag( sft->
data->
data[ll] ) ) / uvar->Tsft );
1445 for (
UINT4 jj = 0; jj < marginalizedSignalData->
length; jj++ ) {
1446 marginalizedSignalData->
data[jj] /= 300.0 * multiSFTvector->
data[0]->
length;
1447 fprintf( MARGINALIZEDSIGNALOUT,
"%.9g %.9g\n", DataParams.fMin + jj / uvar->Tsft, marginalizedSignalData->
data[jj] );
1455 fclose( SIGNALOUT );
1458 fclose( MARGINALIZEDSIGNALOUT );
1467 return multiSFTvector;
1484 fprintf( stderr,
"Sliding TF data... " );
1488 UINT4 maxbinshift = ( tfdata->
length / numffts - numfbins ) / 2;
1490 for (
UINT4 ii = 0; ii < numffts; ii++ ) {
1491 XLAL_CHECK( abs( binshifts->
data[ii] ) < (
INT4 )maxbinshift,
XLAL_EFAILED,
"SFT slide value %d is greater than maximum value predicted (%d)", binshifts->
data[ii], maxbinshift );
1492 memcpy( &(
output->data[ii * numfbins] ), &( tfdata->
data[ii * ( numfbins + 2 * maxbinshift ) + maxbinshift + binshifts->
data[ii]] ),
sizeof(
REAL4 )*numfbins );
1517 fprintf(
LOG,
"Assessing SFT background... " );
1518 fprintf( stderr,
"Assessing SFT background... " );
1522 UINT4 totalfbins = numfbins + blksize - 1;
1528 if ( blksize < 1000 ) {
1535 REAL8 invbias = 1.0 / bias;
1543 for (
UINT4 ii = 0; ii < numffts; ii++ ) {
1545 if ( tfdata->
data[ii * totalfbins] != 0.0 ) {
1554 for (
UINT4 jj = 0; jj < mediansout->
length; jj++ ) {
1555 output->data[ii * numfbins + jj] = (
REAL4 )( mediansout->
data[jj] * invbias );
1560 memset( &(
output->data[ii * numfbins] ), 0,
sizeof(
REAL4 )*mediansout->length );
1584 if ( tfdataarray->
length == 1 ) {
1588 for (
UINT4 ii = 0; ii < numffts; ii++ ) {
1589 if ( tfdataarray->
data[0]->
data[ii * sftlength] == 0.0 ) {
1590 for (
UINT4 jj = 1; jj < tfdataarray->
length; jj++ ) {
1591 if ( tfdataarray->
data[jj]->
data[ii * sftlength] != 0.0 ) {
1592 memcpy( &( tfdataarray->
data[0]->
data[ii * sftlength] ), &( tfdataarray->
data[jj]->
data[ii * sftlength] ),
sizeof(
REAL4 )*sftlength );
1613 XLAL_CHECK( tfdata != NULL && rngMeans != NULL && backgroundScaling != NULL && numffts > 0 && numfbins > 0,
XLAL_EINVAL );
1614 fprintf( stderr,
"Subtracting expected background... " );
1615 for (
UINT4 ii = 0; ii < numffts; ii++ )
if ( rngMeans->
data[ii * numfbins] != 0.0 )
for (
UINT4 jj = 0; jj < numfbins; jj++ ) {
1616 tfdata->
data[ii * numfbins + jj] -= rngMeans->
data[ii * numfbins + jj] * backgroundScaling->
data[ii * numfbins + jj];
1638 XLAL_CHECK(
output != NULL && tfdata != NULL && rngMeans != NULL && antPatternWeights != NULL && backgroundScaling != NULL && indexValuesOfExistingSFTs != NULL &&
params != NULL,
XLAL_EINVAL );
1640 fprintf( stderr,
"Applying weighting to SFT data... " );
1648 REAL4VectorAligned *antweightssq0 = NULL, *antweightssq = NULL, *rngMeanssq = NULL, *backgroundScalingSq = NULL;
1656 if (
params->signalOnly ) {
1657 for (
UINT4 ii = 0; ii < indexValuesOfExistingSFTs->
length; ii++ ) {
1658 for (
UINT4 jj = 0; jj < numfbins; jj++ ) {
1659 rngMeans->
data[numfbins * indexValuesOfExistingSFTs->
data[ii] + jj] = 1.0;
1669 for (
UINT4 ii = 0; ii < numfbins; ii++ ) {
1673 memcpy( antweightssq->data, antweightssq0->
data,
sizeof(
REAL4 )*antweightssq0->
length );
1680 if (
params->noiseWeightOff )
for (
UINT4 jj = 0; jj < rngMeanssq->length; jj++ )
if ( rngMeanssq->data[jj] != 0.0 ) {
1681 rngMeanssq->data[jj] = 1.0;
1686 REAL8 invsumofweights = 1.0 / sumofweights;
1689 for (
UINT4 jj = 0; jj < indexValuesOfExistingSFTs->
length; jj++ ) {
1690 output->data[indexValuesOfExistingSFTs->
data[jj]*numfbins + ii] = (
REAL4 )( invsumofweights * antPatternWeights->
data[indexValuesOfExistingSFTs->
data[jj]] * tfdata->
data[indexValuesOfExistingSFTs->
data[jj] * numfbins + ii] / rngMeanssq->data[indexValuesOfExistingSFTs->
data[jj]] );
1695 if (
params->signalOnly ) {
1722 REAL8 sumofweights = 0.0;
1723 for (
UINT4 ii = 0; ii < antweightssq->
length; ii++ )
if ( rngMeanssq->
data[ii] != 0.0 ) {
1724 sumofweights += antweightssq->
data[ii] / rngMeanssq->
data[ii];
1727 return sumofweights;
1743 fprintf( stderr,
"Determining existing SFTs... " );
1750 for (
UINT4 ii = 0; ii < numffts; ii++ ) {
1751 if ( tfdata->
data[ii * numfbins] == 0.0 ) {
1752 sftexist->
data[ii] = 0;
1754 sftexist->
data[ii] = 1;
1776 for (
UINT4 ii = 0; ii < SFTexistVector->
length; ii++ ) {
1777 if ( SFTexistVector->
data[ii] == 0 && backgroundScaling->
data[ii * numfbins] != 0.0 ) {
1778 memset( &( backgroundScaling->
data[ii * numfbins] ), 0,
sizeof(
REAL4 )*numfbins );
1780 if ( SFTexistVector->
data[ii] == 0 && background->
data[ii * numfbins] != 0.0 ) {
1781 memset( &( background->
data[ii * numfbins] ), 0,
sizeof(
REAL4 )*numfbins );
REAL4VectorAligned * readInSFTs(UserInput_t *params, const REAL8 normalization, const REAL8 minfbin, const REAL8 maxfbin)
Read in the data SFTs in one function.
MultiLIGOTimeGPSVector * getMultiTimeStampsFromSFTs(const MultiSFTVector *multiSFTvector, const UserInput_t *params)
Create a list of timestamps from SFTs that might be a subset from those in an SFTCatalog,...
REAL8 determineSumOfWeights(const REAL4VectorAligned *antweightssq, const REAL4VectorAligned *rngMeanssq)
Determine the sum of the weights.
INT4 tfRngMeans(REAL4VectorAligned *output, const REAL4VectorAligned *tfdata, const UINT4 numffts, const UINT4 numfbins, const UINT4 blksize)
Determine the running mean of each SFT.
void removeBadSFTs(REAL4VectorAligned *tfdata, const INT4Vector *badsfts)
Remove the marked SFTs as bad by setting values to 0.
LIGOTimeGPSVector * jointTimestampsFromMultiTimestamps(const MultiLIGOTimeGPSVector *multiTimestamps)
REAL4TimeSeries * computeNSfreqTS(const PulsarParams *pulsarParams, LIGOTimeGPS tepoch, REAL8 Tsft, REAL8 SFToverlap, REAL8 duration)
Compute the GW frequency time series (in the SSB) for a set of assumed parameters.
INT4 replaceTFdataWithSubsequentTFdata(REAL4VectorAlignedArray *tfdataarray, const UINT4 numffts)
INT4Vector * markBadSFTs(const REAL4VectorAligned *tfdata, const UserInput_t *params)
Mark the non-Gaussian SFTs using K-S and Kuiper's tests.
SFTCatalog * findSFTdata(const UserInput_t *params)
Find the SFT data specified by user input.
INT4 tfMeanSubtract(REAL4VectorAligned *tfdata, const REAL4VectorAligned *rngMeans, const REAL4VectorAligned *backgroundScaling, const UINT4 numffts, const UINT4 numfbins)
Subtract running mean values from the SFT data, modifying input time-frequency data.
INT4 printSFTtimestamps2File(const MultiSFTVector *multiSFTvector, const UserInput_t *params)
MultiSFTVector * extractSFTband(const SFTCatalog *catalog, const REAL8 minfbin, const REAL8 maxfbin)
Extract the SFT coefficients from the band of interest.
REAL4VectorAligned * convertSFTdataToPowers(const SFTVector *sfts, const UserInput_t *params, const REAL8 normalization)
Convert a SFTVector of sfts into powers.
INT4 tfWeight(REAL4VectorAligned *output, const REAL4VectorAligned *tfdata, REAL4VectorAligned *rngMeans, REAL4VectorAligned *antPatternWeights, const REAL4VectorAligned *backgroundScaling, const INT4Vector *indexValuesOfExistingSFTs, const UserInput_t *params)
Weight the SFTs based on antenna pattern and noise variance (Equation 11, assuming the input time-fre...
MultiSFTVector * generateSFTdata(UserInput_t *uvar, const MultiLALDetector *detectors, const EphemerisData *edat, const INT4 maxbinshift, const gsl_rng *rng)
INT4 slideTFdata(REAL4VectorAligned *output, const UserInput_t *params, const REAL4VectorAligned *tfdata, const INT4Vector *binshifts)
Slide the time-frequency data to account for detector motion.
MultiLIGOTimeGPSVector * squeezeMultiTimestamps(const MultiLIGOTimeGPSVector *multiTS)
MultiSFTVector * getMultiSFTVector(UserInput_t *params, const REAL8 minfbin, const REAL8 maxfbin)
Get a MultiSFTVector from the user-input values.
INT4 checkBackgroundScaling(const REAL4VectorAligned *background, const REAL4VectorAligned *backgroundScaling, const INT4Vector *SFTexistVector)
Go through the backgroundScaling vector and zero out if the SFTexistVector has a 0 in that SFT locati...
MultiLIGOTimeGPSVector * getMultiTimeStampsFromSegmentsFile(const LALStringVector *filenames, const REAL8 t0, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 dur)
Create a list of timestamps from a segment list.
MultiLIGOTimeGPSVector * getMultiTimeStampsFromSFTCatalog(const SFTCatalog *catalog)
Create a list of timestamps from an SFTCatalog.
INT4Vector * existingSFTs(const REAL4VectorAligned *tfdata, const UINT4 numffts)
Determine if the SFTs are existing based on whether the first data point of power in each SFT is 0.
REAL4VectorAligned * coherentlyAddSFTs(const MultiSFTVector *multiSFTvector, const MultiSSBtimes *multissb, const MultiAMCoeffs *multiAMcoeffs, const LIGOTimeGPSVector *jointTimestamps, const REAL4VectorAlignedArray *backgroundRatio, const INT4 cosiSign, const assumeNSparams *NSparams, const UserInput_t *params, REAL4VectorAligned *backgroundScaling)
Add SFTs together from a MultiSFTVector.
LIGOTimeGPSVector * timestamps
INT4 kuipers_test_exp(REAL8 *kuipervalue, const REAL4VectorAligned *vector)
Kuiper's test of data against an expected exponential distribution.
INT4 ks_test_exp(REAL8 *ksvalue, const REAL4VectorAligned *vector)
KS test of data against an expected exponential distribution.
REAL4 calcMean(const REAL4VectorAligned *vector)
Compute the mean value of a REAL4VectorAligned, computed via recursion like in GSL.
void XLALDestroyREAL4VectorSequence(REAL4VectorSequence *vecseq)
PulsarParamsVector * XLALCreatePulsarParamsVector(UINT4 numPulsars)
Create zero-initialized PulsarParamsVector for numPulsars.
PulsarParamsVector * XLALPulsarParamsFromUserInput(const LALStringVector *UserInput, const LIGOTimeGPS *refTimeDef)
Function to determine the PulsarParamsVector input from a user-input defining CW sources.
void XLALDestroyPulsarParamsVector(PulsarParamsVector *ppvect)
Destructor for PulsarParamsVector type.
int XLALCWMakeFakeMultiData(MultiSFTVector **multiSFTs, MultiREAL8TimeSeries **multiTseries, const PulsarParamsVector *injectionSources, const CWMFDataParams *dataParams, const EphemerisData *edat)
Generate fake 'CW' data, returned either as SFTVector or REAL4Timeseries or both, for given CW-signal...
int XLALParseMultiNoiseFloor(MultiNoiseFloor *multiNoiseFloor, const LALStringVector *sqrtSX, UINT4 numDetectors)
Parse string-vectors (typically input by user) of N detector noise-floors for detectors ,...
int XLALGenerateSpinOrbitCW(PulsarCoherentGW *sourceSignal, SpinOrbitCWParamStruc *sourceParams)
FIXME: Temporary XLAL-wapper to LAL-function LALGenerateSpinOrbitCW()
#define XLAL_INIT_DECL(var,...)
void * XLALCalloc(size_t m, size_t n)
REAL8 XLALRngMedBias(INT4 blkSize)
void XLALDestroySFTVector(SFTVector *vect)
XLAL interface to destroy an SFTVector.
void XLALDestroySFTCatalog(SFTCatalog *catalog)
Free an 'SFT-catalogue'.
MultiSFTVector * XLALLoadMultiSFTs(const SFTCatalog *inputCatalog, REAL8 fMin, REAL8 fMax)
Function to load a catalog of SFTs from possibly different detectors.
void XLALDestroyMultiSFTCatalogView(MultiSFTCatalogView *multiView)
Destroys a MultiSFTCatalogView, without freeing the original catalog that the 'view' was referring to...
void XLALDestroyMultiSFTVector(MultiSFTVector *multvect)
Destroy a multi SFT-vector.
MultiLIGOTimeGPSVector * XLALMakeMultiTimestamps(LIGOTimeGPS tStart, REAL8 Tspan, REAL8 Tsft, REAL8 Toverlap, UINT4 numDet)
Same as XLALMakeTimestamps() just for several detectors, additionally specify the number of detectors...
int XLALExtractStrictBandFromSFT(SFTtype **outSFT, const SFTtype *inSFT, REAL8 fMin, REAL8 Band)
Return a copy of an SFT containing only the bins in [fMin, fMin+Band).
MultiSFTCatalogView * XLALGetMultiSFTCatalogView(const SFTCatalog *catalog)
Return a MultiSFTCatalogView generated from an input SFTCatalog.
int XLALMultiSFTVectorResizeBand(MultiSFTVector *multiSFTs, REAL8 f0, REAL8 Band)
Resize the frequency-band of a given multi-SFT vector to [f0, f0+Band].
MultiLIGOTimeGPSVector * XLALTimestampsFromMultiSFTCatalogView(const MultiSFTCatalogView *multiView)
Given a multi-SFTCatalogView, return a MultiLIGOTimeGPSVector holding the SFT timestamps.
MultiSFTVector * XLALExtractMultiSFTVectorWithMultiTimestamps(const MultiSFTVector *multiSFTs, const MultiLIGOTimeGPSVector *multiTimestamps)
Extract a MultiSFTVector from another MultiSFTVector but only those timestamps matching.
LIGOTimeGPSVector * XLALCreateTimestampVector(UINT4 len)
Allocate a LIGOTimeGPSVector.
int XLALSFTAdd(SFTtype *a, const SFTtype *b)
Adds SFT-data from SFT 'b' to SFT 'a'.
int XLALCopySFT(SFTtype *dest, const SFTtype *src)
Copy an entire SFT-type into another.
LIGOTimeGPSVector * XLALTimestampsFromSegmentFile(const char *filename, REAL8 Tsft, REAL8 Toverlap, BOOLEAN adjustSegExtraTime, BOOLEAN synchronize)
Extract timestamps-vector from a segment file, with functionality based on MakeSFTDAG The filename sh...
SFTCatalog * XLALSFTdataFind(const CHAR *file_pattern, const SFTConstraints *constraints)
Find the list of SFTs matching the file_pattern and satisfying the given constraints,...
void XLALDestroySFT(SFTtype *sft)
Destructor for one SFT.
int XLALReorderMultiSFTVector(MultiSFTVector *multiSFTs, const LALStringVector *IFOs)
Reorder the MultiSFTVector with specified list of IFOs.
MultiLIGOTimeGPSVector * XLALExtractMultiTimestampsFromSFTs(const MultiSFTVector *multiSFTs)
Given a multi-SFT vector, return a MultiLIGOTimeGPSVector holding the SFT timestamps.
int XLALMultiSFTVectorAdd(MultiSFTVector *a, const MultiSFTVector *b)
Adds SFT-data from MultiSFTvector 'b' to elements of MultiSFTVector 'a'.
void XLALDestroyMultiTimestamps(MultiLIGOTimeGPSVector *multiTS)
Destroy a MultiLIGOTimeGPSVector timestamps vector.
SFTVector * XLALCreateSFTVector(UINT4 numSFTs, UINT4 numBins)
XLAL function to create an SFTVector of numSFT SFTs with SFTlen frequency-bins (which will be allocat...
void XLALDestroyTimestampVector(LIGOTimeGPSVector *vect)
De-allocate a LIGOTimeGPSVector.
MultiLIGOTimeGPSVector * XLALReadMultiTimestampsFiles(const LALStringVector *fnames)
backwards compatible wrapper to XLALReadMultiTimestampsFilesConstrained() without GPS-time constraint...
int XLALSinCosLUT(REAL4 *sinx, REAL4 *cosx, REAL8 x)
Calculate sin(x) and cos(x) to roughly 1e-7 precision using a lookup-table and Taylor-expansion.
COORDINATESYSTEM_EQUATORIAL
REAL4TimeSeries * XLALCreateREAL4TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
void XLALDestroyREAL4TimeSeries(REAL4TimeSeries *series)
const LALUnit lalHertzUnit
void XLALDestroyUINT4Vector(UINT4Vector *vector)
INT4Vector * XLALCreateINT4Vector(UINT4 length)
COMPLEX8Vector * XLALCreateCOMPLEX8Vector(UINT4 length)
void XLALDestroyINT4Vector(INT4Vector *vector)
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
UINT4Vector * XLALCreateUINT4Vector(UINT4 length)
void XLALDestroyCHARVector(CHARVector *vector)
CHARVector * XLALCreateCHARVector(UINT4 length)
void XLALDestroyCOMPLEX8Vector(COMPLEX8Vector *vector)
int XLALVectorSinCosREAL4(REAL4 *out1, REAL4 *out2, const REAL4 *in, const UINT4 len)
int XLALVectorScaleREAL4(REAL4 *out, REAL4 scalar, const REAL4 *in, const UINT4 len)
void XLALDestroyREAL4VectorAligned(REAL4VectorAligned *in)
REAL4VectorAligned * XLALCreateREAL4VectorAligned(const UINT4 length, const UINT4 align)
int XLALVectorSinCos2PiREAL4(REAL4 *out1, REAL4 *out2, const REAL4 *in, const UINT4 len)
int XLALVectorAddREAL4(REAL4 *out, const REAL4 *in1, const REAL4 *in2, const UINT4 len)
int XLALVectorMultiplyREAL4(REAL4 *out, const REAL4 *in1, const REAL4 *in2, const UINT4 len)
int XLALVectorShiftREAL4(REAL4 *out, REAL4 scalar, const REAL4 *in, const UINT4 len)
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_VOID(assertion,...)
#define XLAL_CHECK_REAL8(assertion,...)
#define XLAL_CHECK_NULL(assertion,...)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
int XLALGPSCmp(const LIGOTimeGPS *t0, const LIGOTimeGPS *t1)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
LALDetector detectors[LAL_NUM_DETECTORS]
REAL4Vector * b
(weighted) per-SFT antenna-pattern function
REAL4Vector * a
(weighted) per-SFT antenna-pattern function
A vector of COMPLEX8FrequencySeries.
COMPLEX8FrequencySeries * data
Pointer to the data array.
UINT4 length
Number of elements in array.
Struct controlling all the aspects of the fake data (time-series + SFTs) to be produced by XLALCWMake...
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
A vector of 'timestamps' of type LIGOTimeGPS.
REAL8 deltaT
'length' of each timestamp (e.g.
LIGOTimeGPS * data
array of timestamps
UINT4 length
number of timestamps
Multi-IFO container for antenna-pattern coefficients and atenna-pattern matrix .
AMCoeffs ** data
noise-weighted AM-coeffs , and
array of detectors definitions 'LALDetector'
A collection of (multi-IFO) LIGOTimeGPSVector time-stamps vectors.
UINT4 length
number of timestamps vectors or ifos
LIGOTimeGPSVector ** data
timestamps vector for each ifo
array of detector-specific 'noise floors' (ie PSD values), assumed constant over the frequency-band o...
REAL8 sqrtSn[PULSAR_MAX_DETECTORS]
per-IFO sqrt(PSD) values , where
A multi-SFT-catalogue "view": a multi-IFO vector of SFT-catalogs.
A collection of SFT vectors – one for each IFO in a multi-IFO search.
UINT4 length
number of ifos
SFTVector ** data
sftvector for each ifo
Multi-IFO container for SSB timings.
SSBtimes ** data
array of SSBtimes (pointers)
UINT4 length
number of IFOs
REAL8 aCross
Signal amplitude (cross)
REAL8 psi
polarization angle psi
REAL8 aPlus
Signal amplitude (plus)
REAL8 phi0
initial signal-phase (at some reference time)
This structure stores a representation of a plane gravitational wave propagating from a particular po...
REAL8 period
Binary: orbital period (sec)
LIGOTimeGPS tp
Binary: time of observed periapsis passage (in SSB)
PulsarSpins fkdot
Intrinsic spins: [Freq, f1dot, f2dot, ... ] where fkdot = d^kFreq/dt^k.
REAL8 Delta
Sky position: DEC (latitude) in equatorial coords and radians.
LIGOTimeGPS refTime
Reference time of pulsar parameters (in SSB!)
REAL8 Alpha
Sky position: RA (longitude) in equatorial coords and radians.
REAL8 ecc
Binary: orbital eccentricity.
REAL8 asini
Binary: projected, normalized orbital semi-major axis (s).
REAL8 argp
Binary: argument of periapsis (radians)
Type defining the parameters of a pulsar-source of CW Gravitational waves.
PulsarAmplitudeParams Amp
'Amplitude-parameters': h0, cosi, phi0, psi
PulsarDopplerParams Doppler
'Phase-evolution parameters': {skypos, fkdot, orbital params }
Straightforward vector type of N PulsarParams structs.
PulsarParams * data
array of pulsar-signal parameters
REAL4VectorAligned ** data
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
'Constraints' for SFT-matching: which detector, within which time-stretch and which timestamps exactl...
REAL8Vector * Tdot
dT/dt : time-derivative of SSB-time wrt local time for SFT-alpha
REAL8Vector * DeltaT
Time-difference of SFT-alpha - tau0 in SSB-frame.
LIGOTimeGPS refTime
reference-time 'tau0'
This structure stores the parameters for constructing a gravitational waveform with both a Taylor-pol...
alignedREAL8Vector ** data
LIGOTimeGPS * assumeNSorbitTp
LIGOTimeGPS * assumeNSrefTime
INT4 VectorShiftREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 shift, INT4 vectorMath)
void destroyAlignedREAL8Vector(alignedREAL8Vector *vector)
INT4 DirichletRatioVector(COMPLEX8Vector *output, alignedREAL8Vector *delta0, alignedREAL8Vector *delta1, alignedREAL8Vector *scaling, const UserInput_t *params)
INT4 VectorCabsfCOMPLEX8(REAL4VectorAligned *output, COMPLEX8Vector *input, INT4 vectorMath)
void destroyAlignedREAL8VectorArray(alignedREAL8VectorArray *array)
INT4 VectorRoundREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
INT4 VectorAddREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2, INT4 vectorMath)
alignedREAL8VectorArray * createAlignedREAL8VectorArray(const UINT4 length, const UINT4 vectorLength, const size_t align)
INT4 VectorFloorREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
INT4 VectorScaleREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 scale, INT4 vectorMath)
INT4 VectorAbsREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
INT4 fastSSVectorMultiply_with_stride_and_offset(REAL4VectorAligned *output, const REAL4VectorAligned *input1, const REAL4VectorAligned *input2, const INT4 stride1, const INT4 stride2, const INT4 offset1, const INT4 offset2)
Computes a multiplication of two vectors with a stride and initial offset.
alignedREAL8Vector * createAlignedREAL8Vector(UINT4 length, const size_t align)
INT4 VectorSubtractREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2, INT4 vectorMath)
INT4 VectorMultiplyREAL8(alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2, INT4 vectorMath)
INT4 VectorCabsCOMPLEX8(alignedREAL8Vector *output, COMPLEX8Vector *input, INT4 vectorMath)