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
candidates.h File Reference

Prototypes

candidateVectorcreatecandidateVector (const UINT4 length)
 Allocate a candidateVector. More...
 
candidateVectorresizecandidateVector (candidateVector *vector, const UINT4 length)
 Resize a candidateVector. More...
 
candidateVectorkeepMostSignificantCandidates (const candidateVector *input, const UserInput_t *params)
 Keep the most significant candidates, potentially reducing the number of candidates if there are more than allowed. More...
 
void destroycandidateVector (candidateVector *vector)
 Free a candidateVector. More...
 
void loadCandidateData (candidate *output, const REAL8 fsig, const REAL8 period, const REAL8 moddepth, const REAL4 ra, const REAL4 dec, const REAL8 statval, const REAL8 h0, const REAL8 prob, const INT4 proberrcode, const REAL8 normalization, const INT4 templateVectorIndex, const BOOLEAN lineContamination)
 Load candidate data. More...
 
INT4 analyzeOneTemplate (candidate *output, const candidate *input, const ffdataStruct *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const UserInput_t *params, const REAL4FFTPlan *plan, const gsl_rng *rng, const BOOLEAN exactflag)
 Analyze a single template. More...
 
INT4 bruteForceTemplateSearch (candidate *output, const candidate input, const TwoSpectParamSpaceSearchVals *paramspace, const UserInput_t *params, const REAL4VectorAligned *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const REAL4FFTPlan *secondFFTplan, const gsl_rng *rng, const BOOLEAN useExactTemplates)
 A brute force template search to find the most significant template around a candidate. More...
 
INT4 bruteForceTemplateTest (candidateVector **output, const candidate input, const TwoSpectParamSpaceSearchVals *paramspace, const UserInput_t *params, const REAL4VectorAligned *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const REAL4FFTPlan *secondFFTplan, const gsl_rng *rng, const BOOLEAN useExactTemplates)
 A brute force template search to test templates around a candidate. More...
 
INT4 templateSearch_scox1Style (candidateVector **output, const REAL8 fminimum, const REAL8 fspan, const REAL8 period, const REAL8 asini, const REAL8 asinisigma, const SkyPosition skypos, const UserInput_t *params, const REAL4VectorAligned *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const REAL4VectorSequence *trackedlines, const REAL4FFTPlan *secondFFTplan, const gsl_rng *rng, const BOOLEAN useExactTemplates)
 A brute force template search to find the most significant template around a putative source whose parameters are somewhat constrained. More...
 
INT4 templateSearch_fixedDf (candidateVector **output, const LALStringVector *dffixed, const REAL8 fminimum, const REAL8 fspan, const REAL8 period, const SkyPosition skypos, const UserInput_t *params, const REAL4VectorAligned *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const REAL4VectorSequence *trackedlines, const REAL4FFTPlan *secondFFTplan, const gsl_rng *rng, const BOOLEAN useExactTemplates)
 A brute force template search to find the most significant template at a fixed modulation depth around a putative source whose parameters are somewhat constrained. More...
 
INT4 clusterCandidates (candidateVector **output, const candidateVector *input, const ffdataStruct *ffdata, const UserInput_t *params, const REAL4VectorAligned *ffplanenoise, const REAL4VectorAligned *fbinaveratios, const gsl_rng *rng, const BOOLEAN exactflag)
 Cluster candidates by frequency, period, and modulation depth using templates. More...
 
INT4 testIHScandidates (candidateVector **output, const candidateVector *ihsCandidates, const ffdataStruct *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const SkyPosition pos, const UserInput_t *params, const gsl_rng *rng)
 Function to test the IHS candidates against Gaussian templates. More...
 
INT4 testTwoSpectTemplateVector (candidateVector *output, const TwoSpectTemplateVector *templateVec, const ffdataStruct *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const SkyPosition skypos, const UserInput_t *params, const gsl_rng *rng, const UINT4 templateLen)
 Test each of the templates in a TwoSpectTemplateVector and keep the top 10 This will not check the false alarm probability of any R value less than 0. More...
 
INT4 analyzeCandidatesTemplateFromVector (candidateVector *output, const candidateVector *input, const TwoSpectTemplateVector *vector, const ffdataStruct *ffdata, const REAL4VectorAligned *aveNoise, const REAL4VectorAligned *aveTFnoisePerFbinRatio, const UserInput_t *params, const gsl_rng *rng, const UINT4 templateLen)
 
