aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-10-11 16:33:43 +0200
committerThomas White <taw@physics.org>2013-10-11 16:33:43 +0200
commit7bc9b76fa1a520b0669eeb9f9966a7895fe04d79 (patch)
treecb65b026f59c203baeafbdf0c69705493d43dfbb /src
parent2a1a42e23f35ae745881188654240bd571dd0fdf (diff)
partialator: Exclude weak reflections from refinement
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c52
1 files changed, 31 insertions, 21 deletions
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);
}
}