From 7bc9b76fa1a520b0669eeb9f9966a7895fe04d79 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 11 Oct 2013 16:33:43 +0200 Subject: partialator: Exclude weak reflections from refinement --- src/partialator.c | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/partialator.c b/src/partialator.c index 97d2b689..eea0e485 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -241,6 +241,7 @@ static void select_reflections_for_refinement(Crystal **crystals, int n, int n_noscale = 0; int n_fewmatch = 0; int n_ref = 0; + int n_weak = 0; reflist = crystal_get_reflections(crystals[i]); for ( refl = first_refl(reflist, &iter); @@ -249,9 +250,20 @@ static void select_reflections_for_refinement(Crystal **crystals, int n, { signed int h, k, l; int sc; + double intensity, sigma; + Reflection *f; + n_ref++; + intensity = get_intensity(refl); + sigma = get_esd_intensity(refl); + if ( intensity < 3.0*sigma ) { + set_refinable(refl, 0); + n_weak++; + continue; + } + /* We require that the reflection itself is scalable * (i.e. sensible partiality and intensity) and that * the "full" estimate of this reflection is made from @@ -259,37 +271,35 @@ static void select_reflections_for_refinement(Crystal **crystals, int n, get_indices(refl, &h, &k, &l); sc = get_scalable(refl); if ( !sc ) { - - n_noscale++; set_refinable(refl, 0); + n_noscale++; + continue; + } - } else { - - Reflection *f = find_refl(full, h, k, l); - - if ( f != NULL ) { - - int r = get_redundancy(f); - if ( (r >= 2) || have_reference ) { - set_refinable(refl, 1); - n_acc++; - } else { - n_fewmatch++; - } + f = find_refl(full, h, k, l); + if ( f != NULL ) { + int r = get_redundancy(f); + if ( (r >= 2) || have_reference ) { + set_refinable(refl, 1); + n_acc++; } else { - ERROR("%3i %3i %3i is scalable, but is" - " not in the reference list.\n", - h, k, l); - abort(); + n_fewmatch++; } + } else { + ERROR("%3i %3i %3i is scalable, but is" + " not in the reference list.\n", + h, k, l); + abort(); } + } //STATUS("Image %4i: %i guide reflections accepted " - // "(%i not scalable, %i few matches, %i total)\n", - // i, n_acc, n_noscale, n_fewmatch, n_ref); + // "(%i not scalable, %i few matches, %i too weak, " + // "%i total)\n", + // i, n_acc, n_noscale, n_fewmatch, n_weak, n_ref); } } -- cgit v1.2.3