aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/statistics.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-05-30 17:17:11 +0200
committerThomas White <taw@physics.org>2012-05-30 17:17:11 +0200
commit4e0fe58f0d35f2a73f718917b2b99dc17fb9f7dd (patch)
tree4b1279360d9d4de28825e4608f554c187ed6ee0d /libcrystfel/src/statistics.c
parent781b32aa84eb9fb3092636beb3f6e4fee43add6c (diff)
Formatting
Diffstat (limited to 'libcrystfel/src/statistics.c')
-rw-r--r--libcrystfel/src/statistics.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/libcrystfel/src/statistics.c b/libcrystfel/src/statistics.c
index 6ddf2850..56273fdb 100644
--- a/libcrystfel/src/statistics.c
+++ b/libcrystfel/src/statistics.c
@@ -407,22 +407,28 @@ static double calc_r(double scale, void *params)
struct r_params *rp = params;
switch ( rp->fom ) {
- case R_1_ZERO :
+
+ case R_1_ZERO :
return internal_r1_negstozero(rp->list1, rp->list2, scale);
- case R_1_IGNORE :
+
+ case R_1_IGNORE :
return internal_r1_ignorenegs(rp->list1, rp->list2, scale);
- case R_2 :
+
+ case R_2 :
return internal_r2(rp->list1, rp->list2, scale);
- case R_1_I :
+ case R_1_I :
return internal_r_i(rp->list1, rp->list2, scale);
- case R_DIFF_ZERO :
+ case R_DIFF_ZERO :
return internal_rdiff_negstozero(rp->list1, rp->list2,scale);
- case R_DIFF_IGNORE :
+
+ case R_DIFF_IGNORE :
return internal_rdiff_ignorenegs(rp->list1, rp->list2, scale);
- case R_DIFF_INTENSITY :
+
+ case R_DIFF_INTENSITY :
return internal_rdiff_intensity(rp->list1, rp->list2, scale);
+
}
ERROR("No such FoM!\n");
@@ -457,17 +463,20 @@ static double r_minimised(RefList *list1, RefList *list2, double *scalep, int fo
/* Initial guess */
switch ( fom ) {
- case R_1_ZERO :
- case R_1_IGNORE :
- case R_DIFF_ZERO :
- case R_DIFF_IGNORE :
+
+ case R_1_ZERO :
+ case R_1_IGNORE :
+ case R_DIFF_ZERO :
+ case R_DIFF_IGNORE :
scale = stat_scale_sqrti(list1, list2);
break;
- case R_2 :
- case R_1_I :
- case R_DIFF_INTENSITY :
+
+ case R_2 :
+ case R_1_I :
+ case R_DIFF_INTENSITY :
scale = stat_scale_intensity(list1, list2);
break;
+
}
//STATUS("Initial scale factor estimate: %5.2e\n", scale);