aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-05 13:56:01 +0100
committerThomas White <taw@physics.org>2014-03-05 13:56:01 +0100
commit4ce94e129805d131441e3cfc0e78b6ef36439cef (patch)
tree17f184f14b4580043b03546e0f76c753bafb08ef /src
parentbd889c3bb7653880068498d8386a81c65045167f (diff)
Print warning if any crystals have no correlations at all
Diffstat (limited to 'src')
-rw-r--r--src/ambigator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ambigator.c b/src/ambigator.c
index d60c484b..e685066d 100644
--- a/src/ambigator.c
+++ b/src/ambigator.c
@@ -231,6 +231,7 @@ static void detwin(struct flist **crystals, int n_crystals, SymOpList *amb,
int nch = 0;
float mf = 0.0;
int nmf = 0;
+ int ndud = 0;
for ( i=0; i<n_crystals; i++ ) {
@@ -263,6 +264,11 @@ static void detwin(struct flist **crystals, int n_crystals, SymOpList *amb,
}
+ if ( (p==0) || (q==0) ) {
+ ndud++;
+ continue;
+ }
+
f /= p;
g /= q;
if ( (p==0) || (q==0) ) continue;
@@ -277,6 +283,10 @@ static void detwin(struct flist **crystals, int n_crystals, SymOpList *amb,
}
+ if ( ndud > 0 ) {
+ STATUS("Warning: %i crystals had no correlation\n", ndud);
+ }
+
STATUS("Mean f = %f, changed %i assignments this time.\n", mf/nmf, nch);
}