Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIBP-Hummer
BioEM
Commits
8510f0b5
Commit
8510f0b5
authored
Jul 29, 2014
by
Pilar Cossio
Browse files
bioem.cpp
parent
1ba80bfd
Changes
4
Hide whitespace changes
Inline
Side-by-side
bioem_algorithm.h
View file @
8510f0b5
...
...
@@ -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
++
;
}
}
...
...
include/param.h
View file @
8510f0b5
...
...
@@ -22,7 +22,8 @@ public:
// If to write Probabilities of Angles from Model
bool
writeAngles
;
bool
writeCC
;
int
CCdisplace
;
bool
flipped
;
int
CCdisplace
;
};
...
...
map.cpp
View file @
8510f0b5
...
...
@@ -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
);
...
...
param.cpp
View file @
8510f0b5
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment