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
Oleksii Turkot
CrystFEL
Commits
05c119d3
Commit
05c119d3
authored
Nov 05, 2019
by
Yaroslav Gevorkov
Browse files
bug fix in Ewald sphere width calculation
parent
858e20d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcrystfel/src/geometry.c
View file @
05c119d3
...
...
@@ -290,17 +290,16 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
g
=
spectrum_get_gaussian
(
image
->
spectrum
,
i
);
/* Project lattice point onto Ewald sphere */
x
=
xl
;
x
=
xl
;
y
=
yl
;
z
=
zl
+
g
.
kcen
;
norm
=
1
.
0
/
sqrt
(
x
*
x
+
y
*
y
+
z
*
z
);
x
*=
norm
;
y
*=
norm
;
z
*=
norm
;
z
-=
1
.
0
;
/* Width of Ewald sphere in the direction of the projection */
sigma_proj
=
sqrt
(
x
*
x
+
y
*
y
+
z
*
z
)
*
g
.
sigma
;
sigma_proj
=
(
1
-
z
)
*
g
.
sigma
;
mean_variance
(
g
.
kcen
,
g
.
area
,
&
sumw_k
,
&
mean_k
,
&
M2_k
);
M2_k
+=
g
.
area
*
g
.
sigma
*
g
.
sigma
;
...
...
@@ -310,6 +309,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
x
*=
g
.
kcen
;
y
*=
g
.
kcen
;
z
*=
g
.
kcen
;
z
-=
g
.
kcen
;
/* Three because the general case fails in extreme cases */
if
(
w0
/
w1
<=
DBL_MIN
)
{
...
...
Write
Preview
Supports
Markdown
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