24#ifndef _HIERARCHSEARCHGCTH
25#define _HIERARCHSEARCHGCTH
39#include <lal/UserInput.h>
40#include <lal/LALStdlib.h>
41#include <lal/PulsarDataTypes.h>
42#include <lal/SFTfileIO.h>
43#include <lal/AVFactories.h>
44#include <lal/RngMedBias.h>
45#include <lal/LALComputeAM.h>
46#include <lal/ComputeSky.h>
47#include <lal/LALInitBarycenter.h>
48#include <lal/Velocity.h>
49#include <lal/ExtrapolatePulsarSpins.h>
51#include <lal/LALHough.h>
52#include <lal/NormalizeSFTRngMed.h>
53#include <lal/ComputeFstat.h>
54#include <lal/Statistics.h>
55#include <lal/GeneratePulsarSignal.h>
56#include <lal/LogPrintf.h>
57#include <lal/DopplerScan.h>
58#include <lal/UniversalDopplerMetric.h>
59#include <lal/LALPulsarVCSInfo.h>
78#define HIERARCHICALSEARCH_ENORM 0
79#define HIERARCHICALSEARCH_ESUB 1
80#define HIERARCHICALSEARCH_EARG 2
81#define HIERARCHICALSEARCH_EBAD 3
82#define HIERARCHICALSEARCH_EFILE 4
83#define HIERARCHICALSEARCH_ENULL 5
84#define HIERARCHICALSEARCH_EVAL 6
85#define HIERARCHICALSEARCH_ENONULL 7
86#define HIERARCHICALSEARCH_EDLOPEN 8
87#define HIERARCHICALSEARCH_EWORKER 9
88#define HIERARCHICALSEARCH_ECHECKPT 10
89#define HIERARCHICALSEARCH_EMEM 11
90#define HIERARCHICALSEARCH_ESFT 12
91#define HIERARCHICALSEARCH_ECG 13
92#define HIERARCHICALSEARCH_EXLAL 14
94#define HIERARCHICALSEARCH_MSGENORM "Normal exit"
95#define HIERARCHICALSEARCH_MSGESUB "Subroutine failed"
96#define HIERARCHICALSEARCH_MSGEARG "Error parsing arguments"
97#define HIERARCHICALSEARCH_MSGEBAD "Bad argument values"
98#define HIERARCHICALSEARCH_MSGEFILE "Could not create output file"
99#define HIERARCHICALSEARCH_MSGENULL "Null pointer"
100#define HIERARCHICALSEARCH_MSGEVAL "Invalid value"
101#define HIERARCHICALSEARCH_MSGENONULL "Pointer not null"
102#define HIERARCHICALSEARCH_MSGECHECKPT "Could not resume from checkpoint"
103#define HIERARCHICALSEARCH_MSGEMEM "Out of memory"
104#define HIERARCHICALSEARCH_MSGESFT "SFT validity check failed"
105#define HIERARCHICALSEARCH_MSGEXLAL "XLAL function call failed"
125typedef struct tagSFTCatalogSequence {
132typedef struct tagSemiCoherentParams {
149#define FINEGRID_NC_T UCHAR
151#define FINEGRID_NC_T UINT4
153typedef struct tagFineGrid {
175#define FG_INDEX(fg, iFreq) \
183#define FG_FX_INDEX(fg, iDet, iFreq) \
184 ( ( (iDet) * (fg).freqlengthAL ) + (iFreq) )
189typedef struct tagCoarseGrid {
202#define CG_INDEX(cg, iStack, iFreq) \
203 ( ( (iStack) * (cg).freqlength ) + (iFreq) )
208#define CG_FX_INDEX(cg, iDet, iStack, iFreq) \
209 ( ( (iDet) * (cg).length ) + ( (iStack) * (cg).freqlength ) + (iFreq) )
223 const CHAR *fnameChkPoint );
void GetChkPointIndex(LALStatus *status, INT4 *loopindex, const CHAR *fnameChkPoint)
Read checkpointing file This does not (yet) check any consistency of the existing results file.
#define FINEGRID_NC_T
structure for storing fine-grid points
void SetUpStacks(LALStatus *status, SFTCatalogSequence *out, REAL8 tStack, SFTCatalog *in, UINT4 nStacks)
Breaks up input sft catalog into specified number of stacks Loops over elements of the catalog,...
structure for storing coarse-grid points
UINT4 length
length of multi-IFO array 'sumTwoF', 'Uindex' (currently 'length'= 'nStacks * freqlength')
UINT4 * Uindex
U index, 2D array over stacks and frequencies (of length 'length')
UINT4 numDetectors
number of detectors
UINT4 nStacks
number of stacks
UINT4 freqlength
number of coarse-grid points in frequency
REAL4 * TwoFX
per-IFO 2F-values, 3D array over {frequencies, stacks, detectors} (of length = 'numDetector * length'
REAL4 * TwoF
2F-value, 2D array over stacks and frequencies (of length 'length')
REAL4 * sumTwoFX
sum of per-IFO 2F-values, 2D array over frequencies and detectors (of length 'freqlengthAL*numDetecto...
REAL8 alpha
right ascension
FINEGRID_NC_T * nc
number count (1D array over frequencies, of length 'length')
UINT4 * maxTwoFXlIdx
segment index (zero based) of corresponding entry in maxTwoFXl
REAL8 dfreq_fg
fine-grid spacing in frequency
UINT4 numDetectors
number of detectors for sumTwoFX array
REAL8 freqmin_fg
fine-grid start in frequency
UINT4 freqlength
number of fine-grid points in frequency
REAL4 * maxTwoFXl
maximum of per-IFO 2F over segments, 2D array over frequencies and detectors (of length 'freqlengthAL...
UINT4 length
length of multi-IFO stats vectors 'sumTwoF', 'nc' (currently 'length'= 'freqlength')
UINT4 freqlengthAL
"aligned" number of fine-grid points in frequency: in blocks of 16 bytes, consistent with ALAlloc() [...
LIGOTimeGPS refTime
reference time for candidates
REAL4 * maxTwoFl
maximum of multi-IFO 2F over segments, 1D array over fine-grid frequencies (of length 'length')
UINT4 * maxTwoFlIdx
segment index (zero based) of corresponding entry in maxTwoFl
REAL4 * sumTwoF
sum of 2F-values, 1D array over fine-grid frequencies (of length 'length')
A vector of 'timestamps' of type LIGOTimeGPS.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
sequence of SFT catalogs – for each segment
SFTCatalog * data
the catalogs
UINT4 length
the number of stacks
type describing one coherent segment of data: ( start-time + duration )
UINT4 duration
duration of segment in seconds
UINT4 startTime
gps start-time of segment, in seconds
a standard vector of data-segments
UINT4 length
number of segments
Segment_t * data
array of segments
parameters for the semicoherent stage
REAL8VectorSequence * acc
Earth orbital acceleration for each segment (new)
REAL8VectorSequence * pos
Earth orbital position for each segment.
LIGOTimeGPSVector * tsMid
timestamps of mid points of segments
CHAR * outBaseName
file for writing output – if chosen
LIGOTimeGPS refTime
reference time for f, fdot definition
REAL8VectorSequence * vel
Earth orbital velocity for each segment.
REAL8 threshold
Threshold for candidate selection.
UINT4 extraBinsFstat
Extra bins required for Fstat calculation.