Commit 49a0c950 authored by Pilar Cossio's avatar Pilar Cossio
Browse files

Correction centers; Normalization and offset added

parent 9c887a81
......@@ -39,8 +39,8 @@ __device__ static inline void update_prob(const myfloat_t logpro, const int iRef
}
else
{
pProbMap.max.max_prob_cent_x = cent_x;
pProbMap.max.max_prob_cent_y = cent_y;
pProbMap.max.max_prob_cent_x = - cent_x;
pProbMap.max.max_prob_cent_y = - cent_y;
}
pProbMap.max.max_prob_orient = iOrient;
pProbMap.max.max_prob_conv = iConv;
......@@ -94,10 +94,13 @@ __device__ static inline void calProb(int iRefMap, int iOrient, int iConv, myflo
pProbMap.Constoadd = logpro;
// ********** Getting parameters that maximize the probability ***********
pProbMap.max.max_prob_cent_x = disx;
pProbMap.max.max_prob_cent_y = disy;
pProbMap.max.max_prob_cent_x = - disx;
pProbMap.max.max_prob_cent_y = - disy;
pProbMap.max.max_prob_orient = iOrient;
pProbMap.max.max_prob_conv = iConv;
pProbMap.max.max_prob_norm = - ( -sumC * RefMap.sum_RefMap[iRefMap] + param.Ntotpi * value ) / ( sumC * sumC - sumsquareC * param.Ntotpi);
pProbMap.max.max_prob_mu = - ( -sumC * value + sumsquareC * RefMap.sum_RefMap[iRefMap] ) / ( sumC * sumC - sumsquareC * param.Ntotpi);
}
pProbMap.Total += exp(logpro - pProbMap.Constoadd);
......@@ -297,8 +300,8 @@ __device__ static inline void compareRefMap(const int iRefMap, const int iOrient
if (bufint[0] == 1 && buf3[1] == logpro && iRefMap < RefMap.ntotRefMap && atomicAdd(&bufint[0], 1) == 1)
{
pProbMap.max.max_prob_cent_x = cent_x;
pProbMap.max.max_prob_cent_y = cent_y;
pProbMap.max.max_prob_cent_x = - cent_x;
pProbMap.max.max_prob_cent_y = - cent_y;
}
__syncthreads();
......
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