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
Oleksii Turkot
CrystFEL
Commits
e2ff3965
Commit
e2ff3965
authored
Nov 17, 2010
by
Thomas White
Browse files
Fix stability of SNRs
parent
2f942f0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/check_hkl.c
View file @
e2ff3965
...
...
@@ -243,6 +243,8 @@ static void plot_shells(const double *ref, ReflItemList *items, UnitCell *cell,
continue
;
}
if
(
!
isfinite
(
val
/
esd
)
)
continue
;
/* measured[bin] was done earlier */
measurements
[
bin
]
+=
lookup_count
(
counts
,
h
,
k
,
l
);
snr
[
bin
]
+=
val
/
esd
;
...
...
src/process_hkl.c
View file @
e2ff3965
...
...
@@ -813,9 +813,12 @@ int main(int argc, char *argv[])
dev
=
lookup_intensity
(
devs
,
h
,
k
,
l
);
count
=
lookup_count
(
counts
,
h
,
k
,
l
);
if
(
count
<
2
)
continue
;
esd
=
sqrt
(
dev
)
/
(
double
)
count
;
if
(
count
<
2
)
{
/* If we have only one measurement, the error is 100% */
esd
=
lookup_intensity
(
model
,
h
,
k
,
l
);
}
else
{
esd
=
sqrt
(
dev
)
/
(
double
)
count
;
}
set_intensity
(
esds
,
h
,
k
,
l
,
esd
);
}
...
...
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