Skip to content

Commit

Permalink
Fixed the ReconstructLri code: a temporary variable was not zeroed fo…
Browse files Browse the repository at this point in the history
…r each subsequent TX.
  • Loading branch information
pjarosik committed Nov 3, 2021
1 parent 50ee795 commit 203d485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/python/arrus/utils/iq_raw_2_lri.cu
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ iqRaw2Lri(complex<float> *iqLri, const complex<float> *iqRaw,

for (int iTx = 0; iTx < nTx; ++iTx) {
int txOffset = iTx*nSamp*nRx;

if (!isinf(txFoc[iTx])) {
/* STA */
float zFoc = txApCentZ[iTx] + txFoc[iTx]*cosf(txAngZX[iTx]);
Expand Down Expand Up @@ -86,6 +85,8 @@ iqRaw2Lri(complex<float> *iqLri, const complex<float> *iqRaw,
pixWgh = 0.0f;

if (txApod != 0.0f) {
pix.real(0);
pix.imag(0);
for (int iRx = 0; iRx < nRx; iRx++) {
iElem = iRx + rxApOrigElem[iTx];
if (iElem < 0 || iElem >= nElem) continue;
Expand Down Expand Up @@ -119,7 +120,7 @@ iqRaw2Lri(complex<float> *iqLri, const complex<float> *iqRaw,
iqLri[z + x*nZPix + iTx*nZPix*nXPix] = complex<float>(0.0f, 0.0f);
}
else {
iqLri[z + x * nZPix + iTx * nZPix * nXPix] = pix/pixWgh*txApod;
iqLri[z + x*nZPix + iTx*nZPix*nXPix] = pix/pixWgh*txApod;
}
}

Expand Down

0 comments on commit 203d485

Please sign in to comment.