INT4 writeCandidateVector2File (const CHAR *outputfile, const candidateVector *input)
 
REAL8 maxModDepth (const REAL8 period, const REAL8 cohtime)
 Calculates maximum modulation depth allowed, equation 6 of E. More...
 
REAL8 minPeriod (const REAL8 moddepth, const REAL8 cohtime)
 Calculates minimum period allowed, equation 6 of E. More...
 
REAL8 calculateR (const REAL4VectorAligned *ffdata, const TwoSpectTemplate *template, const REAL4VectorAligned *noise, const REAL4VectorAligned *fbinaveratios)
 Calculate the R statistic from equation 13 of E. More...
 

Go to the source code of this file.

Function Documentation

◆ createcandidateVector()

candidateVector * createcandidateVector ( const UINT4  length)

Allocate a candidateVector.

Parameters
[in]lengthLength of the candidateVector
Returns
Pointer to the allocated candidateVector

Definition at line 32 of file candidates.c.

◆ resizecandidateVector()

candidateVector * resizecandidateVector ( candidateVector vector,
const UINT4  length 
)

Resize a candidateVector.

Parameters
[in]vectorPointer of vector to resize
[in]lengthNew length of candidateVector
Returns
Pointer to resized vector

Definition at line 61 of file candidates.c.

◆ keepMostSignificantCandidates()

candidateVector * keepMostSignificantCandidates ( const candidateVector input,
const UserInput_t params 
)

Keep the most significant candidates, potentially reducing the number of candidates if there are more than allowed.

Parameters
[in]inputPointer to input candidateVector
[in]paramsPointer to UserInput_t
Returns
Pointer to newly allocated candidateVector containing reduced number of candidates

Definition at line 1297 of file candidates.c.

◆ destroycandidateVector()

void destroycandidateVector ( candidateVector vector)

Free a candidateVector.

Parameters
[in]vectorPointer of candidateVector to be freed

Definition at line 89 of file candidates.c.

◆ loadCandidateData()

void loadCandidateData ( candidate output,
const REAL8  fsig,
const REAL8  period,
const REAL8  moddepth,
const REAL4  ra,
const REAL4  dec,
const REAL8  statval,
const REAL8  h0,
const REAL8  prob,
const INT4  proberrcode,
const REAL8  normalization,
const INT4  templateVectorIndex,
const BOOLEAN  lineContamination 
)

Load candidate data.

Parameters
[out]outputPointer to candidate
[in]fsigFrequency of candidate
[in]periodOrbital period of candidate
[in]moddepthModulation depth of candidate
[in]raRight ascension of candidate
[in]decDeclination of candidate
[in]statvalDetection statistic
[in]h0Estimated strain amplitude
[in]probFalse alarm probability
[in]proberrcodeDavies' method error code
[in]normalizationTime-frequency normalization
[in]templateVectorIndexIndex value of the template in a templateVector (can be -1 if not from a vector)
[in]lineContaminationBoolean flag to indicate 0 = no contamination from lines or 1 = likely contaminated by one or more lines

Definition at line 122 of file candidates.c.

◆ analyzeOneTemplate()

INT4 analyzeOneTemplate ( candidate output,
const candidate input,
const ffdataStruct ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const UserInput_t params,
const REAL4FFTPlan *  plan,
const gsl_rng *  rng,
const BOOLEAN  exactflag 
)

Analyze a single template.

Parameters
[out]outputPointer to candidate structure
[in]inputPointer to candidate structure
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of expected 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized power across the frequency band
[in]paramsPointer to UserInput_t
[in]planPointer to REAL4FFTPlan
[in]rngPointer to gsl_rng
[in]exactflagBoolean value to indicate using exact templates
Returns
Status value

Definition at line 153 of file candidates.c.

◆ bruteForceTemplateSearch()

INT4 bruteForceTemplateSearch ( candidate output,
const candidate  input,
const TwoSpectParamSpaceSearchVals paramspace,
const UserInput_t params,
const REAL4VectorAligned ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const REAL4FFTPlan *  secondFFTplan,
const gsl_rng *  rng,
const BOOLEAN  useExactTemplates 
)

A brute force template search to find the most significant template around a candidate.

Parameters
[out]outputPointer to candidate structure
[in]inputInput candidate structure
[in]paramspacePointer to TwoSpectParamSpaceSearchVals containing the parameter space to be searched
[in]paramsPointer to UserInput_t
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized power across the frequency band
[in]secondFFTplanPointer to REAL4FFTPlan
[in]rngPointer to gsl_rng
[in]useExactTemplatesBoolean of 0 (use Gaussian templates) or 1 (use exact templates)
Returns
Status value

