LALPulsar 7.1.1.1-eeff03c
LocalComputeFstatHoughMap.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2005-2008 Badri Krishnan, Alicia Sintes, Bernd Machenschalk
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 *
19 */
20
21/*
22 This is a local copy of ComputeFstatHoughMap() of HierarchicalSearch.c
23 See that file for Copyright details
24*/
25
26#include "HierarchicalSearch.h"
27
28#ifdef __GNUC__
29#define UNUSED __attribute__ ((unused))
30#else
31#define UNUSED
32#endif
33
34#define HSMAX(x,y) ( (x) > (y) ? (x) : (y) )
35#define HSMIN(x,y) ( (x) < (y) ? (x) : (y) )
36
37#ifdef OUTPUT_TIMING
38extern time_t clock0;
39extern UINT4 nSFTs;
40extern UINT4 nStacks;
41extern UINT4 nSkyRefine;
42#endif
43
44
45/* comparison function for the toplist */
46static int smallerHough(const void *a,const void *b) {
48 a1 = *((const SemiCohCandidate *)a);
49 b1 = *((const SemiCohCandidate *)b);
50
51 if( a1.significance < b1.significance )
52 return(1);
53 else if( a1.significance > b1.significance)
54 return(-1);
55 else
56 return(0);
57}
58
59
60/* we point nearly all LocalHOUGH functions back to LAL */
61
62#define LocalHOUGHComputeSizePar LALHOUGHComputeSizePar
63#define LocalHOUGHFillPatchGrid LALHOUGHFillPatchGrid
64#define LocalHOUGHCalcParamPLUT LALHOUGHCalcParamPLUT
65#define LocalHOUGHConstructPLUT LALHOUGHConstructPLUT
66#define LocalHOUGHConstructSpacePHMD LALHOUGHConstructSpacePHMD
67#define LocalHOUGHWeighSpacePHMD LALHOUGHWeighSpacePHMD
68#define LocalHOUGHInitializeHT LALHOUGHInitializeHT
69#define LocalHOUGHupdateSpacePHMDup LALHOUGHupdateSpacePHMDup
70#define LocalHOUGHWeighSpacePHMD LALHOUGHWeighSpacePHMD
71
72
73/* possibly optimized local copies of LALHOUGH functions */
74
75/* stupid MSC doesn't understand inline function (at least not in VS2003) */
76#ifdef _MSC_VER
77#define INLINE static
78#else
79#define INLINE inline
80#endif
81
82#ifdef __GNUC__
83#define ALWAYS_INLINE __attribute__ ((always_inline))
84#else
85#define ALWAYS_INLINE
86#endif
87
88static void
90 HOUGHMapTotal *ht , /**< The output hough map */
91 UINT8FrequencyIndexVector *freqInd, /**< time-frequency trajectory */
92 PHMDVectorSequence *phmdVS); /**< set of partial hough map derivatives */
93
94static void
95LocalHOUGHAddPHMD2HD_W (LALStatus *status, /**< the status pointer */
96 HOUGHMapDeriv *hd, /**< the Hough map derivative */
97 HOUGHphmd *phmd); /**< info from a partial map */
98
99/* this is the only function that's actually changed for optimization */
100INLINE void
102 HoughDT* map,
103 HOUGHBorder** pBorderP,
104 INT4 length,
105 HoughDT weight,
106 INT4 xSide,
107 INT4 ySide) ALWAYS_INLINE;
108
109
110/* this function is identical to LALComputeFstatHoughMap() in HierarchicalSearch.c,
111 except for calling the LocalHOUGH* functions instead of the LALHOUGH* ones
112*/
113void
115 SemiCohCandidateList *out, /* output candidates */
116 HOUGHPeakGramVector *pgV, /* peakgram vector */
118{
119 /* hough structures */
120 HOUGHMapTotal ht;
121 HOUGHptfLUTVector lutV; /* the Look Up Table vector*/
122 PHMDVectorSequence phmdVS; /* the partial Hough map derivatives */
123 UINT8FrequencyIndexVector freqInd; /* for trajectory in time-freq plane */
124 HOUGHResolutionPar parRes; /* patch grid information */
125 HOUGHPatchGrid patch; /* Patch description */
126 HOUGHParamPLUT parLut; /* parameters needed to build lut */
127 HOUGHDemodPar parDem; /* demodulation parameters */
128 HOUGHSizePar parSize;
129
130 UINT2 xSide, ySide, maxNBins, maxNBorders;
131 INT8 fBinIni, fBinFin, fBin;
132 INT4 nfdot;
133 UINT4 k, nStacks ;
134 REAL8 deltaF, dfdot, alpha, delta;
135 REAL8 patchSizeX, patchSizeY;
137 REAL8 fdot, refTime;
138 LIGOTimeGPS refTimeGPS;
139 LIGOTimeGPSVector *tsMid;
140 REAL8Vector *timeDiffV=NULL;
141
142 toplist_t *houghToplist;
143
146
147 /* check input is not null */
148 if ( out == NULL ) {
150 }
151 if ( out->length == 0 ) {
153 }
154 if ( out->list == NULL ) {
156 }
157 if ( pgV == NULL ) {
159 }
160 if ( pgV->length == 0 ) {
162 }
163 if ( pgV->pg == NULL ) {
165 }
166 if ( params == NULL ) {
168 }
169
170
171
172 /* copy some parameters from peakgram vector */
173 deltaF = pgV->pg->deltaF;
174 nStacks = pgV->length;
175 fBinIni = pgV->pg[0].fBinIni;
176 fBinFin = pgV->pg[0].fBinFin;
177
178 /* copy some params to local variables */
179 nfdot = params->nfdot;
180 dfdot = params->dfdot;
181 alpha = params->alpha;
182 delta = params->delta;
183 vel = params->vel;
184 pos = params->pos;
185 fdot = params->fdot;
186 tsMid = params->tsMid;
187 refTimeGPS = params->refTime;
188 refTime = XLALGPSGetREAL8(&refTimeGPS);
189
190 /* set patch size */
191 /* this is supposed to be the "educated guess"
192 delta theta = 1.0 / (Tcoh * f0 * Vepi )
193 where Tcoh is coherent time baseline,
194 f0 is frequency and Vepi is rotational velocity
195 of detector */
196 patchSizeX = params->patchSizeX;
197 patchSizeY = params->patchSizeY;
198
199 /* calculate time differences from start of observation time for each stack*/
200 TRY( LALDCreateVector( status->statusPtr, &timeDiffV, nStacks), status);
201
202 for (k=0; k<nStacks; k++) {
203 REAL8 tMidStack;
204 tMidStack = XLALGPSGetREAL8(tsMid->data + k);
205 timeDiffV->data[k] = tMidStack - refTime;
206 }
207
208
209
210 /*--------------- first memory allocation --------------*/
211 /* look up table vector */
212 lutV.length = nStacks;
213 lutV.lut = NULL;
214 lutV.lut = (HOUGHptfLUT *)LALCalloc(1,nStacks*sizeof(HOUGHptfLUT));
215 if ( lutV.lut == NULL ) {
217 }
218
219
220 /* partial hough map derivative vector */
221 phmdVS.length = nStacks;
222
223 {
224 REAL8 maxTimeDiff, startTimeDiff, endTimeDiff;
225
226 startTimeDiff = fabs(timeDiffV->data[0]);
227 endTimeDiff = fabs(timeDiffV->data[timeDiffV->length - 1]);
228 maxTimeDiff = HSMAX( startTimeDiff, endTimeDiff);
229
230 /* set number of freq. bins for which LUTs will be calculated */
231 /* this sets the range of residual spindowns values */
232 /* phmdVS.nfSize = 2*nfdotBy2 + 1; */
233 phmdVS.nfSize = 2 * floor((nfdot-1) * (REAL4)(dfdot * maxTimeDiff / deltaF) + 0.5f) + 1;
234 }
235
236 phmdVS.deltaF = deltaF;
237 phmdVS.phmd = NULL;
238 phmdVS.phmd=(HOUGHphmd *)LALCalloc( 1,phmdVS.length * phmdVS.nfSize *sizeof(HOUGHphmd));
239 if ( phmdVS.phmd == NULL ) {
241 }
242
243 /* residual spindown trajectory */
244 freqInd.deltaF = deltaF;
245 freqInd.length = nStacks;
246 freqInd.data = NULL;
247 freqInd.data = ( UINT8 *)LALCalloc(1,nStacks*sizeof(UINT8));
248 if ( freqInd.data == NULL ) {
250 }
251
252 /* resolution in space of residual spindowns */
253 ht.dFdot.length = 1;
254 ht.dFdot.data = NULL;
255 ht.dFdot.data = (REAL8 *)LALCalloc( 1, ht.dFdot.length * sizeof(REAL8));
256 if ( ht.dFdot.data == NULL ) {
258 }
259
260 /* the residual spindowns */
261 ht.spinRes.length = 1;
262 ht.spinRes.data = NULL;
263 ht.spinRes.data = (REAL8 *)LALCalloc( 1, ht.spinRes.length*sizeof(REAL8));
264 if ( ht.spinRes.data == NULL ) {
266 }
267
268 /* the residual spindowns */
269 ht.spinDem.length = 1;
270 ht.spinDem.data = NULL;
271 ht.spinDem.data = (REAL8 *)LALCalloc( 1, ht.spinRes.length*sizeof(REAL8));
272 if ( ht.spinDem.data == NULL ) {
274 }
275
276 /* the demodulation params */
277 parDem.deltaF = deltaF;
278 parDem.skyPatch.alpha = alpha;
279 parDem.skyPatch.delta = delta;
280 parDem.spin.length = 1;
281 parDem.spin.data = NULL;
282 parDem.spin.data = (REAL8 *)LALCalloc(1, sizeof(REAL8));
283 if ( parDem.spin.data == NULL ) {
285 }
286 parDem.spin.data[0] = fdot;
287
288 /* the skygrid resolution params */
289 parRes.deltaF = deltaF;
290 parRes.patchSkySizeX = patchSizeX;
291 parRes.patchSkySizeY = patchSizeY;
292 parRes.pixelFactor = params->pixelFactor;
293 parRes.pixErr = PIXERR;
294 parRes.linErr = LINERR;
295 parRes.vTotC = VTOT;
296
297 /* adjust fBinIni and fBinFin to take maxNBins into account */
298 /* and make sure that we have fstat values for sufficient number of bins */
299 parRes.f0Bin = fBinIni;
300
301 fBinIni += params->extraBinsFstat;
302 fBinFin -= params->extraBinsFstat;
303 /* this is not very clean -- the Fstat calculation has to know how many extra bins are needed */
304
305 LogPrintf(LOG_DETAIL, "Freq. range analyzed by Hough = [%fHz - %fHz] (%" LAL_INT8_FORMAT " bins)\n",
306 fBinIni*deltaF, fBinFin*deltaF, fBinFin - fBinIni + 1);
308
309 /* initialise number of candidates -- this means that any previous candidates
310 stored in the list will be lost for all practical purposes*/
311 out->nCandidates = 0;
312
313 /* create toplist of candidates */
314 if (params->useToplist) {
315 create_toplist(&houghToplist, out->length, sizeof(SemiCohCandidate), smallerHough);
316 }
317 else {
318 /* if no toplist then use number of hough maps */
319 INT4 numHmaps = (fBinFin - fBinIni + 1)*phmdVS.nfSize;
320 if (out->length != numHmaps) {
321 out->length = numHmaps;
322 out->list = (SemiCohCandidate *)LALRealloc( out->list, out->length * sizeof(SemiCohCandidate));
323 if ( out->list == NULL ) {
325 }
326 }
327 }
328
329 /*------------------ start main Hough calculation ---------------------*/
330
331 /* initialization */
332 fBin= fBinIni; /* initial search bin */
333
334 while( fBin <= fBinFin ){
335 INT8 fBinSearch, fBinSearchMax;
336 UINT4 i,j;
337
338 parRes.f0Bin = fBin;
339 TRY( LocalHOUGHComputeSizePar( status->statusPtr, &parSize, &parRes ), status );
340 xSide = parSize.xSide;
341 ySide = parSize.ySide;
342
343 maxNBins = parSize.maxNBins;
344 maxNBorders = parSize.maxNBorders;
345
346 /*------------------ create patch grid at fBin ----------------------*/
347 patch.xSide = xSide;
348 patch.ySide = ySide;
349 patch.xCoor = NULL;
350 patch.yCoor = NULL;
351 patch.xCoor = (REAL8 *)LALCalloc(1,xSide*sizeof(REAL8));
352 if ( patch.xCoor == NULL ) {
354 }
355
356 patch.yCoor = (REAL8 *)LALCalloc(1,ySide*sizeof(REAL8));
357 if ( patch.yCoor == NULL ) {
359 }
360 TRY( LocalHOUGHFillPatchGrid( status->statusPtr, &patch, &parSize ), status );
361
362 /*------------- other memory allocation and settings----------------- */
363 for(j=0; j<lutV.length; ++j){
364 lutV.lut[j].maxNBins = maxNBins;
365 lutV.lut[j].maxNBorders = maxNBorders;
366 lutV.lut[j].border = (HOUGHBorder *)LALCalloc(1,maxNBorders*sizeof(HOUGHBorder));
367 if ( lutV.lut[j].border == NULL ) {
369 }
370
371 lutV.lut[j].bin = (HOUGHBin2Border *)LALCalloc(1,maxNBins*sizeof(HOUGHBin2Border));
372 if ( lutV.lut[j].bin == NULL ) {
374 }
375
376 for (i=0; i<maxNBorders; ++i){
377 lutV.lut[j].border[i].ySide = ySide;
378 lutV.lut[j].border[i].xPixel = (COORType *)LALCalloc(1,ySide*sizeof(COORType));
379 if ( lutV.lut[j].border[i].xPixel == NULL ) {
381 }
382 }
383 }
384
385 for(j = 0; j < phmdVS.length * phmdVS.nfSize; ++j){
386 phmdVS.phmd[j].maxNBorders = maxNBorders;
387 phmdVS.phmd[j].leftBorderP = (HOUGHBorder **)LALCalloc(1,maxNBorders*sizeof(HOUGHBorder *));
388 if ( phmdVS.phmd[j].leftBorderP == NULL ) {
390 }
391
392 phmdVS.phmd[j].rightBorderP = (HOUGHBorder **)LALCalloc(1,maxNBorders*sizeof(HOUGHBorder *));
393 if ( phmdVS.phmd[j].rightBorderP == NULL ) {
395 }
396
397 phmdVS.phmd[j].ySide = ySide;
398 phmdVS.phmd[j].firstColumn = NULL;
399 phmdVS.phmd[j].firstColumn = (UCHAR *)LALCalloc(1,ySide*sizeof(UCHAR));
400 if ( phmdVS.phmd[j].firstColumn == NULL ) {
402 }
403 }
404
405 /*------------------- create all the LUTs at fBin ---------------------*/
406 for (j=0; j < (UINT4)nStacks; j++){ /* create all the LUTs */
407 parDem.veloC.x = vel->data[3*j];
408 parDem.veloC.y = vel->data[3*j + 1];
409 parDem.veloC.z = vel->data[3*j + 2];
410 parDem.positC.x = pos->data[3*j];
411 parDem.positC.y = pos->data[3*j + 1];
412 parDem.positC.z = pos->data[3*j + 2];
413 parDem.timeDiff = timeDiffV->data[j];
414
415 /* calculate parameters needed for buiding the LUT */
416 TRY( LocalHOUGHCalcParamPLUT( status->statusPtr, &parLut, &parSize, &parDem), status);
417
418 /* build the LUT */
419 TRY( LocalHOUGHConstructPLUT( status->statusPtr, &(lutV.lut[j]), &patch, &parLut ), status);
420
421 }
422
423
424
425 /*--------- build the set of PHMD centered around fBin -------------*/
426 phmdVS.fBinMin = fBin - phmdVS.nfSize/2;
427 TRY( LocalHOUGHConstructSpacePHMD(status->statusPtr, &phmdVS, pgV, &lutV), status );
428 TRY( LocalHOUGHWeighSpacePHMD(status->statusPtr, &phmdVS, params->weightsV), status);
429
430 /*-------------- initializing the Total Hough map space ------------*/
431 ht.xSide = xSide;
432 ht.ySide = ySide;
433 ht.skyPatch.alpha = alpha;
434 ht.skyPatch.delta = delta;
435 ht.mObsCoh = nStacks;
436 ht.deltaF = deltaF;
437 ht.spinDem.data[0] = fdot;
438 ht.patchSizeX = patchSizeX;
439 ht.patchSizeY = patchSizeY;
440 ht.dFdot.data[0] = dfdot;
441 ht.map = NULL;
442 ht.map = (HoughTT *)LALCalloc(1,xSide*ySide*sizeof(HoughTT));
443 if ( ht.map == NULL ) {
445 }
446
447 TRY( LocalHOUGHInitializeHT( status->statusPtr, &ht, &patch), status); /*not needed */
448
449 /* Search frequency interval possible using the same LUTs */
450 fBinSearch = fBin;
451 fBinSearchMax = fBin + parSize.nFreqValid - 1;
452
453 /* Study all possible frequencies with one set of LUT */
454 while ( (fBinSearch <= fBinFin) && (fBinSearch < fBinSearchMax) ) {
455
456 /* finally we can construct the hough maps and select candidates */
457 {
458 INT4 n, nfdotBy2;
459
460 nfdotBy2 = nfdot/2;
461 ht.f0Bin = fBinSearch;
462
463 /*loop over all values of residual spindown */
464 /* check limits of loop */
465 for( n = -nfdotBy2; n <= nfdotBy2 ; n++ ){
466
467 ht.spinRes.data[0] = n*dfdot;
468
469 for (j=0; j < (UINT4)nStacks; j++) {
470 freqInd.data[j] = fBinSearch + floor( (REAL4)(timeDiffV->data[j]*n*dfdot/deltaF) + 0.5f);
471 }
472
473 TRY( LocalHOUGHConstructHMT_W(status->statusPtr, &ht, &freqInd, &phmdVS),status );
474
475 /* get candidates */
476 if ( params->useToplist ) {
477 TRY(GetHoughCandidates_toplist( status->statusPtr, houghToplist, &ht, &patch, &parDem), status);
478 }
479 else {
480 TRY(GetHoughCandidates_threshold( status->statusPtr, out, &ht, &patch, &parDem, params->threshold), status);
481 }
482
483 } /* end loop over spindown trajectories */
484
485 } /* end of block for calculating total hough maps */
486
487
488 /*------ shift the search freq. & PHMD structure 1 freq.bin -------*/
489 ++fBinSearch;
490 TRY( LocalHOUGHupdateSpacePHMDup(status->statusPtr, &phmdVS, pgV, &lutV), status );
491 TRY( LocalHOUGHWeighSpacePHMD(status->statusPtr, &phmdVS, params->weightsV), status);
492
493 } /* closing while loop over fBinSearch */
494
495#ifdef OUTPUT_TIMING
496 /* printf ("xside x yside = %d x %d = %d\n", parSize.xSide, parSize.ySide, parSize.xSide * parSize.ySide ); */
497 nSkyRefine = parSize.xSide * parSize.ySide;
498#endif
499
500 fBin = fBinSearch;
501
502 /*-------------- Free partial memory -----------------*/
503 LALFree(patch.xCoor);
504 LALFree(patch.yCoor);
505 LALFree(ht.map);
506
507 for (j=0; j<lutV.length ; ++j){
508 for (i=0; i<maxNBorders; ++i){
509 LALFree( lutV.lut[j].border[i].xPixel);
510 }
511 LALFree( lutV.lut[j].border);
512 LALFree( lutV.lut[j].bin);
513 }
514 for(j=0; j<phmdVS.length * phmdVS.nfSize; ++j){
515 LALFree( phmdVS.phmd[j].leftBorderP);
516 LALFree( phmdVS.phmd[j].rightBorderP);
517 LALFree( phmdVS.phmd[j].firstColumn);
518 }
519
520 } /* closing first while */
521
522
523 /* free remaining memory */
524 LALFree(ht.spinRes.data);
525 LALFree(ht.spinDem.data);
526 LALFree(ht.dFdot.data);
527 LALFree(lutV.lut);
528 LALFree(phmdVS.phmd);
529 LALFree(freqInd.data);
530 LALFree(parDem.spin.data);
531
532 TRY( LALDDestroyVector( status->statusPtr, &timeDiffV), status);
533
534 /* copy toplist candidates to output structure if necessary */
535 if ( params->useToplist ) {
536 for ( k=0; k<houghToplist->elems; k++) {
537 out->list[k] = *((SemiCohCandidate *)(toplist_elem(houghToplist, k)));
538 }
539 out->nCandidates = houghToplist->elems;
540 free_toplist(&houghToplist);
541 }
542
544 RETURN(status);
545
546}
547
548
549
550/* this function is identical to LALHOUGHConstructHMT_W in DriveHough.c,
551 except for that it calls LocalHOUGHAddPHMD2HD_W instead of LALHOUGHAddPHMD2HD_W
552*/
553static void
554LocalHOUGHConstructHMT_W (LALStatus *status, /**< LAL status pointer */
555 HOUGHMapTotal *ht, /**< The output hough map */
556 UINT8FrequencyIndexVector *freqInd, /**< time-frequency trajectory */
557 PHMDVectorSequence *phmdVS) /**< set of partial hough map derivatives */
558{
559
560 UINT4 k,j;
561 UINT4 breakLine;
562 UINT4 nfSize; /* number of different frequencies */
563 UINT4 length; /* number of elements for each frequency */
564 UINT8 fBinMin; /* present minimum frequency bin */
565 INT8 fBin; /* present frequency bin */
566 UINT2 xSide,ySide;
567
568 HOUGHMapDeriv hd; /* the Hough map derivative */
569
570 /* --------------------------------------------- */
573
574 /* Make sure the arguments are not NULL: */
578 /* ------------------------------------------- */
579
582 /* ------------------------------------------- */
583
584 /* Make sure there is no size mismatch */
585 ASSERT (freqInd->length == phmdVS->length, status,
587 ASSERT (freqInd->deltaF == phmdVS->deltaF, status,
589 /* ------------------------------------------- */
590
591 /* Make sure there are elements */
594 /* ------------------------------------------- */
595
596 /* Make sure the ht map contains some pixels */
599
600 length = phmdVS->length;
601 nfSize = phmdVS->nfSize;
602
603 fBinMin = phmdVS->fBinMin; /* initial frequency value od the cilinder*/
604
605 breakLine = phmdVS->breakLine;
606
607 /* number of physical pixels */
608 xSide = ht->xSide;
609 ySide = ht->ySide;
610
611 /* Make sure initial breakLine is in [0,nfSize) */
612 ASSERT ( breakLine < nfSize, status, LALHOUGHH_EVAL, LALHOUGHH_MSGEVAL);
613
614 /* ------------------------------------------- */
615
616 /* Initializing hd map and memory allocation */
617 hd.xSide = xSide;
618 hd.ySide = ySide;
619 hd.map = (HoughDT *)LALMalloc(ySide*(xSide+1)*sizeof(HoughDT));
620 if (hd. map == NULL) {
622 }
623
624 /* ------------------------------------------- */
625
626 TRY( LALHOUGHInitializeHD(status->statusPtr, &hd), status);
627 for ( k=0; k<length; ++k ){
628 /* read the frequency index and make sure is in the proper interval*/
629 fBin =freqInd->data[k] -fBinMin;
630
631 ASSERT ( fBin < nfSize, status, LALHOUGHH_EVAL, LALHOUGHH_MSGEVAL);
633
634 /* find index */
635 j = (fBin + breakLine) % nfSize;
636
637 /* Add the corresponding PHMD to HD */
639 &hd, &(phmdVS->phmd[j*length+k]) ), status);
640 }
641
642 TRY( LALHOUGHIntegrHD2HT(status->statusPtr, ht, &hd), status);
643
644 /* Free memory and exit */
645 LALFree(hd.map);
646
648 /* normal exit */
649 RETURN (status);
650}
651
652
653
654/* this function is derived from LALHOUGHAddPHMD2HD_W in HoughMap.c.
655 The two originally almost identical loops were put into the inline function
656 LocalHOUGHAddPHMD2HD_Wlr() that is augmented with prefetching code to
657 speed up memory access. The parameterization is such that the originally
658 two loops become actually identical in LocalHOUGHAddPHMD2HD_Wlr
659 (leftBorder <-> rightBorder, lengthLeft <-> lengthRight, weight <-> -weight)
660*/
661static void
662LocalHOUGHAddPHMD2HD_W (LALStatus *status, /**< the status pointer */
663 HOUGHMapDeriv *hd, /**< the Hough map derivative */
664 HOUGHphmd *phmd) /**< info from a partial map */
665{
666
667 INT2 k;
668 UINT2 xSide,ySide;
669 HoughDT weight;
670
673
674 /* Make sure the arguments are not NULL: */
677
678 /* Make sure the map contains some pixels */
681
682 /* aliases */
683 weight = phmd->weight;
684 xSide = hd->xSide;
685 ySide = hd->ySide;
686
687 /* first column correction */
688 for ( k=0; k< ySide; ++k ){
689 hd->map[k*(xSide+1) + 0] += phmd->firstColumn[k] * weight;
690 }
691
692 /* left borders => increase according to weight */
694 hd->map,
695 phmd->leftBorderP,
696 phmd->lengthLeft,
697 weight,
698 xSide,
699 ySide), status );
700
701 /* right borders => decrease according to weight */
703 hd->map,
704 phmd->rightBorderP,
705 phmd->lengthRight,
706 - weight,
707 xSide,
708 ySide), status );
709
710 /* cleanup */
712
713 /* normal exit */
714 RETURN (status);
715}
716
717
718
719/* prefetch compiler directives */
720#if defined(__GNUC__)
721#define PREFETCH(a) __builtin_prefetch(a)
722#elif defined(__INTEL_COMPILER) || defined(_MSC_VER) /* not tested yet */
723#include "xmmintrin.h"
724#define PREFETCH(a) _mm_prefetch((char *)(void *)(a),_MM_HINT_T0)
725#else
726#undef PREFETCH
727#endif
728
729/* assembler hough code for gcc on x86 */
730#if defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )
731
732#if __x86_64__
733#include "hough_x64.i"
734#elif __SSE2__
735#include "hough_sse2.i"
736#elif __i386__
737#include "hough_x87.i"
738#endif
739
742 HoughDT* map,
743 HOUGHBorder** pBorderP,
744 INT4 length,
745 HoughDT weight,
746 INT4 xSide,
747 INT4 ySide) {
748
749 INT4 xSideP1 = xSide +1; /* avoid 16 bit types */
750 INT4 yLower, yUpper;
751 INT4 k;
752 COORType *xPixel;
753 HOUGHBorder* borderP;
754
755 for (k=0; k< length; ++k){
756
757 borderP = pBorderP[k];
758 xPixel = &( (*borderP).xPixel[0] );
759
760 yLower = (*borderP).yLower;
761 yUpper = (*borderP).yUpper;
762
763 if(k < length-1) {
764 INT4 ylkp1 = pBorderP[k+1]->yLower;
765 PREFETCH(&(pBorderP[k+1]->xPixel[ylkp1]));
766 }
767
768 if(k < length-2) {
769 PREFETCH(pBorderP[k+2]);
770 }
771
772 if (yLower < 0) {
773 fprintf(stderr,"WARNING: Fixing yLower (%d -> 0) [HoughMap.c %d]\n",
774 yLower, __LINE__);
775 yLower = 0;
776 }
777 if (yUpper >= ySide) {
778 fprintf(stderr,"WARNING: Fixing yUpper (%d -> %d) [HoughMap.c %d]\n",
779 yUpper, ySide-1, __LINE__);
780 yUpper = ySide - 1;
781 }
782
783 ADDPHMD2HD_WLR_LOOP(xPixel,yLower,yUpper,xSideP1,map,weight);
784
785 };
786
787};
788
789#elif defined(PREFETCH) && ( defined(__SSE__) || defined(__ALTIVEC__) )
790
791/* hough with prefetching */
792
793#ifndef EAH_HOUGH_BATCHSIZE_LOG2
794#define EAH_HOUGH_BATCHSIZE_LOG2 2
795#endif
796#define EAH_HOUGH_BATCHSIZE (1 << EAH_HOUGH_BATCHSIZE_LOG2)
797
798#undef NO_CHECK_INDEX // define this macro to skip CHECK_INDEX() calls
799
800#define CHECK_INDEX(IDX,OFFSET) \
801 if ((IDX < 0) || ( IDX >= ySide*(xSide+1))|| xPixel[OFFSET] < 0 || xPixel[OFFSET] >= xSideP1) { \
802 fprintf(stderr,"\nERROR: %s %d: map index out of bounds: %d [0..%d] j:%d xp[j]:%d xSide:%d\n", \
803 __FILE__,__LINE__,IDX,ySide*(xSide+1),OFFSET,xPixel[OFFSET],xSide ); \
804 ABORT(status, HOUGHMAPH_ESIZE, HOUGHMAPH_MSGESIZE); \
805 }
806
807INLINE void
809 HoughDT* map,
810 HOUGHBorder** pBorderP,
811 INT4 length,
812 HoughDT weight,
813 INT4 xSide,
814 INT4 ySide)
815{
816
817 INT4 k,j;
818 INT4 yLower, yUpper;
819 register HoughDT tempM0,tempM1,tempM2,tempM3;
820 INT4 sidx,sidx0,sidx1,sidx2,sidx3,sidxBase, sidxBase_n; /* pre-calcuted array index for sanity check */
821 INT4 c_c,c_n,offs;
822 COORType *xPixel;
823 HOUGHBorder *borderP;
824 INT4 xSideP1 = xSide +1; /* avoid 16 bit types */
825 INT4 xSideP1_2=xSideP1+xSideP1;
826 INT4 xSideP1_3=xSideP1_2+xSideP1;
827
828 HoughDT *pf_addr[8];
829
830 for (k=0; k< length; ++k) {
831
832 /* Make sure the arguments are not NULL: (Commented for performance) */
833 /* ASSERT (phmd->leftBorderP[k], status, HOUGHMAPH_ENULL,
834 HOUGHMAPH_MSGENULL); */
835
836 borderP = pBorderP[k];
837 xPixel = &( (*borderP).xPixel[0] );
838
839 yLower = borderP->yLower;
840 yUpper = borderP->yUpper;
841
842 sidxBase=yLower*xSideP1;
843 sidxBase_n = sidxBase+(xSideP1 << EAH_HOUGH_BATCHSIZE_LOG2);
844
845
846 if(k < length-1) {
847 INT4 ylkp1 = pBorderP[k+1]->yLower;
848 PREFETCH(&(pBorderP[k+1]->xPixel[ylkp1]));
849 }
850
851 if(k < length-2) {
852 PREFETCH(pBorderP[k+2]);
853 }
854
855
856 if (yLower < 0) {
857 fprintf(stderr,"WARNING: Fixing yLower (%d -> 0) [HoughMap.c %d]\n",
858 yLower, __LINE__);
859 yLower = 0;
860 }
861 if (yUpper >= ySide) {
862 fprintf(stderr,"WARNING: Fixing yUpper (%d -> %d) [HoughMap.c %d]\n",
863 yUpper, ySide-1, __LINE__);
864 yUpper = ySide - 1;
865 }
866
867
868 /* fill first prefetch address array entries */
869 c_c =0;
870 c_n =EAH_HOUGH_BATCHSIZE;
871
872 offs = yUpper - yLower+1;
873 if (offs > EAH_HOUGH_BATCHSIZE) {
874 offs = EAH_HOUGH_BATCHSIZE;
875 }
876
877
878 for(j=yLower; j < yLower+offs; j++) {
879 sidx0=xPixel[j]+ j*xSideP1;
880 PREFETCH(pf_addr[c_c++] = map + sidx0);
881#ifndef NO_CHECK_INDEX
882 CHECK_INDEX(sidx0,j);
883#endif
884 }
885
886 c_c=0;
887 for(j=yLower; j<=yUpper-(2*EAH_HOUGH_BATCHSIZE-1);j+=EAH_HOUGH_BATCHSIZE){
888
889 sidx0 = xPixel[j+EAH_HOUGH_BATCHSIZE]+sidxBase_n;;
890 sidx1 = xPixel[j+EAH_HOUGH_BATCHSIZE+1]+sidxBase_n+xSideP1;
891 sidx2 = xPixel[j+EAH_HOUGH_BATCHSIZE+2]+sidxBase_n+xSideP1_2;
892 sidx3 = xPixel[j+EAH_HOUGH_BATCHSIZE+3]+sidxBase_n+xSideP1_3;;
893
894 PREFETCH(xPixel +(j+(EAH_HOUGH_BATCHSIZE+EAH_HOUGH_BATCHSIZE)));
895
896 PREFETCH(pf_addr[c_n] = map + sidx0);
897 PREFETCH(pf_addr[c_n+1] = map + sidx1);
898 PREFETCH(pf_addr[c_n+2] = map + sidx2);
899 PREFETCH(pf_addr[c_n+3] = map + sidx3);
900
901#ifndef NO_CHECK_INDEX
902 CHECK_INDEX(sidx0,j+EAH_HOUGH_BATCHSIZE);
903 CHECK_INDEX(sidx1,j+EAH_HOUGH_BATCHSIZE+1);
904 CHECK_INDEX(sidx2,j+EAH_HOUGH_BATCHSIZE+2);
905 CHECK_INDEX(sidx3,j+EAH_HOUGH_BATCHSIZE+3);
906#endif
907
908 tempM0 = *(pf_addr[c_c]) +weight;
909 tempM1 = *(pf_addr[c_c+1]) +weight;
910 tempM2 = *(pf_addr[c_c+2]) +weight;
911 tempM3 = *(pf_addr[c_c+3]) +weight;
912
913 sidxBase = sidxBase_n;
914 sidxBase_n+=xSideP1 << EAH_HOUGH_BATCHSIZE_LOG2;
915
916 (*(pf_addr[c_c]))=tempM0;
917 (*(pf_addr[c_c+1]))=tempM1;
918 (*(pf_addr[c_c+2]))=tempM2;
919 (*(pf_addr[c_c+3]))=tempM3;
920
921 c_c ^= EAH_HOUGH_BATCHSIZE;
922 c_n ^= EAH_HOUGH_BATCHSIZE;
923 }
924
925 sidxBase=j*xSideP1;
926 for(; j<=yUpper;++j){
927 sidx = sidxBase + xPixel[j];
928#ifndef NO_CHECK_INDEX
929 CHECK_INDEX(sidx0,j);
930#endif
931 map[sidx] += weight;
932 sidxBase+=xSideP1;
933 }
934
935 }
936}
937
938
939#else /* EAH_HOUGH_PREFETCH */
940
941/* original generic version w/o prefetching */
942
943INLINE void
945 HoughDT* map,
946 HOUGHBorder** pBorderP,
947 INT4 length,
948 HoughDT weight,
949 INT4 xSide,
950 INT4 ySide)
951{
952 INT4 k,j;
953 INT4 yLower, yUpper;
954 COORType *xPixel;
955 HOUGHBorder *borderP;
956 INT4 sidx;
957
958 for (k=0; k< length; ++k) {
959
960 /* local aliases */
961 borderP = pBorderP[k];
962 yLower = (*borderP).yLower;
963 yUpper = (*borderP).yUpper;
964 xPixel = &((*borderP).xPixel[0]);
965
966 /* check boundary conditions */
967 if (yLower < 0) {
968 fprintf(stderr,"WARNING: Fixing yLower (%d -> 0) [HoughMap.c %d]\n",
969 yLower, __LINE__);
970 yLower = 0;
971 }
972 if (yUpper >= ySide) {
973 fprintf(stderr,"WARNING: Fixing yUpper (%d -> %d) [HoughMap.c %d]\n",
974 yUpper, ySide-1, __LINE__);
975 yUpper = ySide - 1;
976 }
977
978 /* increase / decrease according to weight */
979 for(j = yLower; j <= yUpper; j++){
980 sidx = j*(xSide+1) + xPixel[j];
981 if ((sidx < 0) || (sidx >= ySide*(xSide+1))) {
982 fprintf(stderr,"\nERROR: %s %d: map index out of bounds: %d [0..%d] j:%d xp[j]:%d\n",
983 __FILE__,__LINE__,sidx,ySide*(xSide+1),j,xPixel[j] );
985 }
986 map[sidx] += weight;
987 }
988 }
989}
990
991#endif /* EAH_HOUGH_PREFETCH */
int create_toplist(toplist_t **list, size_t length, size_t size, int(*smaller)(const void *, const void *))
Definition: HeapToplist.c:101
void free_toplist(toplist_t **list)
Definition: HeapToplist.c:139
void * toplist_elem(toplist_t *list, size_t ind)
Definition: HeapToplist.c:185
#define HIERARCHICALSEARCH_MSGENULL
#define HIERARCHICALSEARCH_ENULL
#define HIERARCHICALSEARCH_EVAL
#define HIERARCHICALSEARCH_MSGEVAL
void GetHoughCandidates_toplist(LALStatus *status, toplist_t *list, HOUGHMapTotal *ht, HOUGHPatchGrid *patch, HOUGHDemodPar *parDem)
Get Hough candidates as a toplist.
void GetHoughCandidates_threshold(LALStatus *status, SemiCohCandidateList *out, HOUGHMapTotal *ht, HOUGHPatchGrid *patch, HOUGHDemodPar *parDem, REAL8 threshold)
Get Hough candidates as a toplist using a fixed threshold.
Header file for DriveHoughFstat.c.
int j
int k
#define LALRealloc(p, n)
#define LALCalloc(m, n)
#define LALMalloc(n)
#define LALFree(p)
const double b1
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)
#define LocalHOUGHFillPatchGrid
#define PREFETCH(a)
#define INLINE
void LocalComputeFstatHoughMap(LALStatus *status, SemiCohCandidateList *out, HOUGHPeakGramVector *pgV, SemiCoherentParams *params)
#define LocalHOUGHCalcParamPLUT
#define LocalHOUGHWeighSpacePHMD
static void LocalHOUGHConstructHMT_W(LALStatus *status, HOUGHMapTotal *ht, UINT8FrequencyIndexVector *freqInd, PHMDVectorSequence *phmdVS)
set of partial hough map derivatives
#define LocalHOUGHComputeSizePar
#define LocalHOUGHInitializeHT
#define LocalHOUGHConstructSpacePHMD
#define ALWAYS_INLINE
#define LocalHOUGHupdateSpacePHMDup
static void LocalHOUGHAddPHMD2HD_W(LALStatus *status, HOUGHMapDeriv *hd, HOUGHphmd *phmd)
info from a partial map
INLINE void LocalHOUGHAddPHMD2HD_Wlr(LALStatus *status, HoughDT *map, HOUGHBorder **pBorderP, INT4 length, HoughDT weight, INT4 xSide, INT4 ySide) ALWAYS_INLINE
static int smallerHough(const void *a, const void *b)
#define LocalHOUGHConstructPLUT
#define HSMAX(x, y)
#define fprintf
#define HOUGHMAPH_ENULL
Definition: HoughMap.h:75
#define HOUGHMAPH_ESIZE
Definition: HoughMap.h:76
void LALHOUGHInitializeHD(LALStatus *status, HOUGHMapDeriv *hd)
This function initializes the Hough map derivative space HOUGHMapDeriv *hd to zero.
Definition: HoughMap.c:31
#define HOUGHMAPH_MSGESIZE
Definition: HoughMap.h:84
REAL8 HoughTT
Total Hough Map pixel type.
Definition: HoughMap.h:113
#define HOUGHMAPH_MSGENULL
Definition: HoughMap.h:83
void LALHOUGHIntegrHD2HT(LALStatus *status, HOUGHMapTotal *ht, HOUGHMapDeriv *hd)
This function constructs a total Hough map HOUGHMapTotal *ht from its derivative HOUGHMapDeriv *hd by...
Definition: HoughMap.c:353
unsigned char UCHAR
uint64_t UINT8
double REAL8
int16_t INT2
int64_t INT8
uint16_t UINT2
uint32_t UINT4
int32_t INT4
float REAL4
#define LALHOUGHH_EVAL
Definition: LALHough.h:116
#define LALHOUGHH_MSGESZMM
Definition: LALHough.h:121
#define LALHOUGHH_MSGESIZE
Definition: LALHough.h:120
#define LALHOUGHH_ESZMM
Definition: LALHough.h:112
#define LALHOUGHH_MSGEMEM
Definition: LALHough.h:126
#define LALHOUGHH_ENULL
Definition: LALHough.h:110
#define LALHOUGHH_MSGENULL
Definition: LALHough.h:119
#define LALHOUGHH_MSGEVAL
Definition: LALHough.h:125
#define LALHOUGHH_ESIZE
Definition: LALHough.h:111
#define LALHOUGHH_EMEM
Definition: LALHough.h:117
#define LAL_INT8_FORMAT
#define VTOT
Total detector velocity/c TO BE CHANGED DEPENDING ON DETECTOR.
Definition: LUT.h:207
#define PIXERR
Maximum `‘error’' (as a fraction of the width of the thinnest annulus) which allows to consider two b...
Definition: LUT.h:195
#define LINERR
Maximum `‘error’' (as a fraction of the width of the thinnest annulus) which allows to represent a ci...
Definition: LUT.h:188
INT2 COORType
To be changed to {INT2 COORType} if the number of pixels in the x-direction exceeds 255.
Definition: LUT.h:218
void LogPrintf(LogLevel_t, const char *format,...) _LAL_GCC_PRINTF_FORMAT_(2
LOG_DETAIL
REAL8 HoughDT
Hough Map derivative pixel type.
Definition: PHMD.h:121
static const INT4 a
void LALDCreateVector(LALStatus *, REAL8Vector **, UINT4)
void LALDDestroyVector(LALStatus *, REAL8Vector **)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
#define ADDPHMD2HD_WLR_LOOP(_XPIXEL, _YLOWER, _YUPPER, _XSIDEP1, _MAP, _WEIGHT)
Definition: hough_sse2.i:38
pos
n
out
int deltaF
double alpha
This structure stores the border indexes corresponding to one frequency bin plus the corrections to b...
Definition: LUT.h:234
This structure stores the border of a circle clipped on the projected plane.
Definition: LUT.h:221
COORType * xPixel
x pixel index to be marked
Definition: LUT.h:226
INT4 yLower
lower y pixel affected by this border and yUpper<yLower or yUpper<0 are possible
Definition: LUT.h:223
UINT2 ySide
length of xPixel
Definition: LUT.h:225
INT4 yUpper
upper y pixel affected by this border
Definition: LUT.h:222
Demodulation parameters needed for the Hough transform; all coordinates are assumed to be with respec...
Definition: LUT.h:353
REAL8Cart3Coor positC
(x,y,z): Position of the detector
Definition: LUT.h:357
REAL8 deltaF
Frequency resolution: df=1/TCOH
Definition: LUT.h:354
REAL8 timeDiff
: time difference
Definition: LUT.h:358
REAL8Cart3Coor veloC
(x,y,z): Relative detector velocity
Definition: LUT.h:356
REAL8Vector spin
Spin down information.
Definition: LUT.h:359
REAL8UnitPolarCoor skyPatch
(alpha, delta): position of the center of the patch
Definition: LUT.h:355
This structure stores the Hough map derivative.
Definition: HoughMap.h:121
UINT2 ySide
number of physical pixels in the y direction
Definition: HoughMap.h:123
UINT2 xSide
number of physical pixels in the x direction
Definition: HoughMap.h:122
HoughDT * map
the pixel count derivatives; the number of elements to allocate is ySide*(xSide+1)*
Definition: HoughMap.h:124
This structure stores the Hough map.
Definition: HoughMap.h:130
UINT2 ySide
number of physical pixels in the y direction
Definition: HoughMap.h:142
UINT2 xSide
number of physical pixels in the x direction
Definition: HoughMap.h:141
HoughTT * map
the pixel counts; the number of elements to allocate is ySide*xSide
Definition: HoughMap.h:143
REAL8Vector dFdot
resolution in spindown parameters
Definition: HoughMap.h:140
REAL8Vector spinRes
Refined spin parameters used in the Hough transform.
Definition: HoughMap.h:139
REAL8UnitPolarCoor skyPatch
Coordinates of the versor (alpha, delta) pointing to the center of the sky patch.
Definition: HoughMap.h:137
INT8 f0Bin
frequency bin for which it has been constructed
Definition: HoughMap.h:131
UINT4 mObsCoh
ratio of observation time and coherent timescale
Definition: HoughMap.h:133
REAL8 patchSizeX
x size of patch
Definition: HoughMap.h:135
REAL8 deltaF
frequency resolution
Definition: HoughMap.h:132
REAL8 patchSizeY
y size of patch
Definition: HoughMap.h:136
REAL8Vector spinDem
Spin parameters used in the demodulation stage.
Definition: HoughMap.h:138
Parameters needed to construct the partial look up table.
Definition: LUT.h:333
This structure stores patch-frequency grid information.
Definition: LUT.h:264
UINT2 ySide
Real number of pixels in the y-direction (in the projected plane).
Definition: LUT.h:275
REAL8 * xCoor
Coordinates of the pixel centers.
Definition: LUT.h:271
UINT2 xSide
Real number of pixels in the x direction (in the projected plane); it should be less than or equal to...
Definition: LUT.h:270
REAL8 * yCoor
Coordinates of the pixel centers.
Definition: LUT.h:278
REAL8 deltaF
Frequency resolution: df=1/TCOH
Definition: PHMD.h:131
UINT8 fBinFin
Frequency index of the last element of the spectrum covered by this peak-gram.
Definition: PHMD.h:133
UINT8 fBinIni
Frequency index of the first element of the spectrum covered by this peak-gram; it can be seen as an ...
Definition: PHMD.h:132
This structure contains a vector of peak-grams (for the different time stamps)
Definition: LALHough.h:167
UINT4 length
number of elements
Definition: LALHough.h:168
HOUGHPeakGram * pg
the Peakgrams
Definition: LALHough.h:169
parameters needed for gridding the patch
Definition: LUT.h:282
REAL8 deltaF
Frequency resolution: df=1/TCOH
Definition: LUT.h:284
REAL8 pixErr
for validity of LUT as PIXERR
Definition: LUT.h:288
INT8 f0Bin
Frequency bin at which construct the grid.
Definition: LUT.h:283
REAL8 patchSkySizeY
Patch size in radians along y-axis.
Definition: LUT.h:286
REAL8 patchSkySizeX
Patch size in radians along x-axis.
Definition: LUT.h:285
REAL8 pixelFactor
number of pixel that fit in the thinnest annulus
Definition: LUT.h:287
REAL8 vTotC
estimate value of v-total/C as VTOT
Definition: LUT.h:290
REAL8 linErr
as LINERR circle ->line
Definition: LUT.h:289
required for constructing patch
Definition: LUT.h:294
UINT2 maxNBorders
maximum number of borders affecting the patch; for memory allocation
Definition: LUT.h:302
UINT2 maxNBins
maximum number of bins affecting the patch; for memory allocation
Definition: LUT.h:301
UINT2 ySide
number of pixels in the y direction
Definition: LUT.h:300
INT8 nFreqValid
number of frequencies where the LUT is valid
Definition: LUT.h:303
UINT2 xSide
number of pixels in the x direction (projected plane)
Definition: LUT.h:299
This structure stores a partial Hough map derivative.
Definition: PHMD.h:141
UINT2 lengthRight
Exact number of Right borders.
Definition: PHMD.h:144
UINT2 lengthLeft
Exact number of Left borders.
Definition: PHMD.h:143
HoughDT weight
First column border, containing the edge effects when clipping on a finite patch.
Definition: PHMD.h:152
UCHAR * firstColumn
Number of elements of firstColumn.
Definition: PHMD.h:151
UINT2 ySide
number of elements of firstColumn
Definition: PHMD.h:150
HOUGHBorder ** rightBorderP
Pointers to borders.
Definition: PHMD.h:149
UINT2 maxNBorders
Maximun number of borders of each type (for memory allocation purposes), i.e. length of *leftBorderP ...
Definition: PHMD.h:145
HOUGHBorder ** leftBorderP
Pointers to borders.
Definition: PHMD.h:148
This structure stores the patch-time-frequency look up table.
Definition: LUT.h:246
UINT2 maxNBins
Maximum number of bins affecting the patch (for memory allocation purposes)
Definition: LUT.h:256
HOUGHBorder * border
The annulus borders.
Definition: LUT.h:258
HOUGHBin2Border * bin
Bin to border correspondence.
Definition: LUT.h:259
UINT2 maxNBorders
Maximum number of borders affecting the patch (for memory allocation purposes)
Definition: LUT.h:257
This structure contains a vector of partial look up tables (for the different time stamps)
Definition: LALHough.h:173
HOUGHptfLUT * lut
the partial Look Up Tables
Definition: LALHough.h:175
UINT4 length
number of elements
Definition: LALHough.h:174
A vector of 'timestamps' of type LIGOTimeGPS.
Definition: SFTfileIO.h:188
LIGOTimeGPS * data
array of timestamps
Definition: SFTfileIO.h:193
This structure contains a vector sequence of partial-Hough maps derivatives (for different time stamp...
Definition: LALHough.h:189
UINT8 fBinMin
frequency index of smallest intrinsic frequency in circular buffer
Definition: LALHough.h:192
UINT4 breakLine
Mark [0, nfSize) (of the circular buffer) pointing to the starting of the fBinMin line.
Definition: LALHough.h:194
UINT4 nfSize
number of different frequencies
Definition: LALHough.h:190
REAL8 deltaF
frequency resolution
Definition: LALHough.h:193
HOUGHphmd * phmd
the partial Hough map derivatives
Definition: LALHough.h:195
UINT4 length
number of elements for each frequency
Definition: LALHough.h:191
REAL8 y
Definition: LUT.h:310
REAL8 x
Definition: LUT.h:309
REAL8 z
Definition: LUT.h:311
REAL8 alpha
any value
Definition: LUT.h:328
REAL8 delta
In the interval [ ].
Definition: LUT.h:329
REAL8 * data
one hough or stackslide candidate
REAL8 significance
significance
structure for storing candidates produced by Hough search
parameters for the semicoherent stage
This structure stores the frequency indexes of the partial-Hough map derivatives at different time st...
Definition: LALHough.h:149
UINT8 * data
the frequency indexes
Definition: LALHough.h:152
REAL8 deltaF
frequency resolution
Definition: LALHough.h:151
UINT4 length
number of elements
Definition: LALHough.h:150
size_t elems
Definition: HeapToplist.h:37