LALPulsar 7.1.1.1-eeff03c
RecalcToplistStats.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2011 David Keitel
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/**
21 * \file
22 * \ingroup lalpulsar_bin_GCT
23 * \author David Keitel
24 *
25 * \brief Functions to recompute statistics for GCT/hough toplist entries
26 */
27/** @{ */
28
29#ifndef _RECALCTOPLISTSTATS_H /* Double-include protection. */
30#define _RECALCTOPLISTSTATS_H
31
32/* C++ protection. */
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37/*---------- exported INCLUDES ----------*/
38
39/* lal includes */
40#include <lal/ExtrapolatePulsarSpins.h>
41#include <lal/ComputeFstat.h>
42#include <lal/StringVector.h>
43#include <lal/LineRobustStats.h>
44
45/* additional includes */
46#include "GCTtoplist.h"
47#include "../HoughFstat/HoughFstatToplist.h"
48
49/*---------- exported DEFINES ----------*/
50
51/*---------- exported types ----------*/
52
53/** Type containing multi- and single-detector \f$ \mathcal{F} \f$ -statistics and line-robust statistic */
54typedef struct tagRecalcStatsComponents {
55 REAL4 avTwoF; /**< multi-detector \f$ \mathcal{F} \f$ -statistic, averaged over segments */
56 REAL4 avTwoFX[PULSAR_MAX_DETECTORS]; /**< fixed-size array of single-detector \f$ \mathcal{F} \f$ -statistics, averaged over segments */
57 UINT4 numDetectors; /**< number of detectors, numDetectors=0 should make all code ignore the TwoFX field. */
58 REAL4 log10BSGL; /**< line-robust statistic \f$ \log_{10}B_{\mathrm{SGL}} \f$ */
60 INT4 loudestSeg; /**< index of the segment with the highest multi-detector \f$ \mathcal{F} \f$ -statistic */
61 REAL4 twoFloudestSeg; /**< loudest single-segment, multi-detector \f$ \mathcal{F} \f$ -stat */
62 REAL4 twoFXloudestSeg[PULSAR_MAX_DETECTORS]; /**< single-IFO \f$ \mathcal{F}^X \f$ -stat values from the loudest segment in multi- \f$ \mathcal{F} \f$ */
64
65/** Type containing input arguments for XLALComputeExtraStatsForToplist() */
66typedef struct tagRecalcStatsParams {
67 const char *listEntryTypeName; /**< type of toplist entries, give as name string */
68 FstatInputVector *Fstat_in_vec; /**< vector of input data for XLALComputeFstat() */
69 LALStringVector *detectorIDs; /**< detector name vector with all detectors present in any data sements */
70 LIGOTimeGPSVector *startTstack; /**< starting GPS time of each stack */
71 LIGOTimeGPS refTimeGPS; /**< reference time for fkdot values in toplist */
72 BSGLSetup *BSGLsetup; /**< pre-computed setup for line-robust statistic BSGL */
73 BOOLEAN computeBSGLtL; /**< re-compute BSGLtL as well, or not */
74 BOOLEAN loudestSegOutput; /**< return extra info about loudest segment */
76
77/*---------- exported Global variables ----------*/
78/* empty init-structs for the types defined in here */
79
80/*---------- exported prototypes [API] ----------*/
81int
83 const RecalcStatsParams *recalcParams
84 );
85
86int
88 const PulsarDopplerParams *dopplerParams,
89 const RecalcStatsParams *recalcParams
90 );
91
92/** @} */
93
94#ifdef __cplusplus
95}
96#endif
97/* C++ protection. */
98
99#endif /* Double-include protection. */
int XLALComputeExtraStatsSemiCoherent(RecalcStatsComponents *stats, const PulsarDopplerParams *dopplerParams, const RecalcStatsParams *recalcParams)
XLAL Function to recalculate multi-IFO F-stat 2F and single-IFO 2FX for all semicoherent search segme...
int XLALComputeExtraStatsForToplist(toplist_t *list, const RecalcStatsParams *recalcParams)
XLAL function to go through a (Hough or GCT) toplist and compute line-robust statistics for each cand...
unsigned char BOOLEAN
uint32_t UINT4
int32_t INT4
float REAL4
#define PULSAR_MAX_DETECTORS
maximal number of detectors we can handle (for static arrays of detector quantities)
A vector of XLALComputeFstat() input data structures, for e.g.
Definition: ComputeFstat.h:82
A vector of 'timestamps' of type LIGOTimeGPS.
Definition: SFTfileIO.h:188
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
Type containing multi- and single-detector -statistics and line-robust statistic.
UINT4 numDetectors
number of detectors, numDetectors=0 should make all code ignore the TwoFX field.
REAL4 avTwoF
multi-detector -statistic, averaged over segments
INT4 loudestSeg
index of the segment with the highest multi-detector -statistic
REAL4 twoFloudestSeg
loudest single-segment, multi-detector -stat
REAL4 log10BSGL
line-robust statistic
Type containing input arguments for XLALComputeExtraStatsForToplist()
LALStringVector * detectorIDs
detector name vector with all detectors present in any data sements
BOOLEAN computeBSGLtL
re-compute BSGLtL as well, or not
const char * listEntryTypeName
type of toplist entries, give as name string
BSGLSetup * BSGLsetup
pre-computed setup for line-robust statistic BSGL
LIGOTimeGPSVector * startTstack
starting GPS time of each stack
FstatInputVector * Fstat_in_vec
vector of input data for XLALComputeFstat()
BOOLEAN loudestSegOutput
return extra info about loudest segment
LIGOTimeGPS refTimeGPS
reference time for fkdot values in toplist