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
1e6a810a
Commit
1e6a810a
authored
Sep 20, 2011
by
Thomas White
Browse files
compare_hkl: Calculate Rsplit in shells, and say what it is
parent
fba222a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/compare_hkl.c
View file @
1e6a810a
...
...
@@ -83,12 +83,6 @@ static void plot_shells(RefList *list1, double *arr2, double scale,
return
;
}
fh
=
fopen
(
"shells.dat"
,
"w"
);
if
(
fh
==
NULL
)
{
ERROR
(
"Couldn't open 'shells.dat'
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
NBINS
;
i
++
)
{
num
[
i
]
=
0
.
0
;
cts
[
i
]
=
0
;
...
...
@@ -228,7 +222,7 @@ static void plot_shells(RefList *list1, double *arr2, double scale,
i2
=
scale
*
lookup_intensity
(
arr2
,
h
,
k
,
l
);
num
[
bin
]
+=
fabs
(
i1
-
i2
);
den
+=
i1
;
den
+=
i1
+
i2
;
ctot
++
;
cts
[
bin
]
++
;
...
...
@@ -239,12 +233,20 @@ static void plot_shells(RefList *list1, double *arr2, double scale,
nout
);
}
fh
=
fopen
(
"shells.dat"
,
"w"
);
if
(
fh
==
NULL
)
{
ERROR
(
"Couldn't open 'shells.dat'
\n
"
);
return
;
}
fprintf
(
fh
,
"1/d centre Rsplit / %%
\n
"
);
for
(
i
=
0
;
i
<
NBINS
;
i
++
)
{
double
r
,
cen
;
cen
=
rmins
[
i
]
+
(
rmaxs
[
i
]
-
rmins
[
i
])
/
2
.
0
;
r
=
(
num
[
i
]
/
den
)
*
((
double
)
ctot
/
cts
[
i
]);
fprintf
(
fh
,
"%
f %
f
\n
"
,
cen
*
1.0e-9
,
r
*
100
.
0
);
r
=
(
2
.
0
*
(
num
[
i
]
/
den
)
*
((
double
)
ctot
/
cts
[
i
])
)
/
sqrt
(
2
.
0
)
;
fprintf
(
fh
,
"%
10.3f %10.2
f
\n
"
,
cen
*
1.0e-9
,
r
*
100
.
0
);
}
...
...
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