Skip to content
Snippets Groups Projects
Commit d3d5d22c authored by Sarod Yatawatta's avatar Sarod Yatawatta
Browse files

COB-153: use pol instead of ri

parent ae3523e1
No related branches found
No related tags found
1 merge request!249COB 153 - Doppler correction in correlator pipeline
...@@ -117,7 +117,7 @@ inline __device__ float sincos_f2f_select(float phi, int pol) ...@@ -117,7 +117,7 @@ inline __device__ float sincos_f2f_select(float phi, int pol)
typedef const double(*DelaysType)[1][NR_STABS][NR_POLARIZATIONS]; // 2 Polarizations; in seconds typedef const double(*DelaysType)[1][NR_STABS][NR_POLARIZATIONS]; // 2 Polarizations; in seconds
typedef const double(*Phase0sType)[NR_STABS][NR_POLARIZATIONS]; // 2 Polarizations; in radians typedef const double(*Phase0sType)[NR_STABS][NR_POLARIZATIONS]; // 2 Polarizations; in radians
inline __device__ float correction_factor(double phiGradient, int ri, unsigned channel) inline __device__ float correction_factor(double phiGradient, int pol, unsigned channel)
{ {
// Offset of this sample between begin and end. = t/T fraction, within one FFT block of NR_CHANNELS // Offset of this sample between begin and end. = t/T fraction, within one FFT block of NR_CHANNELS
const double blockOffset = double(channel) / NR_CHANNELS; const double blockOffset = double(channel) / NR_CHANNELS;
...@@ -128,9 +128,10 @@ inline __device__ float correction_factor(double phiGradient, int ri, unsigned c ...@@ -128,9 +128,10 @@ inline __device__ float correction_factor(double phiGradient, int ri, unsigned c
// We can afford to if we keep this kernel memory bound. // We can afford to if we keep this kernel memory bound.
const float phi = phiGradient * blockOffset; const float phi = phiGradient * blockOffset;
// Note: both X and Y polarizations will have same correction // Note: both X and Y polarizations will have same correction
return sincos_f2f_select(phi, ri); // But pol used here because input is ordered accordingly
return sincos_f2f_select(phi, pol);
} }
#define FACTOR correction_factor(phiGradient, ri, channel) #define FACTOR correction_factor(phiGradient, pol, channel)
#endif /* DOPPLER_CORRECTION */ #endif /* DOPPLER_CORRECTION */
/*! /*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment