Prototypes | |
farStruct * | createfarStruct (void) |
Allocate memory for farStruct. More... | |
void | destroyfarStruct (farStruct *farstruct) |
Destroy an farStruct. More... | |
INT4 | estimateFAR (farStruct *output, const TwoSpectTemplate *template, const UINT4 trials, const REAL8 thresh, const REAL4VectorAligned *ffplanenoise, const REAL4VectorAligned *fbinaveratios) |
Estimate the FAR of the R statistic from the weights by a number of trials. More... | |
INT4 | numericFAR (farStruct *output, const TwoSpectTemplate *template, const REAL8 thresh, const REAL4VectorAligned *ffplanenoise, const REAL4VectorAligned *fbinaveratios, const UserInput_t *inputParams, const gsl_rng *rng, const INT4 method) |
Numerically solve for the FAR of the R statistic from the weights using the Davies algorithm and a root finding algorithm. More... | |
REAL8 | probR (const TwoSpectTemplate *template, const REAL4VectorAligned *ffplanenoise, const REAL4VectorAligned *fbinaveratios, const REAL8 R, const UserInput_t *params, const gsl_rng *rng, INT4 *errcode) |
Analytically calculate the probability of a true signal using the Davies' method. More... | |
REAL8 | gsl_probR (const REAL8 R, void *pars) |
For the root finding, calculating the false alarm probability of R. More... | |
REAL8 | gsl_dprobRdR (const REAL8 R, void *pars) |
Determine the slope of the inverse cumulative distribution function. More... | |
void | gsl_probRandDprobRdR (const REAL8 R, void *pars, REAL8 *probabilityR, REAL8 *dprobRdR) |
Determine the difference between the probability and log10 of the threshold as well as the slope of the inverse cumulative distribution function. More... | |
Go to the source code of this file.
Data Structures | |
struct | gsl_probR_pars |
farStruct * createfarStruct | ( | void | ) |
Allocate memory for farStruct.
Definition at line 32 of file falsealarm.c.
void destroyfarStruct | ( | farStruct * | farstruct | ) |
Destroy an farStruct.
[in] | farstruct | Pointer to a farStruct |
Definition at line 46 of file falsealarm.c.
INT4 estimateFAR | ( | farStruct * | output, |
const TwoSpectTemplate * | template, | ||
const UINT4 | trials, | ||
const REAL8 | thresh, | ||
const REAL4VectorAligned * | ffplanenoise, | ||
const REAL4VectorAligned * | fbinaveratios | ||
) |
Estimate the FAR of the R statistic from the weights by a number of trials.
[out] | output | Pointer to a farStruct |
[in] | template | Pointer to a TwoSpectTemplate containing a template |
[in] | trials | Number of trials to estimate the FAR |
[in] | thresh | Threshold value |
[in] | ffplanenoise | Pointer to REAL4VectorAligned containing the expected 2nd FFT background estimates |
[in] | fbinaveratios | Pointer to REAL4VectorAligned containing the noise floor variations |
Definition at line 66 of file falsealarm.c.
INT4 numericFAR | ( | farStruct * | output, |
const TwoSpectTemplate * | template, | ||
const REAL8 | thresh, | ||
const REAL4VectorAligned * | ffplanenoise, | ||
const REAL4VectorAligned * | fbinaveratios, | ||
const UserInput_t * | inputParams, | ||
const gsl_rng * | rng, | ||
const INT4 | method | ||
) |
Numerically solve for the FAR of the R statistic from the weights using the Davies algorithm and a root finding algorithm.
[out] | output | Pointer to a farStruct |
[in] | template | Pointer to a TwoSpectTemplate containing a template |
[in] | thresh | Threshold value |
[in] | ffplanenoise | Pointer to REAL4VectorAligned containing the expected 2nd FFT background estimates |
[in] | fbinaveratios | Pointer to REAL4VectorAligned containing the noise floor variations |
[in] | inputParams | Pointer to UserInput_t |
[in] | rng | Pointer to gsl_rng |
[in] | method | Integer value of 0 (Brent's method) or 1 (Newton's method) |
Definition at line 140 of file falsealarm.c.
REAL8 probR | ( | const TwoSpectTemplate * | template, |
const REAL4VectorAligned * | ffplanenoise, | ||
const REAL4VectorAligned * | fbinaveratios, | ||
const REAL8 | R, | ||
const UserInput_t * | params, | ||
const gsl_rng * | rng, | ||
INT4 * | errcode | ||
) |
Analytically calculate the probability of a true signal using the Davies' method.
[in] | template | Pointer to a TwoSpectTemplate with a template |
[in] | ffplanenoise | Pointer to a REAL4VectorAligned with an estimate of the background of 2nd FFT powers |
[in] | fbinaveratios | Pointer to a REAL4VectorAligned of frequency bin average ratios |
[in] | R | The value of R for a given template |
[in] | params | Pointer to UserInput_t |
[in] | rng | Pointer to gsl_rng |
[out] | errcode | Pointer to the error code value from the Davies algorithm |
Definition at line 350 of file falsealarm.c.
For the root finding, calculating the false alarm probability of R.
This method takes the average of 3 values of close by R values for stability
[in] | R | R value of interest |
[in] | param | A gsl_probR_pars struct |
Definition at line 252 of file falsealarm.c.
Determine the slope of the inverse cumulative distribution function.
[in] | R | R value of interest |
[in] | param | A gsl_probR_pars struct |
Definition at line 285 of file falsealarm.c.
Determine the difference between the probability and log10 of the threshold as well as the slope of the inverse cumulative distribution function.
[in] | R | R value of interest |
[in] | param | A gsl_probR_pars struct |
[out] | probabilityR | The difference between the threshold and the probability of the R value in question |
[out] | dprobRdR | The slope of the inverse cumulative distribution function |
Definition at line 327 of file falsealarm.c.