aboutsummaryrefslogtreecommitdiff
path: root/src/compare_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-07-12 10:06:47 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:53 +0100
commit6264ff6e0ac13fcc22afcb4ce9f98a920444a92c (patch)
tree4a8d7fd48fbb1b64815da59faf29e921a73d7542 /src/compare_hkl.c
parentf672ed3da7d82b5519b1b5aa77c82e16cc11e0a5 (diff)
compare_hkl: Add Pearson correlation
Diffstat (limited to 'src/compare_hkl.c')
-rw-r--r--src/compare_hkl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index 3e313733..0dffd3a0 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
char *afile = NULL;
char *bfile = NULL;
signed int h, k, l;
- double scale, R2, Rmerge;
+ double scale, R2, Rmerge, pearson;
unsigned int *c1;
unsigned int *c2;
int i;
@@ -145,6 +145,8 @@ int main(int argc, char *argv[])
STATUS("R2 = %5.4f %% (scale=%5.2e)\n", R2*100.0, scale);
Rmerge = stat_rmerge(ref1, c1, ref2, c2, &scale);
STATUS("Rmerge = %5.4f %% (scale=%5.2e)\n", Rmerge*100.0, scale);
+ pearson = stat_pearson(ref1, c1, ref2, c2);
+ STATUS("Pearson r = %5.4f\n", pearson);
if ( outfile != NULL ) {
write_reflections(outfile, NULL, out, NULL, 1, cell, 1);