aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-03-18 15:51:39 +0100
committerThomas White <taw@bitwiz.org.uk>2014-03-18 15:51:39 +0100
commit3e325735df98320dca38b5cb9f31a56107271649 (patch)
tree48e4a44540df25e15333d5c859393306ad63b57e /src
parentcaf1fdaafe4f4e2c64caacb86960e4fc831aded3 (diff)
partialator: Show more information about dud patterns
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c25
-rw-r--r--src/post-refinement.c4
2 files changed, 24 insertions, 5 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 910ed539..b1ac3f02 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -636,6 +636,8 @@ int main(int argc, char *argv[])
&n_gained, &n_lost,
&mean_p_change);
assert(n_gained == 0); /* That'd just be silly */
+ STATUS("%i gained, %i lost, mean p change = %f\n",
+ n_gained, n_lost, mean_p_change);
as = crystal_get_reflections(cryst);
nobs += select_scalable_reflections(as, reference);
@@ -661,6 +663,9 @@ int main(int argc, char *argv[])
/* Iterate */
for ( i=0; i<n_iter; i++ ) {
+ int n_noref = 0;
+ int n_solve = 0;
+ int n_lost = 0;
int n_dud = 0;
int j;
RefList *comp;
@@ -678,14 +683,28 @@ int main(int argc, char *argv[])
nobs = 0;
for ( j=0; j<n_crystals; j++ ) {
+ int flag;
Crystal *cr = crystals[j];
RefList *rf = crystal_get_reflections(cr);
- if ( crystal_get_user_flag(cr) ) n_dud++;
+ flag = crystal_get_user_flag(cr);
+ if ( flag != 0 ) n_dud++;
+ if ( flag == 1 ) {
+ n_noref++;
+ } else if ( flag == 2 ) {
+ n_solve++;
+ } else if ( flag == 3 ) {
+ n_lost++;
+ }
nobs += select_scalable_reflections(rf, reference);
}
- STATUS("%i crystals could not be refined this cycle.\n", n_dud);
-
+ if ( n_dud ) {
+ STATUS("%i crystals could not be refined this cycle.\n",
+ n_dud);
+ STATUS("%i not enough reflections.\n", n_noref);
+ STATUS("%i solve failed.\n", n_solve);
+ STATUS("%i lost too many reflections.\n", n_lost);
+ }
/* Re-estimate all the full intensities */
reflist_free(full);
full = scale_intensities(crystals, n_crystals,
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 8a2cd6b1..d5d8a4d1 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -567,7 +567,7 @@ static double pr_iterate(Crystal *cr, const RefList *full,
}
} else {
- crystal_set_user_flag(cr, 1);
+ crystal_set_user_flag(cr, 2);
}
gsl_matrix_free(M);
@@ -719,7 +719,7 @@ struct prdata pr_refine(Crystal *cr, const RefList *full,
if ( 3*n_lost > n_total ) {
revert_crystal(cr, backup);
- crystal_set_user_flag(cr, 1);
+ crystal_set_user_flag(cr, 3);
}
i++;