Commit 8510f0b5 authored by Pilar Cossio's avatar Pilar Cossio

bioem.cpp

parent 1ba80bfd
......@@ -154,15 +154,17 @@ __device__ static inline void doRefMapFFT(const int iRefMap, const int iOrient,
bioem_Probability_cc& pProbCC = pProb.getProbCC(iRefMap, cc);
/* if(pProbAngle.ConstAngle < logpro)
{
pProbAngle.forAngles = pProbAngle.forAngles * exp(-logpro + pProbAngle.ConstAngle);
pProbAngle.ConstAngle = logpro;
}*/
myfloat_t ttmp;
ttmp=lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels);
if(ttmp>0)pProbCC.forCC += exp( - ttmp);
// pProbCC.forCC =ttmp;
ttmp= (myfloat_t) lCC[cent_x * param.NumberPixels + cent_y] / (myfloat_t) (param.NumberPixels * param.NumberPixels);
if(not param.flipped){
// Storing the lowest cross correlations
if(pProbCC.forCC > ttmp) pProbCC.forCC = ttmp;
}
else{
//Storing the highest cross correlations
if(pProbCC.forCC < ttmp) pProbCC.forCC = ttmp;
}
// pProbCC.forCC = ttmp;
cc++;
}
}
......
......@@ -22,7 +22,8 @@ public:
// If to write Probabilities of Angles from Model
bool writeAngles;
bool writeCC;
int CCdisplace;
bool flipped;
int CCdisplace;
};
......
......@@ -180,6 +180,11 @@ int bioem_RefMap::readRefMaps(bioem_param& param, const char* filemap)
}
}
}
if(lasti != param.param_device.NumberPixels && lastj != param.param_device.NumberPixels )
{
cout << "PROBLEM INCONSISTENT NUMBER OF PIXELS IN MAPS AND INPUTFILE ( " << param.param_device.NumberPixels << ", i " << lasti << ", j " << lastj << ")" << "\n";
exit(1);
}
cout << ".";
ntotRefMap = nummap + 1;
maps = (myfloat_t*) reallocchk(maps, refMapSize * sizeof(myfloat_t) * ntotRefMap);
......
......@@ -74,6 +74,9 @@ int bioem_param::readParameters(const char* fileinput)
bool yesMDC = false ;
bool yesGCen = false ;
//Default not flipped micrographs
param_device.flipped=false;
ifstream input(fileinput);
if (!input.good())
{
......@@ -229,6 +232,11 @@ int bioem_param::readParameters(const char* fileinput)
param_device.CCdisplace=int(atoi(token));
if (param_device.CCdisplace < 0 ) { cout << "*** Error: Negative CROSSCOR_DISPLACE "; exit(1);}
cout << "Writing Cross Correlation Displacement " << param_device.CCdisplace << " \n";
}
else if (strcmp(token, "FLIPPED") == 0)
{
param_device.flipped = true;
cout << "Micrograph Flipped Intensities \n";
}
else if (strcmp(token, "DO_AA_RADIUS") == 0)
{
......
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