Definition at line 254 of file candidates.c.

◆ bruteForceTemplateTest()

INT4 bruteForceTemplateTest ( candidateVector **  output,
const candidate  input,
const TwoSpectParamSpaceSearchVals paramspace,
const UserInput_t params,
const REAL4VectorAligned ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const REAL4FFTPlan *  secondFFTplan,
const gsl_rng *  rng,
const BOOLEAN  useExactTemplates 
)

A brute force template search to test templates around a candidate.

Parameters
[out]outputPointer to a pointer of a candidateVector
[in]inputInput candidate structure
[in]paramspacePointer to TwoSpectParamSpaceSearchVals containing the parameter space to be searched
[in]paramsPointer to UserInput_t
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized power across the frequency band
[in]secondFFTplanPointer to REAL4FFTPlan
[in]rngPointer to gsl_rng
[in]useExactTemplatesBoolean of 0 (use Gaussian templates) or 1 (use exact templates)
Returns
Status value

Definition at line 429 of file candidates.c.

◆ templateSearch_scox1Style()

INT4 templateSearch_scox1Style ( candidateVector **  output,
const REAL8  fminimum,
const REAL8  fspan,
const REAL8  period,
const REAL8  asini,
const REAL8  asinisigma,
const SkyPosition  skypos,
const UserInput_t params,
const REAL4VectorAligned ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const REAL4VectorSequence trackedlines,
const REAL4FFTPlan *  secondFFTplan,
const gsl_rng *  rng,
BOOLEAN  useExactTemplates 
)

A brute force template search to find the most significant template around a putative source whose parameters are somewhat constrained.

Parameters
[out]outputPointer to a pointer of a candidateVector
[in]fminimumLower frequency bound to search (inclusive)
[in]fspanSpan of the frequency band (inclusive of endpoint)
[in]periodSpecific orbital period (measured in seconds)
[in]asiniSpecific projected semi-major axis (measured in light seconds)
[in]asinisigmaUncertainty on the specific asini value (measured in light seconds)
[in]skyposSkyPosition struct of the sky position (in RA and DEC) being searched
[in]paramsPointer to UserInput_t
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized power across the frequency band
[in]trackedlinesPointer to REAL4VectorSequence of lines (allowed to be NULL if no lines)
[in]secondFFTplanPointer to REAL4FFTPlan
[in]rngPointer to gsl_rng
[in]useExactTemplatesBoolean of 0 (use Gaussian templates) or 1 (use exact templates)
Returns
Status value

Definition at line 575 of file candidates.c.

◆ templateSearch_fixedDf()

INT4 templateSearch_fixedDf ( candidateVector **  output,
const LALStringVector dffixed,
const REAL8  fminimum,
const REAL8  fspan,
const REAL8  period,
const SkyPosition  skypos,
const UserInput_t params,
const REAL4VectorAligned ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const REAL4VectorSequence trackedlines,
const REAL4FFTPlan *  secondFFTplan,
const gsl_rng *  rng,
BOOLEAN  useExactTemplates 
)

A brute force template search to find the most significant template at a fixed modulation depth around a putative source whose parameters are somewhat constrained.

Parameters
[out]outputPointer to a pointer of a candidateVector
[in]dffixedModulation depth (fixed by user)
[in]fminimumLower frequency bound to search (inclusive)
[in]fspanSpan of the frequency band (inclusive of endpoint)
[in]periodSpecific orbital period (measured in seconds)
[in]skyposSkyPosition struct of the sky position (in RA and DEC) being searched
[in]paramsPointer to UserInput_t
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized power across the frequency band
[in]trackedlinesPointer to REAL4VectorSequence of lines (allowed to be NULL if no lines)
[in]secondFFTplanPointer to REAL4FFTPlan
[in]rngPointer to gsl_rng
[in]useExactTemplatesBoolean of 0 (use Gaussian templates) or 1 (use exact templates)
Returns
Status value

Definition at line 724 of file candidates.c.

◆ clusterCandidates()

INT4 clusterCandidates ( candidateVector **  output,
const candidateVector input,
const ffdataStruct ffdata,
const UserInput_t params,
const REAL4VectorAligned ffplanenoise,
const REAL4VectorAligned fbinaveratios,
const gsl_rng *  rng,
const BOOLEAN  exactflag 
)

