Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-8a6b96f
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
falsealarm.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2010, 2011, 2014 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 __FALSEALARM_H__
21#define __FALSEALARM_H__
22
23#include "TwoSpectTypes.h"
24
26 const TwoSpectTemplate *template;
31 const gsl_rng *rng;
33};
34
36void destroyfarStruct( farStruct *farstruct );
37INT4 estimateFAR( farStruct *output, const TwoSpectTemplate *template, const UINT4 trials, const REAL8 thresh, const REAL4VectorAligned *ffplanenoise, const REAL4VectorAligned *fbinaveratios );
38INT4 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 );
39REAL8 probR( const TwoSpectTemplate *template, const REAL4VectorAligned *ffplanenoise, const REAL4VectorAligned *fbinaveratios, const REAL8 R, const UserInput_t *params, const gsl_rng *rng, INT4 *errcode );
40REAL8 gsl_probR( const REAL8 R, void *pars );
41REAL8 gsl_dprobRdR( const REAL8 R, void *pars );
42void gsl_probRandDprobRdR( const REAL8 R, void *pars, REAL8 *probabilityR, REAL8 *dprobRdR );
43
44#endif
REAL8 gsl_probR(const REAL8 R, void *pars)
For the root finding, calculating the false alarm probability of R.
Definition: falsealarm.c:252
farStruct * createfarStruct(void)
Allocate memory for farStruct.
Definition: falsealarm.c:32
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...
Definition: falsealarm.c:327
REAL8 gsl_dprobRdR(const REAL8 R, void *pars)
Determine the slope of the inverse cumulative distribution function.
Definition: falsealarm.c:285
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.
Definition: falsealarm.c:66
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.
Definition: falsealarm.c:350
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...
Definition: falsealarm.c:140
void destroyfarStruct(farStruct *farstruct)
Destroy an farStruct.
Definition: falsealarm.c:46
double REAL8
uint32_t UINT4
int32_t INT4
float REAL4
const REAL4VectorAligned * fbinaveratios
Definition: falsealarm.h:28
const UserInput_t * inputParams
Definition: falsealarm.h:30
const REAL4 threshold
Definition: falsealarm.h:29
const REAL4VectorAligned * ffplanenoise
Definition: falsealarm.h:27
const gsl_rng * rng
Definition: falsealarm.h:31