Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-ea7c608
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Perform CW cross-correlation search - version 2. More...

Prototypes

int main (int argc, char *argv[])
 

Detailed Description

Perform CW cross-correlation search - version 2.

Author
B.Krishnan, S.Larson, J.T.Whelan, Y.Zhang, G.D.Meadors, J.K.Wofford
Date
2013, 2014, 2015, 2016, 2017, 2020, 2021

This carries out the cross-correlation search defined in [6], and specifically the implementation detailed in [34] . The SFT-normalization routines described in [21] are leveraged.

Definition in file pulsar_crosscorr_v2.c.

Go to the source code of this file.

Data Structures

struct  UserInput_t
 User-variables: can be set from config-file or command-line.
 
struct  ConfigVariables
 Configuration settings required for and defining a coherent pulsar search. More...
 

Macros

#define PCC_SFTPAIR_HEADER   "# The length of SFT-pair list is %u #\n"
 
#define PCC_SFTPAIR_BODY   "%u %u\n"
 
#define PCC_SFT_HEADER   "# The length of SFT list is %u #\n"
 
#define PCC_SFT_BODY   "%s %d %d\n"
 
#define PCC_LINEFILE_HEADER
 
#define PCC_LINEFILE_BODY   "%lf %d %lf %d %d %lf %lf"
 
#define PCC_GAMMA_HEADER   "# The normalization Sinv_Tsft is %g #\n"
 
#define PCC_GAMMA_BODY   "%.10g\n"
 
#define TRUE   (1==1)
 
#define FALSE   (1==0)
 
#define MAXFILENAMELENGTH   512
 
#define MAXLINELENGTH   1024
 
#define SQR(x)   ((x)*(x))
 
#define MYMAX(x, y)   ( (x) > (y) ? (x) : (y) )
 
#define MYMIN(x, y)   ( (x) < (y) ? (x) : (y) )
 
#define USE_ALIGNED_MEMORY_ROUTINES
 
int XLALInitUserVars (UserInput_t *uvar)
 Register all our "user-variables" that can be specified from cmd-line and/or config-file. More...
 
int XLALInitializeConfigVars (ConfigVariables *config, const UserInput_t *uvar)
 
int XLALDestroyConfigVars (ConfigVariables *config)
 
int GetNextCrossCorrTemplate (BOOLEAN *binaryParamsFlag, BOOLEAN *firstPoint, PulsarDopplerParams *dopplerpos, PulsarDopplerParams *binaryTemplateSpacings, PulsarDopplerParams *minBinaryTemplate, PulsarDopplerParams *maxBinaryTemplate, UINT8 *fCount, UINT8 *aCount, UINT8 *tCount, UINT8 *pCount, UINT8 fSpacingNum, UINT8 aSpacingNum, UINT8 tSpacingNum, UINT8 pSpacingNum, ConfigVariables *config)
 FIXME: spacings and min, max values of binary parameters are not used yet. More...
 
int GetNextCrossCorrTemplateForResamp (BOOLEAN *binaryParamsFlag, PulsarDopplerParams *dopplerpos, PulsarDopplerParams *binaryTemplateSpacings, PulsarDopplerParams *minBinaryTemplate, PulsarDopplerParams *maxBinaryTemplate, UINT8 *fCount, UINT8 *aCount, UINT8 *tCount, UINT8 *pCount, ConfigVariables *config)
 
int demodLoopCrossCorr (MultiSSBtimes *multiBinaryTimes, MultiSSBtimes *multiSSBTimes, PulsarDopplerParams dopplerpos, BOOLEAN dopplerShiftFlag, PulsarDopplerParams binaryTemplateSpacings, PulsarDopplerParams minBinaryTemplate, PulsarDopplerParams maxBinaryTemplate, UINT8 fCount, UINT8 aCount, UINT8 tCount, UINT8 pCount, UINT8 fSpacingNum, UINT8 aSpacingNum, UINT8 tSpacingNum, UINT8 pSpacingNum, REAL8Vector *shiftedFreqs, UINT4Vector *lowestBins, COMPLEX8Vector *expSignalPhases, REAL8VectorSequence *sincList, UserInput_t uvar, SFTIndexList *sftIndices, MultiSFTVector *inputSFTs, MultiUINT4Vector *badBins, REAL8 Tsft, MultiNoiseWeights *multiWeights, REAL8 ccStat, REAL8 evSquared, REAL8 estSens, REAL8Vector *GammaAve, SFTPairIndexList *sftPairs, CrossCorrBinaryOutputEntry thisCandidate, toplist_t *ccToplist, int DEMODndim, int DEMODdimf, int DEMODdima, int DEMODdimT, int DEMODdimP, gsl_matrix *metric_ij, int *DEMODnumpoints, int *DEMODnumorb, ConfigVariables *config)
 Function to isolate the loop for demod. More...
 
