28 #include <cuda_runtime_api.h>
29 #include <cuComplex.h>
35 #include <lal/Factorial.h>
36 #include <lal/LFTandTSutils.h>
37 #include <lal/LogPrintf.h>
38 #include <lal/SinCosLUT.h>
39 #include <lal/TimeSeries.h>
40 #include <lal/Units.h>
41 #include <lal/Window.h>
56 #define CUDA_BLOCK_SIZE 512
64 #define XLAL_CHECK_CUDA_CALL(...) do { \
66 XLAL_CHECK ( ( retn = (__VA_ARGS__) ) == cudaSuccess, XLAL_EERR, "%s failed with return code %i", #__VA_ARGS__, retn ); \
68 #define XLAL_CHECK_CUFFT_CALL(...) do { \
70 XLAL_CHECK ( ( retn = (__VA_ARGS__) ) == CUFFT_SUCCESS, XLAL_EERR, "%s failed with return code %i", #__VA_ARGS__, retn ); \
73 #define CPLX_MULT(x, y) (crectf(crealf(x)*crealf(y) - cimagf(x)*cimagf(y), cimagf(x)*crealf(y) + crealf(x)*cimagf(y)))
78 typedef struct tagResampCUDAWorkspace {
174 if ( vec->
data != NULL ) {
175 cudaFree( vec->
data );
185 if ( vec->
data != NULL ) {
186 cudaFree( vec->
data );
195 if ( series != NULL ) {
224 if ( *
dst == NULL ) {
227 ( *dst )->data->length = 0;
232 ( *dst )->data = dst_data;
234 if ( ( ( *dst )->data->data == NULL ) || ( ( *dst )->data->length <
src->data->length ) ) {
236 ( *dst )->data->length =
src->data->length;
246 if ( *
dst == NULL ) {
249 ( *dst )->length =
src->length;
251 for (
UINT4 X = 0; X <
src->length; X++ ) {
259 if ( multi != NULL ) {
260 if ( multi->
data != NULL ) {
300 cufftDestroy( resamp->
fftplan );
364 REAL8 TspanX = numSamples_DETX * dt_DET;
365 TspanXMax =
fmax( TspanXMax, TspanX );
367 UINT4 decimateFFT = (
UINT4 )ceil( TspanXMax / TspanFFT );
368 if ( decimateFFT > 1 ) {
369 XLALPrintWarning(
"WARNING: Frequency spacing larger than 1/Tspan, we'll internally decimate FFT frequency bins by a factor of %" LAL_UINT4_FORMAT "\n", decimateFFT );
371 TspanFFT *= decimateFFT;
374 UINT4 numSamplesFFT0 = (
UINT4 ) ceil( TspanFFT / dt_DET );
375 UINT4 numSamplesFFT = 0;
377 numSamplesFFT = (
UINT4 ) pow( 2, ceil( log2( (
double ) numSamplesFFT0 ) ) );
379 numSamplesFFT = (
UINT4 ) 2 * ceil( numSamplesFFT0 / 2 );
382 REAL8 dt_SRC = TspanFFT / numSamplesFFT;
400 UINT4 numSamplesMax_SRC = 0;
404 XLAL_CHECK( dt_DET == dt_DETX,
XLAL_EINVAL,
"Input timeseries must have identical 'deltaT(X=%d)' (%.16g != %.16g)\n", X, dt_DET, dt_DETX );
407 XLAL_CHECK( fabs( fHet - fHetX ) <
LAL_REAL8_EPS * fHet,
XLAL_EINVAL,
"Input timeseries must have identical heterodyning frequency 'f0(X=%d)' (%.16g != %.16g)\n", X, fHet, fHetX );
415 UINT4 numSamples_SRCX = (
UINT4 )ceil( numSamples_DETX * dt_DET / dt_SRC );
420 numSamplesMax_SRC =
MYMAX( numSamplesMax_SRC, numSamples_SRCX );
425 XLAL_CHECK( numSamplesFFT >= numSamplesMax_SRC,
XLAL_EFAILED,
"[numSamplesFFT = %d] < [numSamplesMax_SRC = %d]\n", numSamplesFFT, numSamplesMax_SRC );
486 __global__
void CUDAAddToFaFb( cuComplex *Fa_k, cuComplex *Fb_k, cuComplex *FaX_k, cuComplex *FbX_k,
UINT4 numFreqBins )
488 int k = threadIdx.x + blockDim.x * blockIdx.x;
489 if (
k >= numFreqBins ) {
492 Fa_k[
k] = cuCaddf( Fa_k[
k], FaX_k[
k] );
493 Fb_k[
k] = cuCaddf( Fb_k[
k], FbX_k[
k] );
498 int k = threadIdx.x + blockDim.x * blockIdx.x;
499 if (
k >= numFreqBins ) {
502 cuComplex Fa = Fa_k[
k];
503 cuComplex Fb = Fb_k[
k];
504 REAL4 Fa_re = cuCrealf( Fa );
505 REAL4 Fa_im = cuCimagf( Fa );
506 REAL4 Fb_re = cuCrealf( Fb );
507 REAL4 Fb_im = cuCimagf( Fb );
511 twoF_k = 2.0f * Dinv * (
B * (
SQ( Fa_re ) +
SQ( Fa_im ) )
512 +
A * (
SQ( Fb_re ) +
SQ( Fb_im ) )
513 - 2.0 *
C * ( Fa_re * Fb_re + Fa_im * Fb_im )
514 - 2.0 * E * ( - Fa_re * Fb_im + Fa_im * Fb_re )
549 REAL8 ticStart = 0, tocEnd = 0;
550 REAL8 tic = 0, toc = 0;
551 if ( collectTiming ) {
571 if ( collectTiming ) {
619 if ( collectTiming ) {
621 Tau->Mem = ( toc - tic );
633 if ( collectTiming ) {
653 if ( collectTiming ) {
655 Tau->SumFabX += ( toc - tic );
671 cudaFree( twoF_gpu );
675 if ( collectTiming ) {
677 Tau->Fab2F += ( toc - tic );
687 if ( collectTiming ) {
713 if ( collectTiming ) {
715 Tau->Fab2F += ( toc - tic );
735 cudaFree( ws->
Fa_k );
736 cudaFree( ws->
Fb_k );
737 cudaFree( ws->
FaX_k );
738 cudaFree( ws->
FbX_k );
748 if ( collectTiming ) {
755 Tau->Total = ( tocEnd - ticStart );
763 REAL8 Tau_buffer = Tau->Bary;
766 REAL8 tauF_eff = Tau->Total / NFbin;
767 REAL8 tauF_core = ( Tau->Total - Tau_buffer ) / NFbin;
770 REAL8 tau0_Fbin = ( Tau->Copy + Tau->Norm + Tau->SumFabX + Tau->Fab2F ) / NFbin;
776 #define updateAvgF(q) tiGen->q = ((tiGen->q *(tiGen->NCalls-1) + q)/(tiGen->NCalls))
782 #define updateAvgRS(q) tiRS->q = ((tiRS->q *(tiGen->NCalls-1) + q)/(tiGen->NCalls))
788 if ( Tau->BufferRecomputed ) {
790 REAL8 tauF_buffer = Tau_buffer / NFbin;
809 int k = threadIdx.x + blockDim.x * blockIdx.x;
810 if (
k >= numFreqBins ) {
813 REAL8 f_k = FreqOut0 +
k * dFreq;
814 REAL8 cycles = - f_k * dtauX;
815 REAL8 sinphase, cosphase;
816 sincospi( 2 * cycles, &sinphase, &cosphase );
817 cuComplex normX_k = { ( float )( dt_SRC * cosphase ), ( float )( dt_SRC * sinphase ) };
819 Fa_out[
k] = cuCmulf( Fa_out[
k], normX_k );
820 Fb_out[
k] = cuCmulf( Fb_out[
k], normX_k );
825 int k = threadIdx.x + blockIdx.x * blockDim.x;
826 if (
k >= numFreqBins ) {
829 out[
k] = in[offset_bins +
k * decimateFFT];
842 XLAL_CHECK( ( resamp != NULL ) && ( ws != NULL ) && ( TimeSeries_SRC_a != NULL ) && ( TimeSeries_SRC_b != NULL ),
XLAL_EINVAL );
849 REAL8 fHet = TimeSeries_SRC_a->f0;
850 REAL8 dt_SRC = TimeSeries_SRC_a->deltaT;
853 REAL8 freqShift = remainder( FreqOut0 - fHet, dFreq );
855 XLAL_CHECK( FreqOut0 >= fMinFFT,
XLAL_EDOM,
"Lowest output frequency outside the available frequency band: [FreqOut0 = %.16g] < [fMinFFT = %.16g]\n", FreqOut0, fMinFFT );
856 UINT4 offset_bins = (
UINT4 ) lround( ( FreqOut0 - fMinFFT ) / dFreqFFT );
857 UINT4 maxOutputBin = offset_bins + ( numFreqBins - 1 ) * resamp->
decimateFFT;
858 XLAL_CHECK( maxOutputBin < resamp->numSamplesFFT,
XLAL_EDOM,
"Highest output frequency bin outside available band: [maxOutputBin = %d] >= [numSamplesFFT = %d]\n", maxOutputBin, resamp->
numSamplesFFT );
862 REAL8 tic = 0, toc = 0;
867 if ( collectTiming ) {
876 if ( collectTiming ) {
878 tiRS->
Tau.
Spin += ( toc - tic );
886 if ( collectTiming ) {
888 tiRS->
Tau.
FFT += ( toc - tic );
894 if ( collectTiming ) {
896 tiRS->
Tau.
Copy += ( toc - tic );
904 if ( collectTiming ) {
906 tiRS->
Tau.
Spin += ( toc - tic );
913 if ( collectTiming ) {
915 tiRS->
Tau.
FFT += ( toc - tic );
921 if ( collectTiming ) {
923 tiRS->
Tau.
Copy += ( toc - tic );
931 if ( collectTiming ) {
933 tiRS->
Tau.
Norm += ( toc - tic );
951 int j = threadIdx.x + blockIdx.x * blockDim.x;
952 if (
j >= numSamplesIn ) {
956 REAL8 Dtau_alpha_j = Dtau0 + taup_j;
957 REAL8 cycles = -freqShift * taup_j;
958 REAL8 Dtau_pow_kp1 = Dtau_alpha_j;
959 for (
UINT4 k = 1;
k <= s_max;
k++ ) {
960 Dtau_pow_kp1 *= Dtau_alpha_j;
963 REAL8 cosphase, sinphase;
964 sincospi( 2 * cycles, &sinphase, &cosphase );
965 cuComplex em2piphase = {( float )cosphase, (
float )sinphase};
966 out[
j] = cuCmulf( in[
j], em2piphase );
983 while ( ( s_max > 0 ) && ( doppler->fkdot[s_max] == 0 ) ) {
987 UINT4 numSamplesIn = xIn->data->length;
1001 int j = threadIdx.x + blockIdx.x * blockDim.x;
1002 if (
j >= numSamples ) {
1005 TS_b[
j] = cuCmulf( TS_a[
j], TStmp2[
j] );
1006 TS_a[
j] = cuCmulf( TS_a[
j], TStmp1[
j] );
1010 cuComplex *TStmp2_SRC_data,
1012 UINT4 iStart_SRC_al,
1024 int j = threadIdx.x + blockIdx.x * blockDim.x;
1025 if (
j >= numSamples ) {
1029 UINT4 iSRC_al_j = iStart_SRC_al +
j;
1033 REAL8 t_SRC = tStart_SRC_0 + iSRC_al_j * dt_SRC;
1034 REAL8 ti_DET_al_j = tMid_DET_al + ( t_SRC - tMid_SRC_al ) / Tdot_al;
1035 ti_DET_data [ iSRC_al_j ] = ti_DET_al_j;
1038 REAL8 tDiff = iSRC_al_j * dt_SRC + ( tStart_DET_0 - ti_DET_al_j );
1039 REAL8 cycles = fmod( fHet * tDiff, 1.0 );
1041 REAL8 cosphase, sinphase;
1042 sincospi( -2 * cycles, &sinphase, &cosphase );
1044 cuComplex ei2piphase = {( float ) cosphase, (
float ) sinphase};
1048 cuComplex signum = {1.0f - 2 * ( iSRC_al_j % 2 ), 0};
1049 ei2piphase = cuCmulf( ei2piphase, signum );
1051 TStmp1_SRC_data[iSRC_al_j] = make_cuComplex( ei2piphase.x * a_al, ei2piphase.y * a_al );
1052 TStmp2_SRC_data[iSRC_al_j] = make_cuComplex( ei2piphase.x * b_al, ei2piphase.y * b_al );
1061 UINT4 numSamplesOut,
1066 int l = threadIdx.x + blockDim.x * blockIdx.x;
1067 if (
l >= numSamplesOut ) {
1073 if ( (
t < 0 ) || (
t > ( numSamplesIn - 1 )*
dt ) ) {
1074 out[
l] = make_cuComplex( 0, 0 );
1078 REAL8 t_by_dt =
t * oodt;
1079 INT8 jstar = lround( t_by_dt );
1081 if ( fabs( t_by_dt - jstar ) < 2.0e-4 ) {
1086 INT4 jStart0 = jstar - Dterms;
1087 UINT4 jEnd0 = jstar + Dterms;
1089 UINT4 jEnd =
min( jEnd0, numSamplesIn - 1 );
1091 REAL4 delta_jStart = ( t_by_dt - jStart );
1092 REAL8 sin0 = sinpi( delta_jStart );
1094 REAL4 sin0oopi = sin0 * 1.0 / M_PI;
1096 cuComplex y_l = {0, 0};
1097 REAL8 delta_j = delta_jStart;
1098 for (
UINT8 j = jStart;
j <= jEnd;
j ++ ) {
1099 cuComplex Cj = {( float )(
win[
j - jStart0] * sin0oopi / delta_j ), 0};
1101 y_l = cuCaddf( y_l, cuCmulf( Cj, in[
j] ) );
1103 sin0oopi = -sin0oopi;
1114 int i = threadIdx.x + blockDim.x * blockIdx.x;
1115 if (
i >= ( length + 1 ) / 2 ) {
1119 int length_reduced = length - 1;
1120 double Y = length_reduced > 0 ? ( 2 *
i - length_reduced ) / (
double ) length_reduced : 0;
1121 out[
i] = 0.08 + 0.92 * pow( cos( M_PI / 2 * Y ), 2 );
1122 out[length -
i - 1] = 0.08 + 0.92 * pow( cos( M_PI / 2 * Y ), 2 );
1142 UINT4 winLen = 2 * Dterms + 1;
1149 CUDASincInterp <<< ( numSamplesOut +
CUDA_BLOCK_SIZE - 1 ) /
CUDA_BLOCK_SIZE,
CUDA_BLOCK_SIZE >>> ( ( cuComplex * )( y_out->
data ), t_out->
data, ( cuComplex * )( ts_in->
data->
data ), win_gpu, Dterms, numSamplesIn, numSamplesOut, tmin,
dt, oodt );
1151 cudaFree( win_gpu );
1195 REAL8 tic = 0, toc = 0;
1199 if ( same_skypos && same_refTime && same_binary ) {
1206 if ( collectTiming ) {
1213 if ( !( same_skypos && same_refTime ) ) {
1235 if ( thisPoint->
asini > 0 ) {
1273 XLAL_CHECK( numSamples_DETX > 0,
XLAL_EINVAL,
"Input timeseries for detector X=%d has zero samples. Can't handle that!\n", X );
1276 XLAL_CHECK( fabs( fHet - fHetX ) <
LAL_REAL8_EPS * fHet,
XLAL_EINVAL,
"Input timeseries must have identical heterodyning frequency 'f0(X=%d)' (%.16g != %.16g)\n", X, fHet, fHetX );
1280 TimeSeries_SRCX_a->
f0 = fHet;
1281 TimeSeries_SRCX_b->
f0 = fHet;
1304 REAL8 tStart_SRC_al = tMid_SRC_al - 0.5 *
Tsft * Tdot_al;
1305 REAL8 tEnd_SRC_al = tMid_SRC_al + 0.5 *
Tsft * Tdot_al;
1308 REAL8 tMid_DET_al = tStart_DET_al + 0.5 *
Tsft;
1311 UINT4 iStart_SRC_al = lround( ( tStart_SRC_al - tStart_SRC_0 ) / dt_SRC );
1312 UINT4 iEnd_SRC_al = lround( ( tEnd_SRC_al - tStart_SRC_0 ) / dt_SRC );
1315 iStart_SRC_al =
MYMIN( iStart_SRC_al, numSamples_SRCX - 1 );
1316 iEnd_SRC_al =
MYMIN( iEnd_SRC_al, numSamples_SRCX - 1 );
1317 UINT4 numSamplesSFT_SRC_al = iEnd_SRC_al - iStart_SRC_al + 1;
1321 CUDAApplyHetAMSrc <<< ( numSamplesSFT_SRC_al +
CUDA_BLOCK_SIZE - 1 ) /
CUDA_BLOCK_SIZE,
CUDA_BLOCK_SIZE >>> ( ( cuComplex * )( ws->
TStmp1_SRC->
data ), ( cuComplex * )( ws->
TStmp2_SRC->
data ), ti_DET->
data, iStart_SRC_al, tStart_SRC_0, tStart_DET_0, dt_SRC, tMid_DET_al, tMid_SRC_al, Tdot_al, fHet, a_al, b_al, numSamplesSFT_SRC_al );
1331 ti_DET->
length = bak_length;
1339 if ( collectTiming ) {
1341 Tau->
Bary = ( toc - tic );
#define GPSSETREAL8(gps, r8)
static int XLALGetFstatTiming_Resamp_intern(const FstatTimingResamp *tiRS, FstatTimingModel *timingModel)
int SincInterp(COMPLEX8Vector *y_out, const REAL8Vector *t_out, const COMPLEX8TimeSeries *ts_in, UINT4 Dterms)
static int XLALComputeFstatResampCUDA(FstatResults *Fstats, const FstatCommon *common, void *method_data)
__global__ void CUDAApplySpindownAndFreqShift(cuComplex *out, cuComplex *in, PulsarDopplerParams doppler, REAL8 freqShift, REAL8 dt, REAL8 Dtau0, UINT4 s_max, UINT4 numSamplesIn)
__global__ void CUDACreateHammingWindow(REAL8 *out, UINT4 length)
static void XLALDestroyResampCUDAWorkspace(void *workspace)
static void DestroyMultiCOMPLEX8TimeSeriesCUDA(MultiCOMPLEX8TimeSeries *multi)
static void DestroyCOMPLEX8TimeSeriesCUDA(COMPLEX8TimeSeries *series)
__global__ void CUDAPopulateFaFbFromRaw(cuComplex *out, cuComplex *in, UINT4 numFreqBins, UINT4 offset_bins, UINT4 decimateFFT)
static int XLALComputeFaFb_ResampCUDA(ResampCUDAMethodData *resamp, ResampCUDAWorkspace *ws, const PulsarDopplerParams thisPoint, REAL8 dFreq, UINT4 numFreqBins, const COMPLEX8TimeSeries *TimeSeries_SRC_a, const COMPLEX8TimeSeries *TimeSeries_SRC_b)
__global__ void CUDASincInterp(cuComplex *out, REAL8 *t_out, cuComplex *in, REAL8 *win, UINT4 Dterms, UINT4 numSamplesIn, UINT4 numSamplesOut, REAL8 tmin, REAL8 dt, REAL8 oodt)
static int CopyCOMPLEX8TimeSeriesDtoH(COMPLEX8TimeSeries **dst, COMPLEX8TimeSeries *src)
static void DestroyCOMPLEX8VectorCUDA(COMPLEX8Vector *vec)
static COMPLEX8Vector * CreateCOMPLEX8VectorCUDA(UINT4 length)
__device__ __constant__ REAL8 lal_fact_inv[LAL_FACT_MAX]
int XLALExtractResampledTimeseries_ResampCUDA(MultiCOMPLEX8TimeSeries **multiTimeSeries_SRC_a, MultiCOMPLEX8TimeSeries **multiTimeSeries_SRC_b, void *method_data)
__global__ void CUDAComputeTwoF(REAL4 *twoF, cuComplex *Fa_k, cuComplex *Fb_k, REAL4 A, REAL4 B, REAL4 C, REAL4 E, REAL4 Dinv, UINT4 numFreqBins)
static int MoveCOMPLEX8TimeSeriesHtoD(COMPLEX8TimeSeries *series)
static REAL8Vector * CreateREAL8VectorCUDA(UINT4 length)
static int XLALBarycentricResampleMultiCOMPLEX8TimeSeriesCUDA(ResampCUDAMethodData *resamp, const PulsarDopplerParams *thisPoint, const FstatCommon *common)
Performs barycentric resampling on a multi-detector timeseries, updates resampling buffer with result...
__global__ void CUDAAddToFaFb(cuComplex *Fa_k, cuComplex *Fb_k, cuComplex *FaX_k, cuComplex *FbX_k, UINT4 numFreqBins)
static void DestroyREAL8VectorCUDA(REAL8Vector *vec)
int XLALSetupFstatResampCUDA(void **method_data, FstatCommon *common, FstatMethodFuncs *funcs, MultiSFTVector *multiSFTs, const FstatOptionalArgs *optArgs)
#define XLAL_CHECK_CUDA_CALL(...)
static int CopyMultiCOMPLEX8TimeSeriesDtoH(MultiCOMPLEX8TimeSeries **dst, MultiCOMPLEX8TimeSeries *src)
__global__ void CUDAApplyHetAMInterp(cuComplex *TS_a, cuComplex *TS_b, cuComplex *TStmp1, cuComplex *TStmp2, UINT4 numSamples)
int XLALGetFstatTiming_ResampCUDA(const void *method_data, FstatTimingGeneric *timingGeneric, FstatTimingModel *timingModel)
__global__ void CUDAApplyHetAMSrc(cuComplex *TStmp1_SRC_data, cuComplex *TStmp2_SRC_data, REAL8 *ti_DET_data, UINT4 iStart_SRC_al, REAL8 tStart_SRC_0, REAL8 tStart_DET_0, REAL8 dt_SRC, REAL8 tMid_DET_al, REAL8 tMid_SRC_al, REAL8 Tdot_al, REAL8 fHet, REAL4 a_al, REAL4 b_al, UINT4 numSamples)
static int MoveMultiCOMPLEX8TimeSeriesHtoD(MultiCOMPLEX8TimeSeries *multi)
#define XLAL_CHECK_CUFFT_CALL(...)
__global__ void CUDANormFaFb(cuComplex *Fa_out, cuComplex *Fb_out, REAL8 FreqOut0, REAL8 dFreq, REAL8 dtauX, REAL8 dt_SRC, UINT4 numFreqBins)
static int XLALApplySpindownAndFreqShiftCUDA(cuComplex *xOut, const COMPLEX8TimeSeries *xIn, const PulsarDopplerParams *doppler, REAL8 freqShift)
static void XLALDestroyResampCUDAMethodData(void *method_data)
FstatQuantities
Bit-field of -statistic quantities which can be computed by XLALComputeFstat().
@ FSTATQ_2F
Compute multi-detector .
@ FSTATQ_FAFB_PER_DET
Compute and for each detector.
@ FSTATQ_FAFB
Compute multi-detector and .
@ FSTATQ_NONE
Do not compute -statistic, still compute buffered quantities.
@ FSTATQ_2F_CUDA
Compute multi-detector , store results on CUDA GPU (CUDA implementation of Resamp only).
@ FSTATQ_ATOMS_PER_DET
Compute per-SFT -statistic atoms for each detector (Demod only).
@ FSTATQ_2F_PER_DET
Compute for each detector.
static const REAL8 LAL_FACT_INV[]
void XLALDestroyMultiAMCoeffs(MultiAMCoeffs *multiAMcoef)
Destroy a MultiAMCoeffs structure.
MultiAMCoeffs * XLALComputeMultiAMCoeffs(const MultiDetectorStateSeries *multiDetStates, const MultiNoiseWeights *multiWeights, SkyPosition skypos)
Multi-IFO version of XLALComputeAMCoeffs().
#define XLAL_INIT_DECL(var,...)
void * XLALCalloc(size_t m, size_t n)
void * XLALMalloc(size_t n)
void * XLALRealloc(void *p, size_t n)
MultiCOMPLEX8TimeSeries * XLALMultiSFTVectorToCOMPLEX8TimeSeries(const MultiSFTVector *multisfts)
Turn the given multiSFTvector into multiple long COMPLEX8TimeSeries, properly dealing with gaps.
void XLALDestroyMultiCOMPLEX8TimeSeries(MultiCOMPLEX8TimeSeries *multiTimes)
Destroy a MultiCOMPLEX8TimeSeries structure.
REAL8 XLALGetCPUTime(void)
#define PULSAR_MAX_DETECTORS
maximal number of detectors we can handle (for static arrays of detector quantities)
#define PULSAR_MAX_SPINS
maximal number of spin-parameters (Freq + spindowns) we can handle
void XLALDestroyMultiSFTVector(MultiSFTVector *multvect)
Destroy a multi SFT-vector.
int XLALMultiSFTVectorResizeBand(MultiSFTVector *multiSFTs, REAL8 f0, REAL8 Band)
Resize the frequency-band of a given multi-SFT vector to [f0, f0+Band].
MultiSSBtimes * XLALGetMultiSSBtimes(const MultiDetectorStateSeries *multiDetStates, SkyPosition skypos, LIGOTimeGPS refTime, SSBprecision precision)
Multi-IFO version of XLALGetSSBtimes().
void XLALDestroyMultiSSBtimes(MultiSSBtimes *multiSSB)
Destroy a MultiSSBtimes structure.
int XLALAddMultiBinaryTimes(MultiSSBtimes **multiSSBOut, const MultiSSBtimes *multiSSBIn, const PulsarDopplerParams *Doppler)
Multi-IFO version of XLALAddBinaryTimes().
COORDINATESYSTEM_EQUATORIAL
COMPLEX8TimeSeries * XLALCreateCOMPLEX8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
const LALUnit lalDimensionlessUnit
#define XLAL_CHECK(assertion,...)
int int XLALPrintWarning(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_CHECK_NULL(assertion,...)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
This structure contains the per-SFT (weighted) antenna-pattern functions , with the SFT-index,...
REAL4 B
summed antenna-pattern matrix coefficient:
REAL4Vector * b
(weighted) per-SFT antenna-pattern function
REAL4 A
summed antenna-pattern matrix coefficient:
REAL4 C
summed antenna-pattern matrix coefficient:
REAL4Vector * a
(weighted) per-SFT antenna-pattern function
Struct holding the "antenna-pattern" matrix , in terms of the multi-detector scalar product.
REAL4 Dd
determinant factor , such that
MultiDetectorStateSeries * multiDetectorStates
MultiLIGOTimeGPSVector * multiTimestamps
MultiNoiseWeights * multiNoiseWeights
void(* workspace_destroy_func)(void *)
void(* method_data_destroy_func)(void *)
int(* compute_func)(FstatResults *, const FstatCommon *, void *)
Struct of optional 'advanced level' and (potentially method-specific) arguments to be passed to the ...
BOOLEAN resampFFTPowerOf2
Resamp: round up FFT lengths to next power of 2; see FstatMethodType.
BOOLEAN collectTiming
a flag to turn on/off the collection of F-stat-method-specific timing-data
UINT4 Dterms
Number of Dirichlet kernel terms, used by some Demod methods; see FstatMethodType.
XLALComputeFstat() computed results structure.
AntennaPatternMatrix MmunuX[PULSAR_MAX_DETECTORS]
Per detector antenna pattern matrix , used in computing .
AntennaPatternMatrix Mmunu
Antenna pattern matrix , used in computing .
REAL4 * twoFPerDet[PULSAR_MAX_DETECTORS]
If whatWasComputed & FSTATQ_2F_PER_DET is true, the values computed at numFreqBins frequencies space...
FstatQuantities whatWasComputed
Bit-field of which -statistic quantities were computed.
REAL4 * twoF_CUDA
If whatWasComputed & FSTATQ_2F_CUDA is true, the multi-detector values as for twoF,...
COMPLEX8 * FaPerDet[PULSAR_MAX_DETECTORS]
If whatWasComputed & FSTATQ_PARTS_PER_DET is true, the and values computed at numFreqBins frequenci...
UINT4 numFreqBins
Number of frequencies at which the were computed.
REAL4 * twoF
If whatWasComputed & FSTATQ_2F is true, the multi-detector values computed at numFreqBins frequencie...
COMPLEX8 * Fa
If whatWasComputed & FSTATQ_PARTS is true, the multi-detector and computed at numFreqBins frequenci...
COMPLEX8 * FbPerDet[PULSAR_MAX_DETECTORS]
PulsarDopplerParams doppler
Doppler parameters, including the starting frequency, at which the were computed.
Generic F-stat timing coefficients (times in seconds) [see https://dcc.ligo.org/LIGO-T1600531-v4 for ...
Struct to carry the -statistic method-specific timing model in terms of a list of variable names and...
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
AntennaPatternMatrix Mmunu
antenna-pattern matrix
Multi-IFO container for COMPLEX8 resampled timeseries.
COMPLEX8TimeSeries ** data
array of COMPLEX8TimeSeries (pointers)
UINT4 length
number of IFOs
LIGOTimeGPSVector ** data
timestamps vector for each ifo
A collection of SFT vectors – one for each IFO in a multi-IFO search.
Multi-IFO container for SSB timings.
SSBtimes ** data
array of SSBtimes (pointers)
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
REAL8 period
Binary: orbital period (sec)
LIGOTimeGPS tp
Binary: time of observed periapsis passage (in SSB)
PulsarSpins fkdot
Intrinsic spins: [Freq, f1dot, f2dot, ...
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)
MultiCOMPLEX8TimeSeries * hostCopy4ExtractTS_SRC_b
MultiAMCoeffs * multiAMcoef
FstatTimingResamp timingResamp
AntennaPatternMatrix MmunuX[PULSAR_MAX_DETECTORS]
PulsarDopplerParams prev_doppler
MultiCOMPLEX8TimeSeries * hostCopy4ExtractTS_SRC_a
AntennaPatternMatrix Mmunu
MultiSSBtimes * multiSSBtimes
MultiCOMPLEX8TimeSeries * multiTimeSeries_SRC_b
MultiCOMPLEX8TimeSeries * multiTimeSeries_SRC_a
FstatTimingGeneric timingGeneric
MultiCOMPLEX8TimeSeries * multiTimeSeries_DET
MultiSSBtimes * multiBinaryTimes
REAL8Vector * SRCtimes_DET
COMPLEX8Vector * TStmp2_SRC
COMPLEX8Vector * TStmp1_SRC
Simple container for two REAL8-vectors, namely the SSB-timings DeltaT_alpha and Tdot_alpha,...
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'