20#ifndef _COMPUTE_RESULTS_H
21#define _COMPUTE_RESULTS_H
33#include <lal/VectorMath.h>
34#include <lal/ComputeFstat.h>
94 const UINT4 segment_index,
103 WeaveStatisticsParams *statistics_params,
107 WeaveCohInput *coh_input
111 const size_t ncoh_input,
112 WeaveCohInput *
const *coh_input
116 const size_t ncoh_input,
117 WeaveCohInput *
const *coh_input
120 WeaveCohResults **coh_res,
121 WeaveCohInput *coh_input,
123 const UINT4 coh_nfreqs,
124 WeaveSearchTiming *tim
127 WeaveCohResults *coh_res
130 WeaveSemiResults **semi_res,
132 const UINT4 ndetectors,
133 const UINT4 nsegments,
134 const UINT8 semi_index,
137 const UINT4 semi_nfreqs,
138 const WeaveStatisticsParams *statistics_params
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
149 WeaveSemiResults *semi_res,
150 WeaveSearchTiming *tim
153 WeaveSemiResults *semi_res
160 WeaveCohResults *coh_res,
161 const WeaveCohInput *coh_input
165 const WeaveSemiResults *semi_res,
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
struct tagFITSFile FITSFile
Representation of a FITS file.
#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 ...
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
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.