69 INT4 fBinDif,shiftPeak,minPeakBin,maxPeakBin,thisPeak;
71 UINT4 lengthLeft,lengthRight,
n, searchIndex;
72 UINT8 firstBin,lastBin,pgI,pgF;
113 if (phmd->
ySide == 0) {
127 fBinDif = llabs( (
long long)( (phmd->
fBin) - (lut->
f0Bin) ));
139 lastBin = firstBin + (lut->
nBin)-1;
144 if ( pgI > firstBin ) {
147 if ( pgF < lastBin ) {
167 minPeakBin = firstBin - pgI;
168 maxPeakBin = lastBin - pgI;
174 INT2 lb1,rb1,lb2,rb2;
175 INT2 max1,min1,max2,min2;
180 shiftPeak = pgI - (phmd->
fBin) - (lut->
offset);
186 searchIndex = (
n * minPeakBin ) /(pgF-pgI+1);
187 if (searchIndex >=
n) { searchIndex =
n-1;}
193 while (searchIndex >0 && test1) {
194 if ( pg->
peak[searchIndex -1] >= minPeakBin ) {
206 while (searchIndex <
n-1 && test1) {
207 if ( pg->
peak[searchIndex] < minPeakBin ) {
221 while (searchIndex <
n && test1) {
222 thisPeak = pg->
peak[searchIndex];
224 if (thisPeak > maxPeakBin) {
227 if ( thisPeak >= minPeakBin) {
229 relatIndex = thisPeak + shiftPeak;
232 if( relatIndex < 0 )
i = nBinPos - relatIndex;
235 if (
i >= lut->
nBin ) {
236 fprintf(stderr,
"current index i=%d not lesser than nBin=%d\n [Peak2PHMD.c %d]\n",
i,lut->
nBin, __LINE__);
275 for(
j=min1;
j<=max1; ++
j) {
279 for(
j=min2;
j<=max2; ++
j) {
#define ABORT(statusptr, code, mesg)
#define ATTATCHSTATUSPTR(statusptr)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
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.
INT2 rightB2
Border index to be used (stop-border ‘ ’)
INT2 leftB1
Border index to be used (start-border ‘ ’)
INT2 piece1min
If piece1min piece1max no corrections should be added.
INT2 piece2max
Interval limits of the (second piece) correction to the first column.
INT2 rightB1
Border index to be used (stop-border ‘ ’)
INT2 piece1max
Interval limits of the (first piece) correction to the first column.
INT2 leftB2
Border index to be used (start-border ‘ ’)
INT2 piece2min
If piece2min piece2max no corrections should be added.
This structure stores the `‘peak-gram’'.
REAL8 deltaF
Frequency resolution: df=1/TCOH
UINT4 length
Number of peaks present in the peak-gram.
UINT8 fBinFin
Frequency index of the last element of the spectrum covered by this peak-gram.
UINT8 fBinIni
Frequency index of the first element of the spectrum covered by this peak-gram; it can be seen as an ...
INT4 * peak
The peak indices relative to fBinIni, i.e., the zero peak corresponds to fBinIni.
This structure stores a partial Hough map derivative.
UINT2 lengthRight
Exact number of Right borders.
UINT2 lengthLeft
Exact number of Left borders.
UINT8 fBin
Frequency bin of this partial map derivative.
UCHAR * firstColumn
Number of elements of firstColumn.
UINT2 ySide
number of elements of firstColumn
HOUGHBorder ** rightBorderP
Pointers to borders.
HOUGHBorder ** leftBorderP
Pointers to borders.
This structure stores the patch-time-frequency look up table.
INT4 offset
Frequency bin corresponding to center of patch measured with respect to f0Bin (zero in modulated case...
REAL8 deltaF
Frequency resolution df=1/TCOH, where 1/TCOH is the coherent integration time used in teh demodulatio...
INT4 nBin
Exact number of bins affecting the patch.
HOUGHBorder * border
The annulus borders.
INT4 iniBin
First bin affecting the patch with respect to f0.
HOUGHBin2Border * bin
Bin to border correspondence.
INT8 f0Bin
Frequency bin for which it has been constructed.
INT8 nFreqValid
Number of frequencies where the lut is valid.