Commit 9c887a81 authored by Pilar Cossio's avatar Pilar Cossio
Browse files

Radius Projection added

parent 9cdf397a
......@@ -567,7 +567,9 @@ int bioem::run()
outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[1] << " ";
outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[2] << " ";
outputProbFile << pProbMap.max.max_prob_cent_x << " ";
outputProbFile << pProbMap.max.max_prob_cent_y;
outputProbFile << pProbMap.max.max_prob_cent_y << " " ;
outputProbFile << pProbMap.max.max_prob_norm << " " ;
outputProbFile << pProbMap.max.max_prob_mu ;
outputProbFile << "\n";
// *** For individual files*** //angProbfile.open ("ANG_PROB_"iRefMap);
......@@ -689,7 +691,39 @@ int bioem::createProjection(int iMap, mycomplex_t* mapFFT)
int i, j;
// ************ Projection over the Z axis********************
//********** Projection with radius ***************
if(param.doaaradius){
int irad;
myfloat_t dist, rad2;
for(int n = 0; n < Model.nPointsModel; n++)
{
//Getting Centers of Sphere
i = floor(RotatedPointsModel[n].pos[0] / param.pixelSize + (myfloat_t) param.param_device.NumberPixels / 2.0f + 0.5f);
j = floor(RotatedPointsModel[n].pos[1] / param.pixelSize + (myfloat_t) param.param_device.NumberPixels / 2.0f + 0.5f);
//Getting the radius
irad=int( Model.points[n].radius / param.pixelSize );
rad2= Model.points[n].radius * Model.points[n].radius;
//Projecting over the radius
for(int ii= i - irad; ii < i + irad; ii++)
{
for(int jj = j - irad; jj < j + irad; jj++)
{
dist= ( (myfloat_t) (ii-i)*(ii-i)+(jj-j)*(jj-j) ) * param.pixelSize ;
if( dist < rad2 )
{
localproj[ii * param.param_device.NumberPixels + jj] += param.pixelSize * 2 * sqrt( rad2 - dist ) * Model.points[n].density
/ Model.NormDen * 3 / (4 * M_PI * rad2 * Model.points[n].radius);
}
}
}
}
}
else
{
// ************ Simple Projection over the Z axis********************
for(int n = 0; n < Model.nPointsModel; n++)
{
//Getting pixel that represents coordinates & shifting the start at to Numpix/2,Numpix/2 )
......@@ -704,6 +738,7 @@ int bioem::createProjection(int iMap, mycomplex_t* mapFFT)
localproj[i * param.param_device.NumberPixels + j] += Model.points[n].density / Model.NormDen;
}
}
// **** Output Just to check****
#ifdef PILAR_DEBUG
......
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