From aefce4a667158901f9d6a83449dd32efd517b802 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 22 Jun 2011 17:30:36 +0200 Subject: Refuse to refine an image if less than 50% of the peaks can be found --- src/post-refinement.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 { -- cgit v1.2.3