20#ifndef __CANDIDATES_H__
21#define __CANDIDATES_H__
23#include <lal/RealFFT.h>
40 const INT4 proberrcode,
41 const REAL8 normalization,
42 const INT4 templateVectorIndex,
43 const BOOLEAN lineContamination );
51 const REAL4FFTPlan *plan,
61 const REAL4FFTPlan *secondFFTplan,
63 const BOOLEAN useExactTemplates );
71 const REAL4FFTPlan *secondFFTplan,
73 const BOOLEAN useExactTemplates );
79 const REAL8 asinisigma,
86 const REAL4FFTPlan *secondFFTplan,
88 const BOOLEAN useExactTemplates );
100 const REAL4FFTPlan *secondFFTplan,
102 const BOOLEAN useExactTemplates );
118 const gsl_rng *rng );
127 const UINT4 templateLen );
136 const UINT4 templateLen );
REAL8 minPeriod(const REAL8 moddepth, const REAL8 cohtime)
Calculates minimum period allowed, equation 6 of E.
candidateVector * keepMostSignificantCandidates(const candidateVector *input, const UserInput_t *params)
Keep the most significant candidates, potentially reducing the number of candidates if there are more...
candidateVector * createcandidateVector(const UINT4 length)
Allocate a candidateVector.
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.
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)
REAL8 calculateR(const REAL4VectorAligned *ffdata, const TwoSpectTemplate *template, const REAL4VectorAligned *noise, const REAL4VectorAligned *fbinaveratios)
Calculate the R statistic from equation 13 of E.
candidateVector * resizecandidateVector(candidateVector *vector, const UINT4 length)
Resize a candidateVector.
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 aroun...
INT4 writeCandidateVector2File(const CHAR *outputfile, const candidateVector *input)
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 pa...
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.
REAL8 maxModDepth(const REAL8 period, const REAL8 cohtime)
Calculates maximum modulation depth allowed, equation 6 of E.
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.
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 fa...
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.
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.
void destroycandidateVector(candidateVector *vector)
Free a candidateVector.
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.