54 UINT4 listEntryType = 0;
61 XLAL_CHECK( listEntryType != 0,
XLAL_EBADLEN,
"Unsupported entry type for input toplist! Supported types currently are: GCTtop, HoughFstat." );
68 candidateDopplerParams.refTime = recalcParams->
refTimeGPS;
75 for (
j = 0;
j < numElements;
j++ ) {
78 if ( listEntryType == 1 ) {
83 candidateDopplerParams.Alpha =
elem->Alpha;
84 candidateDopplerParams.Delta =
elem->Delta;
85 candidateDopplerParams.fkdot[0] =
elem->Freq;
86 candidateDopplerParams.fkdot[1] =
elem->F1dot;
87 candidateDopplerParams.fkdot[2] =
elem->F2dot;
88 }
else if ( listEntryType == 2 ) {
95 candidateDopplerParams.Alpha =
elem->AlphaBest;
96 candidateDopplerParams.Delta =
elem->DeltaBest;
97 candidateDopplerParams.fkdot[0] =
elem->Freq;
98 candidateDopplerParams.fkdot[1] =
elem->f1dot;
109 if ( listEntryType == 1 ) {
112 elem->avTwoFrecalc = recalcStats.avTwoF;
114 elem->avTwoFXrecalc[X] = recalcStats.avTwoFX[X];
116 elem->log10BSGLrecalc = recalcStats.log10BSGL;
117 elem->log10BSGLtLrecalc = recalcStats.log10BSGLtL;
119 elem->loudestSeg = recalcStats.loudestSeg;
120 elem->twoFloudestSeg = recalcStats.twoFloudestSeg;
122 elem->twoFXloudestSeg[X] = recalcStats.twoFXloudestSeg[X];
126 else if ( listEntryType == 2 ) {
129 elem->sumTwoF = recalcStats.avTwoF;
131 elem->sumTwoFX->data[X] = recalcStats.avTwoFX[X];
169 dopplerParams_temp.Alpha = dopplerParams->
Alpha;
170 dopplerParams_temp.Delta = dopplerParams->
Delta;
186 for (
UINT4 k = 0;
k < numSegments;
k++ ) {
198 sumTwoF += Fstat_res->
twoF[0];
203 update_loudest =
TRUE;
207 updated_twoFXloudestSeg[Y] =
FALSE;
215 for (
UINT4 X = 0; X < numDetectorsSeg; X++ ) {
227 numSegmentsX[detid] += 1;
229 sumTwoFX[detid] += Fstat_res->
twoFPerDet[X][0];
231 if ( update_loudest ) {
233 updated_twoFXloudestSeg[detid] =
TRUE;
236 maxTwoFXl[detid] = fmaxf( maxTwoFXl[detid], Fstat_res->
twoFPerDet[X][0] );
241 if ( update_loudest ) {
243 if ( !updated_twoFXloudestSeg[Y] ) {
262 recalcStats->
avTwoF = sumTwoF / numSegments;
264 recalcStats->
avTwoFX[X] = sumTwoFX[X] / numSegmentsX[X];
void * toplist_elem(toplist_t *list, size_t ind)
int XLALComputeExtraStatsSemiCoherent(RecalcStatsComponents *recalcStats, 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...
Functions to recompute statistics for GCT/hough toplist entries.
int XLALComputeFstat(FstatResults **Fstats, FstatInput *input, const PulsarDopplerParams *doppler, const UINT4 numFreqBins, const FstatQuantities whatToCompute)
Compute the -statistic over a band of frequencies.
void XLALDestroyFstatResults(FstatResults *Fstats)
Free all memory associated with a FstatResults structure.
@ FSTATQ_2F
Compute multi-detector .
@ FSTATQ_2F_PER_DET
Compute for each detector.
#define XLAL_INIT_DECL(var,...)
REAL4 XLALComputeBSGLtL(const REAL4 twoF, const REAL4 twoFX[PULSAR_MAX_DETECTORS], const REAL4 maxtwoFlX[PULSAR_MAX_DETECTORS], const BSGLSetup *setup)
Single-bin wrapper of XLALVectorComputeBSGLtL(), provided for backwards compatibility.
REAL4 XLALComputeBSGL(const REAL4 twoF, const REAL4 twoFX[PULSAR_MAX_DETECTORS], const BSGLSetup *setup)
Single-bin wrapper of XLALVectorComputeBSGL(), provided for backwards compatibility.
#define PULSAR_MAX_DETECTORS
maximal number of detectors we can handle (for static arrays of detector quantities)
REAL4Vector * XLALCreateREAL4Vector(UINT4 length)
#define XLAL_CHECK(assertion,...)
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
XLALComputeFstat() computed results structure.
UINT4 numDetectors
Number of detectors over which the were computed.
REAL4 * twoFPerDet[PULSAR_MAX_DETECTORS]
If whatWasComputed & FSTATQ_2F_PER_DET is true, the values computed at numFreqBins frequencies space...
REAL4 * twoF
If whatWasComputed & FSTATQ_2F is true, the multi-detector values computed at numFreqBins frequencie...
CHAR detectorNames[PULSAR_MAX_DETECTORS][3]
Names of detectors over which the were computed.
Type to hold the fields that will be kept in a "toplist"
LIGOTimeGPS * data
array of timestamps
Type containing the 'Doppler-parameters' affecting the time-evolution of the phase.
PulsarSpins fkdot
Intrinsic spins: [Freq, f1dot, f2dot, ... ] where fkdot = d^kFreq/dt^k.
REAL8 Delta
Sky position: DEC (latitude) in equatorial coords and radians.
LIGOTimeGPS refTime
Reference time of pulsar parameters (in SSB!)
REAL8 Alpha
Sky position: RA (longitude) in equatorial coords and radians.
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
REAL4 twoFXloudestSeg[PULSAR_MAX_DETECTORS]
single-IFO -stat values from the loudest segment in multi-
INT4 loudestSeg
index of the segment with the highest multi-detector -statistic
REAL4 avTwoFX[PULSAR_MAX_DETECTORS]
fixed-size array of single-detector -statistics, averaged over segments
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