aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-05-10 16:07:22 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:25 +0100
commite9254176f8a59e74ff7413c5112a42d226ad1e04 (patch)
treefd29927914fc630e30baeb8bc26fb80a3d78f9fe /src
parent8914bbac0d7f897877b95e48173daedd7e99a61d (diff)
Add some sanity checks
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/partialator.c b/src/partialator.c
index a410c507..74ba95ac 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -347,6 +347,39 @@ int main(int argc, char *argv[])
full = scale_intensities(images, n_usable_patterns, sym,
scalable, cref);
+ for ( i=0; i<num_items(scalable); i++ ) {
+ Reflection *f;
+ struct refl_item *it = get_item(scalable, i);
+ f = find_refl(full, it->h, it->k, it->l);
+ if ( f == NULL ) {
+ ERROR("%3i %3i %3i was designated scalable, but no"
+ " full intensity was recorded.\n",
+ it->h, it->k, it->l);
+ }
+ }
+
+ for ( i=0; i<n_usable_patterns; i++ ) {
+
+ Reflection *refl;
+ RefListIterator *iter;
+
+ for ( refl = first_refl(images[i].reflections, &iter);
+ refl != NULL;
+ refl = next_refl(refl, iter) )
+ {
+ signed int h, k, l;
+
+ if ( !get_scalable(refl) ) continue;
+ get_indices(refl, &h, &k, &l);
+
+ if ( find_item(scalable, h, k, l) == 0 ) {
+ ERROR("%3i %3i %3i in image %i is scalable"
+ " but is not in the list of scalable"
+ " reflections.\n", h, k, l, i);
+ }
+ }
+ }
+
/* Iterate */
for ( i=0; i<n_iter; i++ ) {