20#ifndef __FALSEALARM_H__
21#define __FALSEALARM_H__
REAL8 gsl_probR(const REAL8 R, void *pars)
For the root finding, calculating the false alarm probability of R.
farStruct * createfarStruct(void)
Allocate memory for farStruct.
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 t...
REAL8 gsl_dprobRdR(const REAL8 R, void *pars)
Determine the slope of the inverse cumulative distribution function.
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.
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.
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 ro...
void destroyfarStruct(farStruct *farstruct)
Destroy an farStruct.
const REAL4VectorAligned * fbinaveratios
const UserInput_t * inputParams
const REAL4VectorAligned * ffplanenoise