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
ComputeResults.h
Go to the documentation of this file.
1//
2// Copyright (C) 2016, 2017 Karl Wette
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 _COMPUTE_RESULTS_H
21#define _COMPUTE_RESULTS_H
22
23///
24/// \file
25/// \ingroup lalpulsar_bin_Weave
26/// \brief Module which computes coherent and semicoherent results
27///
28
29#include "Weave.h"
30#include "Statistics.h"
31#include "SearchTiming.h"
32
33#include <lal/VectorMath.h>
34#include <lal/ComputeFstat.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40///
41/// Final results of a semicoherent computation over many segments
42///
44 /// Bitflag representing search simulation level
46 /// Struct holding all parameters for which statistics to output and compute, when, and how
47 const WeaveStatisticsParams *statistics_params;
48 /// Number of detectors
50 /// Number of segments
52 /// Frequency spacing for semicoherent results
53 double dfreq;
54 /// Number of frequencies
56 /// Per-segment coherent template index (optional)
58 /// Per-segment coherent template parameters of the first frequency bin (optional)
60 /// Per-segment multi-detector F-statistics per frequency (optional)
61 const REAL4 **coh2F;
62 /// Per-segment multi-detector F-statistics per frequency (optional), stored in CUDA device memory
64 /// Per-segment per-detector F-statistics per frequency (optional)
66 /// Number of coherent results processed thus far
68 /// Semicoherent template index
70 /// Semicoherent template parameters of the first frequency bin
72 /// Maximized-over-segments multi-detector F-statistics per frequency
74 /// Maximized-over-segments per-detector F-statistics per frequency
76 /// Summed multi-detector F-statistics per frequency
78 /// Summed per-detector F-statistics per frequency
80 /// Mean multi-detector F-statistics per frequency
82 /// Line-robust log10(B_S/GL) statistic
84 /// Transient Line-robust log10(B_S/GLtL) statistic
86 /// Transient Signal Line-robust log10(B_tS/GLtL) statistic
88};
89
90WeaveCohInput *XLALWeaveCohInputCreate(
91 const LALStringVector *setup_detectors,
92 const WeaveSimulationLevel simulation_level,
93 const SFTCatalog *sft_catalog,
94 const UINT4 segment_index,
95 const LALSeg *segment,
96 const PulsarDopplerParams *min_phys,
97 const PulsarDopplerParams *max_phys,
98 const double dfreq,
100 const LALStringVector *sft_noise_sqrtSX,
101 const LALStringVector *Fstat_assume_sqrtSX,
102 FstatOptionalArgs *Fstat_opt_args,
103 WeaveStatisticsParams *statistics_params,
104 BOOLEAN recalc_stage
105);
107 WeaveCohInput *coh_input
108);
110 FITSFile *file,
111 const size_t ncoh_input,
112 WeaveCohInput *const *coh_input
113);
115 FITSFile *file,
116 const size_t ncoh_input,
117 WeaveCohInput *const *coh_input
118);
120 WeaveCohResults **coh_res,
121 WeaveCohInput *coh_input,
122 const PulsarDopplerParams *coh_phys,
123 const UINT4 coh_nfreqs,
124 WeaveSearchTiming *tim
125);
127 WeaveCohResults *coh_res
128);
130 WeaveSemiResults **semi_res,
131 const WeaveSimulationLevel simulation_level,
132 const UINT4 ndetectors,
133 const UINT4 nsegments,
134 const UINT8 semi_index,
135 const PulsarDopplerParams *semi_phys,
136 const double dfreq,
137 const UINT4 semi_nfreqs,
138 const WeaveStatisticsParams *statistics_params
139);
141 WeaveSemiResults *semi_res,
142 const UINT4 nsegments,
143 const WeaveCohResults **coh_res,
144 const UINT8 *coh_index,
145 const UINT4 *coh_offset,
146 WeaveSearchTiming *tim
147);
149 WeaveSemiResults *semi_res,
150 WeaveSearchTiming *tim
151);
153 WeaveSemiResults *semi_res
154);
155
157 REAL4Vector **coh2F,
159 BOOLEAN *have_coh2F_det,
160 WeaveCohResults *coh_res,
161 const WeaveCohInput *coh_input
162);
164 REAL4 *coh2F,
165 const WeaveSemiResults *semi_res,
166 const UINT4 freq_idx
167);
168
169#ifdef __cplusplus
170}
171#endif
172
173#endif // _COMPUTE_RESULTS_H
174
175// Local Variables:
176// c-file-style: "linux"
177// c-basic-offset: 2
178// End:
void XLALWeaveCohResultsDestroy(WeaveCohResults *coh_res)
Destroy coherent results.
int XLALWeaveSemiResultsComputeMain(WeaveSemiResults *semi_res, WeaveSearchTiming *tim)
Compute all remaining toplist-ranking semicoherent statistics (ie 'mainloop-statistics').
void XLALWeaveCohInputDestroy(WeaveCohInput *coh_input)
Destroy coherent input data.
int XLALWeaveCohInputWriteInfo(FITSFile *file, const size_t ncoh_input, WeaveCohInput *const *coh_input)
Write various information from coherent input data to a FITS file.
int XLALWeaveCohInputWriteSegInfo(FITSFile *file, const size_t ncoh_input, WeaveCohInput *const *coh_input)
Write various segment information from coherent input data to a FITS file.
int XLALWeaveSemiResultsInit(WeaveSemiResults **semi_res, const WeaveSimulationLevel simulation_level, const UINT4 ndetectors, const UINT4 nsegments, const UINT8 semi_index, const PulsarDopplerParams *semi_phys, const double dfreq, const UINT4 semi_nfreqs, const WeaveStatisticsParams *statistics_params)
Create and initialise semicoherent results.
void XLALWeaveSemiResultsDestroy(WeaveSemiResults *semi_res)
Destroy final semicoherent results.
int XLALWeaveCohResultsExtract(REAL4Vector **coh2F, REAL4Vector *coh2F_det[PULSAR_MAX_DETECTORS], BOOLEAN *have_coh2F_det, WeaveCohResults *coh_res, const WeaveCohInput *coh_input)
Simple API function to extract pointers to 2F results from WeaveCohResults.
int XLALWeaveCohResultsCompute(WeaveCohResults **coh_res, WeaveCohInput *coh_input, const PulsarDopplerParams *coh_phys, const UINT4 coh_nfreqs, WeaveSearchTiming *tim)
Create and compute coherent results.
WeaveCohInput * XLALWeaveCohInputCreate(const LALStringVector *setup_detectors, const WeaveSimulationLevel simulation_level, const SFTCatalog *sft_catalog, const UINT4 segment_index, const LALSeg *segment, const PulsarDopplerParams *min_phys, const PulsarDopplerParams *max_phys, const double dfreq, const EphemerisData *ephemerides, const LALStringVector *sft_noise_sqrtSX, const LALStringVector *Fstat_assume_sqrtSX, FstatOptionalArgs *Fstat_opt_args, WeaveStatisticsParams *statistics_params, BOOLEAN recalc_stage)
Create coherent input data.
int XLALWeaveSemiCoh2FExtract(REAL4 *coh2F, const WeaveSemiResults *semi_res, const UINT4 freq_idx)
Extract 2F results from WeaveSemiResults; handles results stores in CUDA device memory.
int XLALWeaveSemiResultsComputeSegs(WeaveSemiResults *semi_res, const UINT4 nsegments, const WeaveCohResults **coh_res, const UINT8 *coh_index, const UINT4 *coh_offset, WeaveSearchTiming *tim)
Add a new set of coherent results to the semicoherent results.
Module which collects search timings and builds a timing model.
enum tagWeaveSimulationLevel WeaveSimulationLevel
Definition: Weave.h:60
struct tagFITSFile FITSFile
Representation of a FITS file.
Definition: FITSFileIO.h:54
unsigned char BOOLEAN
uint64_t UINT8
uint32_t UINT4
float REAL4
#define PULSAR_MAX_DETECTORS
maximal number of detectors we can handle (for static arrays of detector quantities)
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
Struct of optional 'advanced level' and (potentially method-specific) arguments to be passed to the ...
Definition: ComputeFstat.h:137
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
Definition: SFTfileIO.h:238
Final results of a semicoherent computation over many segments.
const REAL4 ** coh2F
Per-segment multi-detector F-statistics per frequency (optional)
UINT8 semi_index
Semicoherent template index.
const REAL4 ** coh2F_CUDA
Per-segment multi-detector F-statistics per frequency (optional), stored in CUDA device memory.
REAL4VectorAligned * log10BSGLtL
Transient Line-robust log10(B_S/GLtL) statistic.
PulsarDopplerParams semi_phys
Semicoherent template parameters of the first frequency bin.
REAL4VectorAligned * sum2F_det[PULSAR_MAX_DETECTORS]
Summed per-detector F-statistics per frequency.
PulsarDopplerParams * coh_phys
Per-segment coherent template parameters of the first frequency bin (optional)
UINT4 ndetectors
Number of detectors.
REAL4VectorAligned * max2F
Maximized-over-segments multi-detector F-statistics per frequency.
REAL4VectorAligned * mean2F
Mean multi-detector F-statistics per frequency.
UINT4 nfreqs
Number of frequencies.
UINT4 nsegments
Number of segments.
const WeaveStatisticsParams * statistics_params
Struct holding all parameters for which statistics to output and compute, when, and how.
REAL4VectorAligned * max2F_det[PULSAR_MAX_DETECTORS]
Maximized-over-segments per-detector F-statistics per frequency.
WeaveSimulationLevel simulation_level
Bitflag representing search simulation level.
REAL4VectorAligned * sum2F
Summed multi-detector F-statistics per frequency.
UINT4 ncoh_res
Number of coherent results processed thus far.
const REAL4 ** coh2F_det[PULSAR_MAX_DETECTORS]
Per-segment per-detector F-statistics per frequency (optional)
UINT8 * coh_index
Per-segment coherent template index (optional)
double dfreq
Frequency spacing for semicoherent results.
REAL4VectorAligned * log10BSGL
Line-robust log10(B_S/GL) statistic.
REAL4VectorAligned * log10BtSGLtL
Transient Signal Line-robust log10(B_tS/GLtL) statistic.