Cluster candidates by frequency, period, and modulation depth using templates.

Parameters
[out]outputPointer to pointer of a candidateVector
[in]inputPointer to a candidateVector
[in]ffdataPointer to ffdataStruct
[in]paramsPointer to UserInput_t
[in]ffplanenoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]fbinaveratiosPointer to REAL4VectorAligned of normalized SFT background
[in]rngPointer to gsl_rng
[in]exactflagFlag to use Gaussian templates (0) or exact templates (1)
Returns
Status value

Definition at line 837 of file candidates.c.

◆ testIHScandidates()

INT4 testIHScandidates ( candidateVector **  output,
const candidateVector ihsCandidates,
const ffdataStruct ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const SkyPosition  pos,
const UserInput_t params,
const gsl_rng *  rng 
)

Function to test the IHS candidates against Gaussian templates.

Parameters
[out]outputPointer to pointer of a candidateVector
[in]ihsCandidatesPointer to candidateVector of IHS candidates
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized SFT background spectra
[in]posThe current sky position
[in]paramsPointer to UserInput_t
[in]rngPointer to gsl_rng
Returns
Status value

Definition at line 1062 of file candidates.c.

◆ testTwoSpectTemplateVector()

INT4 testTwoSpectTemplateVector ( candidateVector output,
const TwoSpectTemplateVector templateVec,
const ffdataStruct ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const SkyPosition  skypos,
const UserInput_t params,
const gsl_rng *  rng,
const UINT4  templateLen 
)

Test each of the templates in a TwoSpectTemplateVector and keep the top 10 This will not check the false alarm probability of any R value less than 0.

Parameters
[out]outputPointer to pointer of a candidateVector storing a list of all candidates
[in]templateVecPointer to a TwoSpectTemplateVector containing all the templates to be searched
[in]ffdataPointer to ffdataStruct
[in]aveNoisePointer to REAL4VectorAligned of 2nd FFT background powers
[in]aveTFnoisePerFbinRatioPointer to REAL4VectorAligned of normalized SFT background spectra
[in]skyposThe current sky position
[in]paramsPointer to UserInput_t
[in]rngPointer to gsl_rng
[in]templateLenMaximum length of a template
Returns
Status value

Definition at line 1222 of file candidates.c.

◆ analyzeCandidatesTemplateFromVector()

INT4 analyzeCandidatesTemplateFromVector ( candidateVector output,
const candidateVector input,
const TwoSpectTemplateVector vector,
const ffdataStruct ffdata,
const REAL4VectorAligned aveNoise,
const REAL4VectorAligned aveTFnoisePerFbinRatio,
const UserInput_t params,
const gsl_rng *  rng,
const UINT4  templateLen 
)

Definition at line 191 of file candidates.c.

◆ writeCandidateVector2File()

INT4 writeCandidateVector2File ( const CHAR outputfile,
const candidateVector input 
)

Definition at line 1385 of file candidates.c.

◆ maxModDepth()

REAL8 maxModDepth ( const REAL8  period,
const REAL8  cohtime 
)

Calculates maximum modulation depth allowed, equation 6 of E.

Goetz and K. Riles (2011)

Parameters
[in]periodOrbital period value
[in]cohtimeSFT coherence length
Returns
Maximum modulation depth allowed

Definition at line 1414 of file candidates.c.

◆ minPeriod()

REAL8 minPeriod ( const REAL8  moddepth,
const REAL8  cohtime 
)

Calculates minimum period allowed, equation 6 of E.

Goetz and K. Riles (2011)

Parameters
[in]moddepthModulation depth value
[in]cohtimeSFT coherence length
Returns
Maximum modulation depth allowed

Definition at line 1427 of file candidates.c.

◆ calculateR()

REAL8 calculateR ( const REAL4VectorAligned ffdata,
const TwoSpectTemplate template,
const REAL4VectorAligned noise,
const REAL4VectorAligned fbinaveratios 
)

Calculate the R statistic from equation 13 of E.

Goetz and K. Riles (2011)

Parameters
[in]ffdataPointer to REAL4VectorAligned of the 2nd FFT data
[in]templatePointer to the template
[in]noisePointer to the REAL4VectorAligned containing the background 2nd FFT powers
[in]fbinaveratiosPointer to the REAL4VectorAligned of normalized SFT background powers
Returns
Value of the R statistic

Definition at line 1358 of file candidates.c.