Commit d86c3eae authored by Pilar Cossio's avatar Pilar Cossio

Tidying up tutorial

parent 9768552f
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,9 +6,11 @@ PIXEL_SIZE 1.32
USE_QUATERNIONS
##### Constrast transfer integration: #######
CTF_B_ENV 100.0 300.5 8
CTF_DEFOCUS 1.0 6.0 5
CTF_AMPLITUDE 0.01 0.5 3
CTF_B_ENV 10.0 500. 5
CTF_DEFOCUS 0.5 4.5 8
CTF_AMPLITUDE 0.01 0.401 4
SIGMA_PRIOR_B_CTF 50.
##### Center displacement: #######
DISPLACE_CENTER 10 2
DISPLACE_CENTER 40 1
......@@ -7,9 +7,9 @@ GRIDPOINTS_ALPHA 10
GRIDPOINTS_BETA 5
##### Constrast transfer integration: #######
CTF_B_FACTOR 100.0 300.5 8
CTF_DEFOCUS 1.0 6.0 5
CTF_AMPLITUDE 0.1 0.1 1
CTF_B_ENV 10.0 300.5 3
CTF_DEFOCUS 0.5 4.5 5
CTF_AMPLITUDE 0.01 0.2 2
##### Center displacement: #######
DISPLACE_CENTER 10 2
......
......@@ -7,9 +7,9 @@ GRIDPOINTS_ALPHA 2
GRIDPOINTS_BETA 2
##### Constrast transfer integration: #######
CTF_B_FACTOR 100.0 300.5 2
CTF_DEFOCUS 1.0 6.0 5
CTF_AMPLITUDE 0.1 0.1 1
CTF_B_ENV 10.0 300.5 3
CTF_DEFOCUS 0.5 4.5 5
CTF_AMPLITUDE 0.01 0.2 3
##### Center displacement: #######
DISPLACE_CENTER 10 2
......
......@@ -7,7 +7,7 @@ GRIDPOINTS_ALPHA 10
GRIDPOINTS_BETA 5
##### Constrast transfer integration: #######
CTF_B_FACTOR 100.0 300.5 8
CTF_B_ENV 100.0 300.5 8
CTF_DEFOCUS 1.0 6.0 5
CTF_AMPLITUDE 0.1 0.1 1
......
......@@ -8,8 +8,8 @@ BEST_DX -10
BEST_DY 5
######## Normalization and Offset ################
BEST_NORM 1
BEST_OFFSET 0
BEST_NORM 0.03
BEST_OFFSET -0.001
######## Euler Angles ################
BEST_ALPHA -0.464793
......@@ -23,12 +23,14 @@ BEST_PSF_PHASE 0.004
BEST_PSF_AMP 1
##### Using CTF #######
BEST_CTF_B_FACTOR 200.5
BEST_CTF_B_ENV 200.5
BEST_CTF_DEFOCUS 3.5
BEST_CTF_AMP 0.3
######## ADDING NOISE ###########
WITHNOISE 5.476
### In this case the standard deviation of the noise is 6.476
WITHNOISE 6.476
########## Printing the 3d Model rotation ###########
PRINT_ROTATED_MODELS
#PRINT_ROTATED_MODELS
......@@ -7,8 +7,8 @@ USE_QUATERNIONS
##### Constrast transfer integration: #######
CTF_B_ENV 10.0 500. 5.
CTF_DEFOCUS 1.0 6.0 10.
CTF_AMPLITUDE 0.1 0.9 5.
CTF_DEFOCUS 0.5 4.5 8.
CTF_AMPLITUDE 0.01 0.401 4.
## Gaussian width of Prior of b-parameter
SIGMA_PRIOR_B_CTF 50.
......
......@@ -296,10 +296,7 @@ int bioem::configure(int ac, char* av[])
#ifdef WITH_MPI
// Contros for MPI
if(mpi_size > param.nTotGridAngles){
cout << "EXIT: Wrong MPI setup More MPI processes than orientations\n"; exit(1);
}
// ********************* MPI inizialization/ Transfer of parameters******************
if (mpi_size > 1)
......@@ -443,6 +440,10 @@ int bioem::run()
if (mpi_rank == 0) printf("\tInitializing Probabilities\n");
// Contros for MPI
if(mpi_size > param.nTotGridAngles){
cout << "EXIT: Wrong MPI setup More MPI processes than orientations\n"; exit(1);
}
// Inizialzing Probabilites to zero and constant to -Infinity
for (int iRefMap = 0; iRefMap < RefMap.ntotRefMap; iRefMap ++)
......@@ -759,13 +760,15 @@ int bioem::run()
}else {
if(param.usepsf){
// if( localcc[rx * param.param_device.NumberPixels + ry] <
outputProbFile << "Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 - PSF amp - PSF phase - PSF envelope - center x - center y - normalization - offsett \n";
outputProbFile << "Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 - q4 -PSF amp - PSF phase - PSF envelope - center x - center y - normalization - offsett \n";
}else{
outputProbFile << "Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 - CTF amp - CTF defocus - CTF B-Env - center x - center y - normalization - offsett \n";
outputProbFile << "Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 - q4 - CTF amp - CTF defocus - CTF B-Env - center x - center y - normalization - offsett \n";
}}
if(param.writeCTF) outputProbFile << " RefMap: MapNumber ; CTFMaxParm: defocus - b-Env (B ref. Penzeck 2010)\n";
if(param.yespriorAngles) outputProbFile << "**** Remark: Using Prior Proability in Angles ****\n";
outputProbFile <<"************************* HEADER:: NOTATION *******************************************\n\n";
// Loop over reference maps
// ************* Over all maps ***************
......@@ -794,18 +797,20 @@ int bioem::run()
// *** Param that maximize probability****
// outputProbFile << (pProbMap.Constoadd + 0.5 * log(M_PI) + (1 - param.param_device.Ntotpi * 0.5) * (log(2 * M_PI) + 1) + log(param.param_device.volu)) << " ";
outputProbFile << param.angles[pProbMap.max.max_prob_orient].pos[0] << " [ ] ";
outputProbFile << param.angles[pProbMap.max.max_prob_orient].pos[1] << " [ ] ";
outputProbFile << param.angles[pProbMap.max.max_prob_orient].pos[2] << " [ ] ";
outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[0] << " [ ] ";
outputProbFile << param.angles[pProbMap.max.max_prob_orient].pos[0] << " [] ";
outputProbFile << param.angles[pProbMap.max.max_prob_orient].pos[1] << " [] ";
outputProbFile << param.angles[pProbMap.max.max_prob_orient].pos[2] << " [] ";
if(param.doquater)outputProbFile << param.angles[pProbMap.max.max_prob_orient].quat4 << " [] ";
outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[0] << " [] ";
if(!param.usepsf){outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[1]/ 2.f /M_PI / param.elecwavel * 0.0001 << " [micro-m] ";
}else{outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[1] << " [1/A²] ";}
if(!param.usepsf){outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[2] << " [A²] ";}
else{outputProbFile << param.CtfParam[pProbMap.max.max_prob_conv].pos[2] << " [1/A²] ";}
outputProbFile << pProbMap.max.max_prob_cent_x << " [pix] ";
outputProbFile << pProbMap.max.max_prob_cent_y << " [pix] " ;
outputProbFile << pProbMap.max.max_prob_norm << " [ ] " ;
outputProbFile << pProbMap.max.max_prob_mu << " [ ] ";
outputProbFile << pProbMap.max.max_prob_norm << " [] " ;
outputProbFile << pProbMap.max.max_prob_mu << " [] ";
outputProbFile << "\n";
// Writing out CTF parameters if requiered
......@@ -862,6 +867,7 @@ int bioem::run()
int rx=0;
int ry=0;
myfloat_t localcc[ (param.param_device.NumberPixels+1) * (param.param_device.NumberPixels+1) ];
int used[(param.param_device.NumberPixels+1) * (param.param_device.NumberPixels+1)];
halfPix = param.param_device.NumberPixels / 2 ;
// Ordering the centers of the Cross Correlation
......@@ -871,6 +877,7 @@ int bioem::run()
for (int ry = 0; ry < param.param_device.NumberPixels ; ry++)
{
localcc[ rx * param.param_device.NumberPixels + ry ] = 0.0;
used[ rx * param.param_device.NumberPixels + ry ]= 0;
}
}
......@@ -904,36 +911,42 @@ int bioem::run()
}else{
localcc[ rx * param.param_device.NumberPixels + ry ] = log(pProbCC.forCC)+pProbCC.ConstCC;
}
used[ rx * param.param_device.NumberPixels + ry] = 1;
cc++;
}
// ccProbfile << "\n";
}
if(!param.ignoreCCoff){
for (int rx = param.param_device.CCdisplace; rx < param.param_device.NumberPixels ; rx = rx + param.param_device.CCdisplace)
/* for (int rx = param.param_device.CCdisplace; rx < param.param_device.NumberPixels ; rx = rx + param.param_device.CCdisplace)
{
for (int ry = param.param_device.CCdisplace; ry < param.param_device.NumberPixels ; ry = ry + param.param_device.CCdisplace)
{
if(localcc[ rx * param.param_device.NumberPixels + ry ] > -FLT_MAX){
{*/
for (int rx = param.param_device.CCdisplace; rx < param.param_device.NumberPixels ; rx++)
{
for (int ry = param.param_device.CCdisplace; ry < param.param_device.NumberPixels ; ry++)
{
if(used[ rx * param.param_device.NumberPixels + ry ] == 1){
ccProbfile << "RefMap: "<< iRefMap << " " << rx << " " << ry << " " << localcc[ rx * param.param_device.NumberPixels + ry ] << "\n" ;
}else{
ccProbfile << "RefMap: "<< iRefMap << " " << rx << " " << ry << " " << -FLT_MAX << "\n" ;
if(localcc[ rx * param.param_device.NumberPixels + ry ] <= -FLT_MAX)ccProbfile << "RefMap: "<< iRefMap << " " << rx << " " << ry << " " << -FLT_MAX << "\n" ;
}
// cout << " cc " << rx << " " << ry << " " << localcc[ rx * param.param_device.NumberPixels + ry ] <<"\n" ;
}
ccProbfile << "\n";
// ccProbfile << "\n";
}
}else{
for (int rx = param.param_device.CCdisplace; rx < param.param_device.NumberPixels ; rx++)
{
for (int ry = param.param_device.CCdisplace; ry < param.param_device.NumberPixels ; ry++)
{
if(localcc[ rx * param.param_device.NumberPixels + ry ] > -FLT_MAX){
if(used[ rx * param.param_device.NumberPixels + ry ] == 1){
ccProbfile << "RefMap: "<< iRefMap << " " << rx << " " << ry << " " << localcc[ rx * param.param_device.NumberPixels + ry ] << "\n" ;
}else{
ccProbfile << "RefMap: "<< iRefMap << " " << rx << " " << ry << " " << -FLT_MAX << "\n" ;
if(localcc[ rx * param.param_device.NumberPixels + ry ] <= -FLT_MAX)ccProbfile << "RefMap: "<< iRefMap << " " << rx << " " << ry << " " << -FLT_MAX << "\n" ;
}
}
ccProbfile << "\n";
// ccProbfile << "\n";
}
}
......
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