aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-08-26 16:58:21 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:56 +0100
commitd45677c6b6c671676c5487cb25fb01d7f7d02702 (patch)
treeef3e25aeab98eef210cce545362cfb4dc95c082e /src
parentb22e7b46c84bcb1f6d469baa274583f4c526e2f4 (diff)
compare_hkl: Get rid of Riso
Diffstat (limited to 'src')
-rw-r--r--src/compare_hkl.c4
-rw-r--r--src/statistics.c42
2 files changed, 2 insertions, 44 deletions
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index 5f8b79ce..5a490771 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
char *afile = NULL;
char *bfile = NULL;
char *sym = NULL;
- double scale, R1, R2, Rdiff, Riso, pearson;
+ double scale, R1, R2, Rdiff, pearson;
int i, ncom;
ReflItemList *i1, *i2, *icommon;
@@ -149,8 +149,6 @@ int main(int argc, char *argv[])
STATUS("R2 = %5.4f %% (scale=%5.2e)\n", R2*100.0, scale);
Rdiff = stat_rdiff(ref1, ref2_transformed, icommon, &scale);
STATUS("Rdiff = %5.4f %% (scale=%5.2e)\n", Rdiff*100.0, scale);
- Riso = stat_riso(ref1, ref2_transformed, icommon, &scale);
- STATUS("Riso = %5.4f %% (scale=%5.2e)\n", Riso*100.0, scale);
pearson = stat_pearson(ref1, ref2_transformed, icommon);
STATUS("Pearson r = %5.4f\n", pearson);
diff --git a/src/statistics.c b/src/statistics.c
index 27b5b8c5..81b84598 100644
--- a/src/statistics.c
+++ b/src/statistics.c
@@ -35,7 +35,6 @@ enum {
R_1,
R_2,
R_DIFF,
- R_ISO
};
@@ -198,33 +197,6 @@ static double internal_rdiff(const double *ref1, const double *ref2,
}
-static double internal_riso(const double *ref1, const double *ref2,
- ReflItemList *items, double scale)
-{
- double top = 0.0;
- double bot = 0.0;
- int i;
-
- for ( i=0; i<num_items(items); i++ ) {
-
- double i1, i2;
- struct refl_item *it;
- signed int h, k, l;
-
- it = get_item(items, i);
- h = it->h; k = it->k; l = it->l;
-
- i1 = lookup_intensity(ref1, h, k, l);
- i2 = lookup_intensity(ref2, h, k, l);
-
- top += fabs(i1 - i2);
- bot += fabs(i1 + i2);
-
- }
-
- return 2.0*top/bot;
-}
-
static double calc_r(double scale, void *params)
{
@@ -237,8 +209,6 @@ static double calc_r(double scale, void *params)
return internal_r2(rp->ref1, rp->ref2, rp->items, scale);
case R_DIFF :
return internal_rdiff(rp->ref1, rp->ref2, rp->items, scale);
- case R_ISO :
- return internal_riso(rp->ref1, rp->ref2, rp->items, scale);
}
ERROR("No such FoM!\n");
@@ -277,11 +247,8 @@ static double r_minimised(const double *ref1, const double *ref2,
case R_DIFF :
scale = stat_scale_sqrti(ref1, ref2, items);
break;
- case R_ISO :
- scale = stat_scale_intensity(ref1, ref2, items);
- break;
}
- STATUS("Initial scale factor estimate: %5.2e\n", scale);
+ //STATUS("Initial scale factor estimate: %5.2e\n", scale);
/* Probably within an order of magnitude either side */
gsl_min_fminimizer_set(s, &F, scale, scale/10.0, scale*10.0);
@@ -338,13 +305,6 @@ double stat_rdiff(const double *ref1, const double *ref2,
}
-double stat_riso(const double *ref1, const double *ref2,
- ReflItemList *items, double *scalep)
-{
- return r_minimised(ref1, ref2, items, scalep, R_ISO);
-}
-
-
double stat_pearson(const double *ref1, const double *ref2, ReflItemList *items)
{
double *vec1, *vec2;