22 #include <sys/times.h>
24 #include <lal/NormalizeSFTRngMed.h>
25 #include <lal/SFTfileIO.h>
39 #define FRACERR(x,y) (fabs((x)-(y))/(0.5*((x)+(y))))
55 UINT4 rngmedBins = 11;
59 UINT4 numIFOsCorrect = 2;
61 multiWeightsCorrect->
length = numIFOsCorrect;
62 multiWeightsCorrect->
Sinv_Tsft = 1.980867126449e+52;
65 multiWeightsCorrect->
data[0]->
data[0] = 6.425160659487e-05;
66 multiWeightsCorrect->
data[0]->
data[1] = 7.259453662367e-06;
67 multiWeightsCorrect->
data[0]->
data[2] = 9.838893684664e-04;
68 multiWeightsCorrect->
data[0]->
data[3] = 5.043766789923e-05;
70 multiWeightsCorrect->
data[1]->
data[0] = 1.582309910283e-04;
71 multiWeightsCorrect->
data[1]->
data[1] = 5.345673753744e-04;
72 multiWeightsCorrect->
data[1]->
data[2] = 6.998201363537e+00;
122 for (
UINT4 X = 0; X < numIFOs; X++ ) {
131 XLAL_CHECK(
FRACERR( weights1->
data[
alpha], weights2->
data[
alpha] ) <= tolerance,
XLAL_EFAILED,
"%s: weights for IFO %d, SFT %d differ by more than tolerance %g multiWeights1 = %g, multiWeights2 = %g\n",
__func__, X,
alpha, tolerance, weights1->
data[
alpha], weights2->
data[
alpha] );
#define __func__
log an I/O error, i.e.
void LALCheckMemoryLeaks(void)
int XLALCompareMultiNoiseWeights(MultiNoiseWeights *multiWeights1, MultiNoiseWeights *multiWeights2, REAL8 tolerance)
Comparison function for two multiNoiseWeights vectors, return success or failure for given tolerance.
#define XLAL_INIT_DECL(var,...)
void * XLALCalloc(size_t m, size_t n)
MultiPSDVector * XLALNormalizeMultiSFTVect(MultiSFTVector *multsft, UINT4 blockSize, const MultiNoiseFloor *assumeSqrtSX)
Function for normalizing a multi vector of SFTs in a multi IFO search and returns the running-median ...
MultiNoiseWeights * XLALCopyMultiNoiseWeights(const MultiNoiseWeights *multiWeights)
Create a full copy of a MultiNoiseWeights object.
void XLALDestroyMultiPSDVector(MultiPSDVector *multvect)
Destroy a multi PSD-vector.
MultiNoiseWeights * XLALComputeMultiNoiseWeights(const MultiPSDVector *rngmed, UINT4 blocksRngMed, UINT4 excludePercentile)
Computes weight factors arising from MultiSFTs with different noise floors.
void XLALDestroyMultiNoiseWeights(MultiNoiseWeights *weights)
Destroy a MultiNoiseWeights object.
void XLALDestroySFTCatalog(SFTCatalog *catalog)
Free an 'SFT-catalogue'.
MultiSFTVector * XLALLoadMultiSFTs(const SFTCatalog *inputCatalog, REAL8 fMin, REAL8 fMax)
Function to load a catalog of SFTs from possibly different detectors.
void XLALDestroyMultiSFTVector(MultiSFTVector *multvect)
Destroy a multi SFT-vector.
SFTCatalog * XLALSFTdataFind(const CHAR *file_pattern, const SFTConstraints *constraints)
Find the list of SFTs matching the file_pattern and satisfying the given constraints,...
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_CHECK(assertion,...)
One noise-weight (number) per SFT (therefore indexed over IFOs and SFTs.
REAL8 Sinv_Tsft
normalization factor used: (using single-sided PSD!)
UINT4 length
number of detectors
REAL8Vector ** data
weights-vector for each detector
A collection of PSD vectors – one for each IFO in a multi-IFO search.
A collection of SFT vectors – one for each IFO in a multi-IFO search.
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
'Constraints' for SFT-matching: which detector, within which time-stretch and which timestamps exactl...