Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
candidates.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2010, 2011 Evan Goetz
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#ifndef __CANDIDATES_H__
21#define __CANDIDATES_H__
22
23#include <lal/RealFFT.h>
24#include "TwoSpectTypes.h"
25
30
32 const REAL8 fsig,
33 const REAL8 period,
34 const REAL8 moddepth,
35 const REAL4 ra,
36 const REAL4 dec,
37 const REAL8 statval,
38 const REAL8 h0,
39 const REAL8 prob,
40 const INT4 proberrcode,
41 const REAL8 normalization,
42 const INT4 templateVectorIndex,
43 const BOOLEAN lineContamination );
44
46 const candidate *input,
47 const ffdataStruct *ffdata,
48 const REAL4VectorAligned *aveNoise,
49 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
50 const UserInput_t *params,
51 const REAL4FFTPlan *plan,
52 const gsl_rng *rng,
53 const BOOLEAN exactflag );
55 const candidate input,
56 const TwoSpectParamSpaceSearchVals *paramspace,
57 const UserInput_t *params,
58 const REAL4VectorAligned *ffdata,
59 const REAL4VectorAligned *aveNoise,
60 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
61 const REAL4FFTPlan *secondFFTplan,
62 const gsl_rng *rng,
63 const BOOLEAN useExactTemplates );
65 const candidate input,
66 const TwoSpectParamSpaceSearchVals *paramspace,
67 const UserInput_t *params,
68 const REAL4VectorAligned *ffdata,
69 const REAL4VectorAligned *aveNoise,
70 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
71 const REAL4FFTPlan *secondFFTplan,
72 const gsl_rng *rng,
73 const BOOLEAN useExactTemplates );
75 const REAL8 fminimum,
76 const REAL8 fspan,
77 const REAL8 period,
78 const REAL8 asini,
79 const REAL8 asinisigma,
80 const SkyPosition skypos,
81 const UserInput_t *params,
82 const REAL4VectorAligned *ffdata,
83 const REAL4VectorAligned *aveNoise,
84 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
85 const REAL4VectorSequence *trackedlines,
86 const REAL4FFTPlan *secondFFTplan,
87 const gsl_rng *rng,
88 const BOOLEAN useExactTemplates );
90 const LALStringVector *dffixed,
91 const REAL8 fminimum,
92 const REAL8 fspan,
93 const REAL8 period,
94 const SkyPosition skypos,
95 const UserInput_t *params,
96 const REAL4VectorAligned *ffdata,
97 const REAL4VectorAligned *aveNoise,
98 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
99 const REAL4VectorSequence *trackedlines,
100 const REAL4FFTPlan *secondFFTplan,
101 const gsl_rng *rng,
102 const BOOLEAN useExactTemplates );
104 const candidateVector *input,
105 const ffdataStruct *ffdata,
106 const UserInput_t *params,
107 const REAL4VectorAligned *ffplanenoise,
108 const REAL4VectorAligned *fbinaveratios,
109 const gsl_rng *rng,
110 const BOOLEAN exactflag );
112 const candidateVector *ihsCandidates,
113 const ffdataStruct *ffdata,
114 const REAL4VectorAligned *aveNoise,
115 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
116 const SkyPosition pos,
117 const UserInput_t *params,
118 const gsl_rng *rng );
120 const TwoSpectTemplateVector *templateVec,
121 const ffdataStruct *ffdata,
122 const REAL4VectorAligned *aveNoise,
123 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
124 const SkyPosition skypos,
125 const UserInput_t *params,
126 const gsl_rng *rng,
127 const UINT4 templateLen );
129 const candidateVector *input,
131 const ffdataStruct *ffdata,
132 const REAL4VectorAligned *aveNoise,
133 const REAL4VectorAligned *aveTFnoisePerFbinRatio,
134 const UserInput_t *params,
135 const gsl_rng *rng,
136 const UINT4 templateLen );
137
138INT4 writeCandidateVector2File( const CHAR *outputfile, const candidateVector *input );
139
140REAL8 maxModDepth( const REAL8 period, const REAL8 cohtime );
141REAL8 minPeriod( const REAL8 moddepth, const REAL8 cohtime );
142REAL8 calculateR( const REAL4VectorAligned *ffdata, const TwoSpectTemplate *template, const REAL4VectorAligned *noise, const REAL4VectorAligned *fbinaveratios );
143
144#endif
REAL8 minPeriod(const REAL8 moddepth, const REAL8 cohtime)
Calculates minimum period allowed, equation 6 of E.
Definition: candidates.c:1427
candidateVector * keepMostSignificantCandidates(const candidateVector *input, const UserInput_t *params)
Keep the most significant candidates, potentially reducing the number of candidates if there are more...
Definition: candidates.c:1297
candidateVector * createcandidateVector(const UINT4 length)
Allocate a candidateVector.
Definition: candidates.c:32
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.
Definition: candidates.c:1062
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: candidates.c:191
REAL8 calculateR(const REAL4VectorAligned *ffdata, const TwoSpectTemplate *template, const REAL4VectorAligned *noise, const REAL4VectorAligned *fbinaveratios)
Calculate the R statistic from equation 13 of E.
Definition: candidates.c:1358
candidateVector * resizecandidateVector(candidateVector *vector, const UINT4 length)
Resize a candidateVector.
Definition: candidates.c:61
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...
Definition: candidates.c:724
INT4 writeCandidateVector2File(const CHAR *outputfile, const candidateVector *input)
Definition: candidates.c:1385
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...
Definition: candidates.c:575
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.
Definition: candidates.c:254
REAL8 maxModDepth(const REAL8 period, const REAL8 cohtime)
Calculates maximum modulation depth allowed, equation 6 of E.
Definition: candidates.c:1414
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.
Definition: candidates.c:429
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...
Definition: candidates.c:1222
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.
Definition: candidates.c:837
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.
Definition: candidates.c:153
void destroycandidateVector(candidateVector *vector)
Free a candidateVector.
Definition: candidates.c:89
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.
Definition: candidates.c:122
unsigned char BOOLEAN
double REAL8
char CHAR
uint32_t UINT4
int32_t INT4
float REAL4