From 8ad097374e1399b1634403bb97356e06af1767ac Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 2 Dec 2014 17:30:34 +0100 Subject: Count very strong reflections instead of intensity when calculating profile radius --- src/process_image.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/process_image.c b/src/process_image.c index 91616828..2c0999ca 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -81,12 +81,16 @@ static void refine_radius(Crystal *cr) refl != NULL; refl = next_refl(refl, iter) ) { - double i = get_intensity(refl); double rlow, rhigh, p; + int val = 0; + + if ( get_intensity(refl) > 9.0*get_esd_intensity(refl) ) { + val = 1; + } get_partial(refl, &rlow, &rhigh, &p); - vals[(2*n)+0] = i; + vals[(2*n)+0] = val; vals[(2*n)+1] = fabs((rhigh+rlow)/2.0); n++; @@ -95,16 +99,21 @@ static void refine_radius(Crystal *cr) /* Sort in ascending order of absolute "deviation from Bragg" */ qsort(vals, n, sizeof(double)*2, cmpd2); - /* Add up all the intensity and calculate cumulative intensity as a - * function of absolute "deviation from Bragg" */ + /* Calculate cumulative number of very strong reflections as a function + * of absolute deviation from Bragg */ for ( i=0; i 0.67*ti ) break; + if ( vals[2*i] > 0.90*ti ) break; } crystal_set_profile_radius(cr, fabs(vals[2*i+1])); -- cgit v1.2.3