Commit 842b99dc authored by David Rohr's avatar David Rohr
Browse files

fix cent_x and cent_y in FFT mode

parent d41e474a
...@@ -178,7 +178,7 @@ int bioem::configure(int ac, char* av[]) ...@@ -178,7 +178,7 @@ int bioem::configure(int ac, char* av[])
int bioem::precalculate() int bioem::precalculate()
{ {
// ************************************************************************************** // **************************************************************************************
/* Precalculating Routine of Orientation grids, Map crosscorrelations and CTF Kernels */ // **Precalculating Routine of Orientation grids, Map crosscorrelations and CTF Kernels**
// ************************************************************************************** // **************************************************************************************
// Generating Grids of orientations // Generating Grids of orientations
......
...@@ -114,18 +114,18 @@ __device__ static inline void doRefMapFFT(const int iRefMap, const int iOrient, ...@@ -114,18 +114,18 @@ __device__ static inline void doRefMapFFT(const int iRefMap, const int iOrient,
} }
for (int cent_y = param.NumberPixels - param.maxDisplaceCenter; cent_y < param.NumberPixels; cent_y = cent_y + param.GridSpaceCenter) for (int cent_y = param.NumberPixels - param.maxDisplaceCenter; cent_y < param.NumberPixels; cent_y = cent_y + param.GridSpaceCenter)
{ {
calProb(iRefMap, iOrient, iConv, sumC, sumsquareC, (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels), cent_x, param.NumberPixels - cent_y, pProb, param, RefMap); calProb(iRefMap, iOrient, iConv, sumC, sumsquareC, (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels), cent_x, cent_y - param.NumberPixels, pProb, param, RefMap);
} }
} }
for (int cent_x = param.NumberPixels - param.maxDisplaceCenter; cent_x < param.NumberPixels; cent_x = cent_x + param.GridSpaceCenter) for (int cent_x = param.NumberPixels - param.maxDisplaceCenter; cent_x < param.NumberPixels; cent_x = cent_x + param.GridSpaceCenter)
{ {
for (int cent_y = 0; cent_y < param.maxDisplaceCenter; cent_y = cent_y + param.GridSpaceCenter) for (int cent_y = 0; cent_y < param.maxDisplaceCenter; cent_y = cent_y + param.GridSpaceCenter)
{ {
calProb(iRefMap, iOrient, iConv, sumC, sumsquareC, (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels), param.NumberPixels - cent_x, cent_y, pProb, param, RefMap); calProb(iRefMap, iOrient, iConv, sumC, sumsquareC, (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels), cent_x - param.NumberPixels, cent_y, pProb, param, RefMap);
} }
for (int cent_y = param.NumberPixels - param.maxDisplaceCenter; cent_y <= param.NumberPixels; cent_y = cent_y + param.GridSpaceCenter) for (int cent_y = param.NumberPixels - param.maxDisplaceCenter; cent_y <= param.NumberPixels; cent_y = cent_y + param.GridSpaceCenter)
{ {
calProb(iRefMap, iOrient, iConv, sumC, sumsquareC, (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels), param.NumberPixels - cent_x, param.NumberPixels - cent_y, pProb, param, RefMap); calProb(iRefMap, iOrient, iConv, sumC, sumsquareC, (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels), cent_x - param.NumberPixels, cent_y - param.NumberPixels pProb, param, RefMap);
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment