Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lib/Statistics.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2005 Badri Krishnan, Alicia Sintes
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#ifndef _STATISTICS_H
20#define _STATISTICS_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26
27/**
28 * \author Krishnan, B., Sintes, A.M.
29 * \defgroup Statistics_h Statistics
30 * \ingroup lalpulsar_hough
31 * \brief Computes statistics of the Hough maps.
32 *
33 * ### Synopsis ###
34 *
35 * \code
36 * #include <lal/Statistics.h>
37 * \endcode
38 *
39 * Given a total Hough map, this calculates the maximum number count, minimum
40 * number count, average and standard deviation and produces a histogram of the
41 * number counts.
42 *
43 */
44/** @{ */
45
46
47/* *************
48 * Includes. This header may include others; if so, they go immediately
49 * after include-loop protection. Includes should appear in the following
50 * order:
51 * a. Standard library includes
52 * b. LDAS includes
53 * c. LAL includes
54 */
55#include<lal/Date.h>
56#include<lal/LALDatatypes.h>
57#include<lal/HoughMap.h>
58#include<lal/LALStdlib.h>
59#include<lal/LALConstants.h>
60
61
62/** \name Error Codes */
63/** @{ */
64#define STATISTICSH_ENULL 1
65#define STATISTICSH_EVAL 2
66#define STATISTICSH_MSGENULL "Null Pointer"
67#define STATISTICSH_MSGEVAL "Invalid Value"
68/** @} */
69
70
71/* *****************************************************
72 * Structure, enum, union, etc., typdefs.
73 */
74
75/** Structure for storing statistical information about a Hough map */
76typedef struct tagHoughStats {
77 HoughTT maxCount; /**< maximum number count */
78 UINT2 maxIndex[2]; /**< loctaion of maximum number count */
79 HoughTT minCount; /**< minimum number count */
80 UINT2 minIndex[2]; /**< location of minimum number count */
81 REAL8 avgCount; /**< average number count */
82 REAL8 stdDev; /**< standard deviation of number counts */
84
85/*
86 * Extern Global variables. (discouraged)
87 */
88
89/* ***************************************************
90 * Functions Declarations (i.e., prototypes).
91 */
92/** Calculates max, min, average and standard deviation of Hough number counts */
93void LALHoughStatistics( LALStatus *status, /**< pointer to LALStatus structure */
94 HoughStats *out, /**< output containing statistics */
95 HOUGHMapTotal *in /**< hough map */ );
96
97/** Calculates number count histogram */
98void LALHoughHistogram( LALStatus *status, /**< pointer to LALStatus structure */
99 UINT8Vector *out, /**< histogram */
100 HOUGHMapTotal *in /**< hough map*/ );
101
103 REAL8 *mean,
104 REAL8 *variance,
105 HOUGHMapTotal *in );
106
107/** @} */
108
109/* ****************************************************** */
110
111#ifdef __cplusplus
112} /* Close C++ protection */
113#endif
114
115#endif /* end of double inclusion protection */
REAL8 HoughTT
Total Hough Map pixel type.
Definition: HoughMap.h:113
double REAL8
uint16_t UINT2
void LALHoughStatistics(LALStatus *status, HoughStats *out, HOUGHMapTotal *in)
This function calculates the maximum number count, minimum number count, average and standard deviati...
void LALHoughHistogram(LALStatus *status, UINT8Vector *out, HOUGHMapTotal *in)
Produces a histogram of the number counts in a total Hough map.
void LALHoughmapMeanVariance(LALStatus *status, REAL8 *mean, REAL8 *variance, HOUGHMapTotal *in)
minIndex
This structure stores the Hough map.
Definition: HoughMap.h:130
Structure for storing statistical information about a Hough map.
HoughTT minCount
minimum number count
HoughTT maxCount
maximum number count
REAL8 stdDev
standard deviation of number counts
REAL8 avgCount
average number count