aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-04-02 15:01:18 -0700
committerThomas White <taw@physics.org>2015-04-20 15:50:40 +0200
commitdb505e3822ebe3646c82cf1e937c100c0992891e (patch)
tree69f59dfcd5b17d4eb973b729428aa60d57821b41 /src/process_image.c
parent0ac1beb40fabc28aa4d400776196962dfd9f9506 (diff)
indexamajig: Reset indexing method if all crystals fail integration
Diffstat (limited to 'src/process_image.c')
-rw-r--r--src/process_image.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/process_image.c b/src/process_image.c
index 0c897df4..c00976e1 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -90,6 +90,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
int r;
int ret;
char *rn;
+ int n_crystals_left;
image.features = NULL;
image.data = NULL;
@@ -243,6 +244,17 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
}
+ /* If there are no crystals left, set the indexing flag back to zero */
+ n_crystals_left = 0;
+ for ( i=0; i<image.n_crystals; i++ ) {
+ if ( crystal_get_user_flag(image.crystals[i]) == 0 ) {
+ n_crystals_left++;
+ }
+ }
+ if ( n_crystals_left == 0 ) {
+ image.indexed_by = INDEXING_NONE;
+ }
+
/* Integrate! */
integrate_all_4(&image, iargs->int_meth, PMODEL_SCSPHERE,
iargs->push_res,