int resampForLoopCrossCorr (PulsarDopplerParams dopplerpos, BOOLEAN dopplerShiftFlag, PulsarDopplerParams binaryTemplateSpacings, PulsarDopplerParams minBinaryTemplate, PulsarDopplerParams maxBinaryTemplate, UINT8 fCount, UINT8 aCount, UINT8 tCount, UINT8 pCount, UINT8 fSpacingNum, UINT8 aSpacingNum, UINT8 tSpacingNum, UINT8 pSpacingNum, UserInput_t uvar, MultiNoiseWeights *multiWeights, UINT4 *numSamplesFFT, REAL8Vector *ccStatVector, REAL8Vector *evSquaredVector, REAL8Vector *numeEquivAve, REAL8Vector *numeEquivCirc, REAL8 estSens, REAL8Vector *resampGammaAve, MultiResampSFTPairMultiIndexList *resampMultiPairs, CrossCorrBinaryOutputEntry thisCandidate, toplist_t *ccToplist, REAL8 tShort, ConfigVariables *config)
 For-loop function for resampling. More...
 
int testShortFunctionsBlock (UserInput_t uvar, MultiSFTVector *inputSFTs, REAL8 Tsft, REAL8 resampTshort, SFTIndexList **sftIndices, SFTPairIndexList **sftPairs, REAL8Vector **GammaAve, REAL8Vector **GammaCirc, MultiResampSFTPairMultiIndexList **resampMultiPairs, MultiLALDetector *multiDetectors, MultiDetectorStateSeries **multiStates, MultiDetectorStateSeries **resampMultiStates, MultiNoiseWeights **multiWeights, MultiLIGOTimeGPSVector **multiTimes, MultiLIGOTimeGPSVector **resampMultiTimes, MultiSSBtimes **multiSSBTimes, REAL8VectorSequence **phaseDerivs, gsl_matrix **g_ij, gsl_vector **eps_i, REAL8 estSens, SkyPosition *skypos, PulsarDopplerParams *dopplerpos, PulsarDopplerParams *thisBinaryTemplate, ConfigVariables config, const DopplerCoordinateSystem coordSys)
 
UINT4 pcc_count_csv (CHAR *csvline)
 Counts the number of comma separated values in a string. More...
 
INT4 XLALFindBadBins (UINT4Vector *badBinData, INT4 binCount, REAL8 flo, REAL8 fhi, REAL8 f0, REAL8 deltaF, UINT4 length)
 Convert a range of contaminated frequencies into a set of bins to zero out. More...
 

Macro Definition Documentation

◆ TRUE

#define TRUE   (1==1)

Definition at line 154 of file pulsar_crosscorr_v2.c.

◆ FALSE

#define FALSE   (1==0)

Definition at line 155 of file pulsar_crosscorr_v2.c.

◆ MAXFILENAMELENGTH

#define MAXFILENAMELENGTH   512

Definition at line 156 of file pulsar_crosscorr_v2.c.

◆ MAXLINELENGTH

#define MAXLINELENGTH   1024

Definition at line 157 of file pulsar_crosscorr_v2.c.

◆ SQR

#define SQR (   x)    ((x)*(x))

Definition at line 159 of file pulsar_crosscorr_v2.c.

◆ MYMAX

#define MYMAX (   x,
  y 
)    ( (x) > (y) ? (x) : (y) )

Definition at line 161 of file pulsar_crosscorr_v2.c.

◆ MYMIN

#define MYMIN (   x,
  y 
)    ( (x) < (y) ? (x) : (y) )

Definition at line 162 of file pulsar_crosscorr_v2.c.

◆ USE_ALIGNED_MEMORY_ROUTINES

#define USE_ALIGNED_MEMORY_ROUTINES

Definition at line 163 of file pulsar_crosscorr_v2.c.

◆ PCC_SFTPAIR_HEADER

#define PCC_SFTPAIR_HEADER   "# The length of SFT-pair list is %u #\n"

◆ PCC_SFTPAIR_BODY

#define PCC_SFTPAIR_BODY   "%u %u\n"

◆ PCC_SFT_HEADER

#define PCC_SFT_HEADER   "# The length of SFT list is %u #\n"

◆ PCC_SFT_BODY

#define PCC_SFT_BODY   "%s %d %d\n"

◆ PCC_LINEFILE_HEADER

