From a2bb3a864af159a0bcd9db808e89a3743981b108 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 16 Nov 2010 12:08:43 +0100 Subject: Move 'characterisation' stuff to a new program, check_hkl --- src/compare_hkl.c | 65 ++++++++++--------------------------------------------- 1 file changed, 12 insertions(+), 53 deletions(-) (limited to 'src/compare_hkl.c') diff --git a/src/compare_hkl.c b/src/compare_hkl.c index a0481559..0b3d5914 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -51,9 +51,7 @@ static void show_help(const char *s) static void plot_shells(const double *ref1, const double *ref2, ReflItemList *items, double scale, UnitCell *cell, - const char *sym, ReflItemList *characterise, - unsigned int *char_counts, const double *sigma, - double rmin_fix, double rmax_fix) + const char *sym, double rmin_fix, double rmax_fix) { double num[NBINS]; int cts[NBINS]; @@ -71,9 +69,6 @@ static void plot_shells(const double *ref1, const double *ref2, int i; int ctot; FILE *fh; - double snr_total = 0; - int nmeas = 0; - int nmeastot = 0; int nout = 0; if ( cell == NULL ) { @@ -181,53 +176,9 @@ static void plot_shells(const double *ref1, const double *ref2, } free(counted); - /* Characterise the first data set (only) */ - for ( i=0; ih; k = it->k; l = it->l; - - d = resolution(cell, h, k, l) * 2.0; - - bin = -1; - for ( j=0; jrmins[j]) && (d<=rmaxs[j]) ) { - bin = j; - break; - } - } - if ( bin == -1 ) { - nout++; - continue; - } - - measured[bin]++; - measurements[bin] += lookup_count(char_counts, h, k, l); - snr[bin] += (lookup_intensity(ref1, h, k, l) / - lookup_intensity(sigma, h, k, l)); - snr_total += (lookup_intensity(ref1, h, k, l) / - lookup_intensity(sigma, h, k, l)); - nmeas++; - nmeastot += lookup_count(char_counts, h, k, l); - - } - STATUS("overall = %f\n", snr_total/(double)nmeas); - STATUS("%i measurements in total.\n", nmeastot); - STATUS("%i reflections in total.\n", nmeas); - - if ( nout ) { - STATUS("Warning; %i reflections outside resolution range.\n", - nout); - } - den = 0.0; ctot = 0; + nout = 0; for ( i=0; i