Skip to content
GitLab
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
7f1dacfb
Commit
7f1dacfb
authored
Sep 10, 2014
by
Pilar Cossio
Browse files
Correction to Normalization
parent
a6fe49c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
param.cpp
View file @
7f1dacfb
...
...
@@ -433,6 +433,8 @@ int bioem_param::CalculateRefCTF()
delete
[]
CtfParam
;
CtfParam
=
new
myfloat3_t
[
getCtfParamCount
()];
myfloat_t
normctf
;
for
(
int
iamp
=
0
;
iamp
<
numberGridPointsCTF_amp
;
iamp
++
)
//Loop over amplitud
{
amp
=
(
myfloat_t
)
iamp
*
gridCTF_amp
+
startGridCTF_amp
;
...
...
@@ -447,13 +449,26 @@ int bioem_param::CalculateRefCTF()
memset
(
localCTF
,
0
,
param_device
.
NumberPixels
*
param_device
.
NumberPixels
*
sizeof
(
myfloat_t
));
normctf
=
0.0
;
for
(
int
i
=
0
;
i
<
nctfmax
;
i
++
)
{
for
(
int
j
=
0
;
j
<
nctfmax
;
j
++
)
{
radsq
=
(
myfloat_t
)
(
i
*
i
+
j
*
j
)
*
pixelSize
*
pixelSize
;
ctf
=
exp
(
-
radsq
*
env
/
2.0
)
*
(
amp
*
cos
(
radsq
*
phase
/
2.0
)
-
sqrt
((
1
-
amp
*
amp
))
*
sin
(
radsq
*
phase
/
2.0
))
;
normctf
+=
4.0
*
(
myfloat_t
)
ctf
;
}
}
//Assigning CTF values
for
(
int
i
=
0
;
i
<
nctfmax
;
i
++
)
{
for
(
int
j
=
0
;
j
<
nctfmax
;
j
++
)
{
radsq
=
(
myfloat_t
)
(
i
*
i
+
j
*
j
)
*
pixelSize
*
pixelSize
;
ctf
=
exp
(
-
radsq
*
env
/
2.0
)
*
(
amp
*
cos
(
radsq
*
phase
/
2.0
)
-
sqrt
((
1
-
amp
*
amp
))
*
sin
(
radsq
*
phase
/
2.0
));
ctf
=
exp
(
-
radsq
*
env
/
2.0
)
*
(
amp
*
cos
(
radsq
*
phase
/
2.0
)
-
sqrt
((
1
-
amp
*
amp
))
*
sin
(
radsq
*
phase
/
2.0
))
/
normctf
;
localCTF
[
i
*
param_device
.
NumberPixels
+
j
]
=
(
myfloat_t
)
ctf
;
localCTF
[
i
*
param_device
.
NumberPixels
+
param_device
.
NumberPixels
-
j
-
1
]
=
(
myfloat_t
)
ctf
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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