#define PCC_LINEFILE_HEADER
Value:
"%% %2s lines cleaning file for %s\n"\
"%%\n"\
"%% File contains %d (non-comment) lines\n"\
"%%\n"\
"%% Column 1 - frequency spacing (Hz) of comb (or frequency of single line)\n"\
"%% Column 2 - comb type (0 - singlet, 1 - comb with fixed width, 2 - comb with scaling width)\n"\
"%% Column 3 - frequency offset of 1st visible harmonic (Hz)\n"\
"%% Column 4 - index of first visible harmonic\n"\
"%% Column 5 - index of last visible harmonic\n"\
"%% Column 6 - width of left band (Hz)\n"\
"%% Column 7 - width of right band (Hz)\n"\
"%%\n"\
"%% For fixed-width combs, veto the band:\n"\
"%% [offset+index*spacing-leftwidth, offset+index*spacing+rightwidth]\n"\
"%% For scaling-width combs, veto the band:\n"\
"%% [offset+index*spacing-index*leftwidth, offset+index*spacing+index*rightwidth]\n"\
"%%"

◆ PCC_LINEFILE_BODY

#define PCC_LINEFILE_BODY   "%lf %d %lf %d %d %lf %lf"

◆ PCC_GAMMA_HEADER

#define PCC_GAMMA_HEADER   "# The normalization Sinv_Tsft is %g #\n"

◆ PCC_GAMMA_BODY

#define PCC_GAMMA_BODY   "%.10g\n"

Function Documentation

◆ XLALInitUserVars()

int XLALInitUserVars ( UserInput_t uvar)

Register all our "user-variables" that can be specified from cmd-line and/or config-file.

Here we set defaults for some user-variables and register them with the UserInput module.

Definition at line 1411 of file pulsar_crosscorr_v2.c.

◆ XLALInitializeConfigVars()

int XLALInitializeConfigVars ( ConfigVariables config,
const UserInput_t uvar 
)

Definition at line 1571 of file pulsar_crosscorr_v2.c.

◆ XLALDestroyConfigVars()

int XLALDestroyConfigVars ( ConfigVariables config)

Definition at line 1719 of file pulsar_crosscorr_v2.c.

◆ GetNextCrossCorrTemplate()

int GetNextCrossCorrTemplate ( BOOLEAN binaryParamsFlag,
BOOLEAN firstPoint,
PulsarDopplerParams dopplerpos,
PulsarDopplerParams binaryTemplateSpacings,
PulsarDopplerParams minBinaryTemplate,
PulsarDopplerParams maxBinaryTemplate,
UINT8 fCount,
UINT8 aCount,
UINT8 tCount,
UINT8 pCount,
UINT8  fSpacingNum,
UINT8  aSpacingNum,
UINT8  tSpacingNum,
UINT8  pSpacingNum,
ConfigVariables config 
)

FIXME: spacings and min, max values of binary parameters are not used yet.

Definition at line 1731 of file pulsar_crosscorr_v2.c.

◆ GetNextCrossCorrTemplateForResamp()

int GetNextCrossCorrTemplateForResamp ( BOOLEAN binaryParamsFlag,
PulsarDopplerParams dopplerpos,
PulsarDopplerParams binaryTemplateSpacings,
PulsarDopplerParams minBinaryTemplate,
PulsarDopplerParams maxBinaryTemplate,
UINT8 fCount,
UINT8 aCount,
UINT8 tCount,
UINT8 pCount,
ConfigVariables config 
)

Definition at line 1911 of file pulsar_crosscorr_v2.c.

◆ demodLoopCrossCorr()

int demodLoopCrossCorr ( MultiSSBtimes multiBinaryTimes,
MultiSSBtimes multiSSBTimes,
PulsarDopplerParams  dopplerpos,
BOOLEAN  dopplerShiftFlag,
PulsarDopplerParams  binaryTemplateSpacings,
PulsarDopplerParams  minBinaryTemplate,
PulsarDopplerParams  maxBinaryTemplate,
UINT8  fCount,
UINT8  aCount,
UINT8  tCount,
UINT8  pCount,
UINT8  fSpacingNum,
UINT8  aSpacingNum,
UINT8  tSpacingNum,
UINT8  pSpacingNum,
REAL8Vector shiftedFreqs,
UINT4Vector lowestBins,
COMPLEX8Vector expSignalPhases,
REAL8VectorSequence sincList,
UserInput_t  uvar,
SFTIndexList sftIndices,
MultiSFTVector inputSFTs,
MultiUINT4Vector badBins,
REAL8  Tsft,
MultiNoiseWeights multiWeights,
REAL8  ccStat,
REAL8  evSquared,
REAL8  estSens,
REAL8Vector GammaAve,
SFTPairIndexList sftPairs,
CrossCorrBinaryOutputEntry  thisCandidate,
toplist_t ccToplist,
int  DEMODndim,
int  DEMODdimf,
int  DEMODdima,
int  DEMODdimT,
int  DEMODdimP,
gsl_matrix *  metric_ij,
int DEMODnumpoints,
int DEMODnumorb,
ConfigVariables config 
)

