aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-07-30 15:47:25 +0200
committerThomas White <taw@physics.org>2013-07-31 17:09:36 +0200
commit51c7d76b4586bd117c8171b46040a78f68edbd85 (patch)
tree6eb8c017bbf5882935d9be43935618ec07154e12 /src
parent3087bf8c1493cdc8ef63a5b4044c31e7c72e767d (diff)
Tweak rejection criteria
Diffstat (limited to 'src')
-rw-r--r--src/hrs-scaling.c10
-rw-r--r--src/partialator.c34
-rw-r--r--src/post-refinement.c3
3 files changed, 23 insertions, 24 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index ee60ca6f..a4c9626e 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -97,11 +97,6 @@ static void run_scale_job(void *vwargs, int cookie)
double g;
const double G = crystal_get_osf(cr);
- if ( crystal_get_user_flag(cr) ) {
- wargs->shift = 0.0;
- return;
- }
-
for ( refl = first_refl(crystal_get_reflections(cr), &iter);
refl != NULL;
refl = next_refl(refl, iter) )
@@ -121,7 +116,6 @@ static void run_scale_job(void *vwargs, int cookie)
"marked as scalable?\n", h, k, l);
Ih = 0.0;
} else {
- if ( get_redundancy(r) < 2 ) continue;
Ih = get_intensity(r);
}
@@ -236,8 +230,6 @@ static void run_merge_job(void *vwargs, int cookie)
RefListIterator *iter;
double G;
- if ( crystal_get_user_flag(cr)) return;
-
G = crystal_get_osf(cr);
for ( refl = first_refl(crystal_get_reflections(cr), &iter);
@@ -387,8 +379,6 @@ static void run_esd_job(void *vwargs, int cookie)
RefListIterator *iter;
double G;
- if ( crystal_get_user_flag(cr) ) return;
-
G = crystal_get_osf(cr);
for ( refl = first_refl(crystal_get_reflections(cr), &iter);
diff --git a/src/partialator.c b/src/partialator.c
index 03bdd8aa..db25a8ca 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -175,37 +175,49 @@ static int select_scalable_reflections(RefList *list, RefList *reference)
{
Reflection *refl;
RefListIterator *iter;
- int nobs = 0;
+ int n_acc = 0;
+ int n_red = 0;
+ int n_par = 0;
+ int n_ref = 0;
for ( refl = first_refl(list, &iter);
refl != NULL;
refl = next_refl(refl, iter) ) {
int sc = 1;
- double v, esd;
/* This means the reflection was not found on the last check */
- if ( get_redundancy(refl) == 0 ) sc = 0;
+ if ( get_redundancy(refl) == 0 ) {
+ sc = 0;
+ n_red++;
+ }
- if ( get_partiality(refl) < 0.1 ) sc = 0;
- v = fabs(get_intensity(refl));
- esd = get_esd_intensity(refl);
- //if ( v < 0.5*esd ) sc = 0;
+ /* Don't try to scale up reflections which are hardly there */
+ if ( get_partiality(refl) < 0.1 ) {
+ sc = 0;
+ n_par++;
+ }
/* If we are scaling against a reference set, we additionally
* require that this reflection is in the reference list. */
if ( reference != NULL ) {
signed int h, k, l;
get_indices(refl, &h, &k, &l);
- if ( find_refl(reference, h, k, l) == NULL ) sc = 0;
+ if ( find_refl(reference, h, k, l) == NULL ) {
+ sc = 0;
+ n_ref++;
+ }
}
set_scalable(refl, sc);
- if ( sc ) nobs++;
+ if ( sc ) n_acc++;
}
- return nobs;
+ //STATUS("List %p: %i accepted, %i red zero, %i small part, %i no ref\n",
+ // list, n_acc, n_red, n_par, n_ref);
+
+ return n_acc;
}
@@ -224,8 +236,6 @@ static void select_reflections_for_refinement(Crystal **crystals, int n,
int n_fewmatch = 0;
int n_ref = 0;
- if ( crystal_get_user_flag(crystals[i]) ) continue;
-
reflist = crystal_get_reflections(crystals[i]);
for ( refl = first_refl(reflist, &iter);
refl != NULL;
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 1293b249..a259ece2 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -620,7 +620,6 @@ void pr_refine(Crystal *cr, const RefList *full, PartialityModel pmodel)
backup = backup_crystal(cr);
i = 0;
- crystal_set_user_flag(cr, 0);
do {
double asx, asy, asz;
@@ -646,7 +645,7 @@ void pr_refine(Crystal *cr, const RefList *full, PartialityModel pmodel)
i+1, max_shift, dev, n_gained, n_lost, n_total);
}
- if ( 10*n_lost > n_total ) {
+ if ( 3*n_lost > n_total ) {
revert_crystal(cr, backup);
crystal_set_user_flag(cr, 1);
}