20 #include <lal/LALHough.h>
25 #define UNUSED __attribute__ ((unused))
36 #define SQ(x) (x) * (x)
103 for (
k=0;
k<length; ++
k ){
111 for (
j=0;
j< nfSize; ++
j ){
115 &(phmdVS->
phmd[
j*length+
k ]),
184 fBin = fBinMin + nfSize;
186 for (
k=0;
k<length; ++
k ){
191 phmdVS->
phmd[ breakLine*length+
k ].
fBin = fBin;
193 &(phmdVS->
phmd[ breakLine*length+
k ]),
200 phmdVS->
breakLine = (breakLine +1) % nfSize;
269 phmdVS->
breakLine = (breakLine + nfSize- 1) % nfSize;
275 for (
k=0;
k<length; ++
k ){
280 phmdVS->
phmd[ breakLine*length+
k ].
fBin = fBin;
282 &(phmdVS->
phmd[ breakLine*length+
k ]),
368 if (hd. map == NULL) {
375 for (
k=0;
k<length; ++
k ){
377 fBin =freqInd->
data[
k] -fBinMin;
383 j = (fBin + breakLine) % nfSize;
444 timeDiffProd = timeDiff;
449 for (
i=0;
i<spinOrder; ++
i ){
450 shiftF += spinF[
i] * timeDiffProd;
451 timeDiffProd *= timeDiff;
453 shiftFBin = rint( shiftF/
deltaF) ;
456 *fBinMap = *f0Bin + shiftFBin;
541 if (hd. map == NULL) {
548 for (
k=0;
k<length; ++
k ){
550 fBin =freqInd->
data[
k] -fBinMin;
556 j = (fBin + breakLine) % nfSize;
617 for (
k=0;
k<length; ++
k ){
618 for (
j=0;
j< nfSize; ++
j ){
654 for (
j=0;
j<length;
j++) {
655 weightV->
data[
j] = 1.0;
692 for (
j=0;
j<length;
j++) {
693 sum += weightV->
data[
j];
697 for (
j=0;
j<length;
j++) {
698 weightV->
data[
j] *= length/sum;
760 baryinput.
dInv = 0.e0;
773 if (amParams == NULL) {
778 if (amParams->
das == NULL) {
789 amParams->
earth = &earth;
833 for(
j=0;
j<length;
j++){
836 weightV->
data[
j] *= 2.0*(
a*
a + b*b)/(
A+
B);
930 cos2psi = cos(2.0 *
params->polAngle);
931 sin2psi = sin(2.0 *
params->polAngle);
934 for(
i=0;
i<length; ++
i)
952 sumAB += (
a[
i]) * (b[
i]);
963 coe->
D = ( coe->
A * coe->
B -
SQ(coe->
C) );
965 if(coe->
D == 0) coe->
D=1.0e-9;
static double double delta
#define ABORT(statusptr, code, mesg)
#define TRY(func, statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
void LALComputeDetAMResponse(LALStatus *status, LALDetAMResponse *pResponse, const LALDetAndSource *pDetAndSrc, const LIGOTimeGPS *gps)
void LALHOUGHAddPHMD2HD_W(LALStatus *status, HOUGHMapDeriv *hd, HOUGHphmd *phmd)
Adds a hough map derivative into a total hough map derivative taking into account the weight of the p...
void LALHOUGHInitializeHD(LALStatus *status, HOUGHMapDeriv *hd)
This function initializes the Hough map derivative space HOUGHMapDeriv *hd to zero.
void LALHOUGHAddPHMD2HD(LALStatus *status, HOUGHMapDeriv *hd, HOUGHphmd *phmd)
Given an initial Hough map derivative HOUGHMapDeriv *hd and a representation of a phmd HOUGHphmd *phm...
void LALHOUGHIntegrHD2HT(LALStatus *status, HOUGHMapTotal *ht, HOUGHMapDeriv *hd)
This function constructs a total Hough map HOUGHMapTotal *ht from its derivative HOUGHMapDeriv *hd by...
#define XLAL_INIT_DECL(var,...)
static void LALComputeAM(LALStatus *, AMCoeffs *coe, LIGOTimeGPS *ts, AMCoeffsParams *params)
Original antenna-pattern function by S Berukoff.
void LALHOUGHConstructHMT_W(LALStatus *status, HOUGHMapTotal *ht, UINT8FrequencyIndexVector *freqInd, PHMDVectorSequence *phmdVS)
Calculates the total hough map for a given trajectory in the time-frequency plane and a set of partia...
#define LALHOUGHH_MSGESZMM
#define LALHOUGHH_MSGESIZE
#define LALHOUGHH_MSGEMEM
void LALHOUGHConstructSpacePHMD(LALStatus *status, PHMDVectorSequence *phmdVS, HOUGHPeakGramVector *pgV, HOUGHptfLUTVector *lutV)
constructs the space of phmd PHMDVectorSequence *phmdVS, given a HOUGHPeakGramVector *pgV and HOUGHpt...
void LALHOUGHupdateSpacePHMDdn(LALStatus *status, PHMDVectorSequence *phmdVS, HOUGHPeakGramVector *pgV, HOUGHptfLUTVector *lutV)
Function for shifting the cylindrical buffer of PHMDs down by one frequency bin – the highest frequen...
#define LALHOUGHH_MSGESAME
void LALHOUGHNormalizeWeights(LALStatus *status, REAL8Vector *weightV)
Normalizes weight factors so that their sum is N.
#define LALHOUGHH_MSGENULL
void LALHOUGHComputeFBinMap(LALStatus *status, UINT8 *fBinMap, UINT8 *f0Bin, HOUGHResidualSpinPar *rs)
This function computes the corresponding frequency bin of a phmd UINT8 *fBinMap for a given intrinsic...
void LALHOUGHComputeAMWeights(LALStatus *status, REAL8Vector *weightV, LIGOTimeGPSVector *timeV, LALDetector *detector, EphemerisData *edat, REAL8 alpha, REAL8 delta)
Computes weight factors arising from amplitude modulation – it multiplies an existing weight vector.
void LALHOUGHWeighSpacePHMD(LALStatus *status, PHMDVectorSequence *phmdVS, REAL8Vector *weightV)
Adds weight factors for set of partial hough map derivatives – the weights must be calculated outside...
void LALHOUGHInitializeWeights(LALStatus *status, REAL8Vector *weightV)
Initializes weight factors to unity.
#define LALHOUGHH_MSGEVAL
void LALHOUGHComputeMultiIFOAMWeights(LALStatus *status, REAL8Vector *weightV, SFTCatalog *catalog, EphemerisData *edat, REAL8 UNUSED alpha, REAL8 UNUSED delta)
Computes weight factors arising from amplitude modulation – it multiplies an existing weight vector.
void LALHOUGHupdateSpacePHMDup(LALStatus *status, PHMDVectorSequence *phmdVS, HOUGHPeakGramVector *pgV, HOUGHptfLUTVector *lutV)
This function updates the space of phmd increasing the frequency phmdVS->fBinMin by one.
void LALHOUGHConstructHMT(LALStatus *status, HOUGHMapTotal *ht, UINT8FrequencyIndexVector *freqInd, PHMDVectorSequence *phmdVS)
Given PHMDVectorSequence *phmdVS, the space of phmd, and UINT8FrequencyIndexVector *freqInd,...
REAL8 HoughDT
Hough Map derivative pixel type.
void LALHOUGHPeak2PHMD(LALStatus *status, HOUGHphmd *phmd, HOUGHptfLUT *lut, HOUGHPeakGram *pg)
Construction of Partial-Hough-Map-Derivatives (phmd) given a peak-gram and the look-up-table.
COORDINATESYSTEM_EQUATORIAL
This structure contains the per-SFT (weighted) antenna-pattern functions , with the SFT-index,...
REAL4 B
summed antenna-pattern matrix coefficient:
REAL4Vector * b
(weighted) per-SFT antenna-pattern function
REAL4 A
summed antenna-pattern matrix coefficient:
REAL4 C
summed antenna-pattern matrix coefficient:
REAL4Vector * a
(weighted) per-SFT antenna-pattern function
This structure contains the parameters for the routine.
LALDetAndSource * das
det and source information
REAL4 polAngle
polarization angle
EarthState * earth
from XLALBarycenter()
EphemerisData * edat
the ephemerides
BarycenterInput * baryinput
data from Barycentring routine
Basic output structure of LALBarycenterEarth.c.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
This structure stores the Hough map derivative.
UINT2 ySide
number of physical pixels in the y direction
UINT2 xSide
number of physical pixels in the x direction
HoughDT * map
the pixel count derivatives; the number of elements to allocate is ySide*(xSide+1)*
This structure stores the Hough map.
UINT2 ySide
number of physical pixels in the y direction
UINT2 xSide
number of physical pixels in the x direction
This structure contains a vector of peak-grams (for the different time stamps)
UINT4 length
number of elements
HOUGHPeakGram * pg
the Peakgrams
This structure stores the residual spin-down parameters at a given time.
REAL8 deltaF
Frequency resolution; df=1/TCOH.
REAL8Vector spinRes
length: Maximum order of spdwn parameter *data: pointer to residual Spin parameter set fk
REAL8 timeDiff
: time difference
UINT8 fBin
Frequency bin of this partial map derivative.
HoughDT weight
First column border, containing the edge effects when clipping on a finite patch.
REAL8 deltaF
Frequency resolution df=1/TCOH, where 1/TCOH is the coherent integration time used in teh demodulatio...
This structure contains a vector of partial look up tables (for the different time stamps)
HOUGHptfLUT * lut
the partial Look Up Tables
UINT4 length
number of elements
const LALDetector * pDetector
SkyPosition equatorialCoords
A vector of 'timestamps' of type LIGOTimeGPS.
LIGOTimeGPS * data
array of timestamps
UINT4 length
number of timestamps
This structure contains a vector sequence of partial-Hough maps derivatives (for different time stamp...
UINT8 fBinMin
frequency index of smallest intrinsic frequency in circular buffer
UINT4 breakLine
Mark [0, nfSize) (of the circular buffer) pointing to the starting of the fBinMin line.
UINT4 nfSize
number of different frequencies
REAL8 deltaF
frequency resolution
HOUGHphmd * phmd
the partial Hough map derivatives
UINT4 length
number of elements for each frequency
An "SFT-catalogue": a vector of SFTdescriptors, as returned by XLALSFTdataFind()
SFTDescriptor * data
array of data-entries describing matched SFTs
UINT4 length
number of SFTs in catalog
This structure stores the frequency indexes of the partial-Hough map derivatives at different time st...
UINT8 * data
the frequency indexes
REAL8 deltaF
frequency resolution
UINT4 length
number of elements