Function to isolate the loop for demod.

else if (prev_point->data[DEMODdima] == curr_point->data[DEMODdima] && prev_point->data[DEMODdimP] == curr_point->data[DEMODdimP] && prev_point->data[DEMODdimT] == curr_point->data[DEMODdimT])

{ dopplerShiftFlag = FALSE; }

else if (prev_point->data[DEMODdima] != curr_point->data[DEMODdima] || prev_point->data[DEMODdimP] != curr_point->data[DEMODdimP] || prev_point->data[DEMODdimT] != curr_point->data[DEMODdimT])

{ dopplerShiftFlag = TRUE; }

Definition at line 2049 of file pulsar_crosscorr_v2.c.

◆ resampForLoopCrossCorr()

int resampForLoopCrossCorr ( PulsarDopplerParams  dopplerpos,
BOOLEAN  dopplerShiftGlag,
PulsarDopplerParams  binaryTemplateSpacings,
PulsarDopplerParams  minBinaryTemplate,
PulsarDopplerParams  maxBinaryTemplate,
UINT8  fCount,
UINT8  aCount,
UINT8  tCount,
UINT8  pCount,
UINT8  fSpacingNum,
UINT8  aSpacingNum,
UINT8  tSpacingNum,
UINT8  pSpacingNum,
UserInput_t  uvar,
MultiNoiseWeights multiWeights,
UINT4 numSamplesFFT,
REAL8Vector ccStatVector,
REAL8Vector evSquaredVector,
REAL8Vector numeEquivAve,
REAL8Vector numeEquivCirc,
REAL8  estSens,
REAL8Vector resampGammaAve,
MultiResampSFTPairMultiIndexList resampMultiPairs,
CrossCorrBinaryOutputEntry  thisCandidate,
toplist_t ccToplist,
REAL8  tShort,
ConfigVariables config 
)

For-loop function for resampling.

Definition at line 2343 of file pulsar_crosscorr_v2.c.

◆ testShortFunctionsBlock()

int testShortFunctionsBlock ( UserInput_t  uvar,
MultiSFTVector inputSFTs,
REAL8  Tsft,
REAL8  resampTshort,
SFTIndexList **  sftIndices,
SFTPairIndexList **  sftPairs,
REAL8Vector **  GammaAve,
REAL8Vector **  GammaCirc,
MultiResampSFTPairMultiIndexList **  resampMultiPairs,
MultiLALDetector multiDetectors,
MultiDetectorStateSeries **  multiStates,
MultiDetectorStateSeries **  resampMultiStates,
MultiNoiseWeights **  multiWeights,
MultiLIGOTimeGPSVector **  multiTimes,
MultiLIGOTimeGPSVector **  resampMultiTimes,
MultiSSBtimes **  multiSSBTimes,
REAL8VectorSequence **  phaseDerivs,
gsl_matrix **  g_ij,
gsl_vector **  eps_i,
REAL8  estSens,
SkyPosition skypos,
PulsarDopplerParams dopplerpos,
PulsarDopplerParams thisBinaryTemplate,
ConfigVariables  config,
const DopplerCoordinateSystem  coordSys 
)
  • apply noise-weights and compute antenna-pattern matrix {A,B,C} *‍/

Definition at line 2517 of file pulsar_crosscorr_v2.c.

◆ pcc_count_csv()

UINT4 pcc_count_csv ( CHAR csvline)

Counts the number of comma separated values in a string.

This function counts the number of comma separated values in a given input string.

Parameters
csvline[in] Any string
Returns
The number of comma separated value in the input string

Definition at line 1966 of file pulsar_crosscorr_v2.c.

◆ XLALFindBadBins()

INT4 XLALFindBadBins ( UINT4Vector badBinData,
INT4  binCount,
REAL8  flo,
REAL8  fhi,
REAL8  f0,
REAL8  deltaF,
UINT4  length 
)

Convert a range of contaminated frequencies into a set of bins to zero out.

Definition at line 1991 of file pulsar_crosscorr_v2.c.

◆ main()

int main ( int  argc,
char argv[] 
)

< Git version string

Definition at line 180 of file pulsar_crosscorr_v2.c.