aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-22 17:30:36 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:30 +0100
commitaefce4a667158901f9d6a83449dd32efd517b802 (patch)
treea7f824f0b232f2e6264a98bce4ba7d03e47d7d8a /src
parent25372dd121fcead4e52f71de422c74558b1900ad (diff)
Refuse to refine an image if less than 50% of the peaks can be found
Diffstat (limited to 'src')
-rw-r--r--src/post-refinement.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 8f7b9862..138e4cc9 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -477,6 +477,12 @@ void pr_refine(struct image *image, const RefList *full, const char *sym)
dev, nfound, nexp);
}
+ if ( (double)nfound/(double)nexp < 0.5 ) {
+ ERROR("Refusing to refine this image: %i out of %i found\n",
+ nfound, nexp);
+ return;
+ }
+
i = 0;
do {