From 100ad72d704aebd964519174bf24ec730070d65f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 15 Nov 2021 15:15:54 +0100 Subject: Ensure that crystal doesn't end up with invalid reflist after prediction refinement --- libcrystfel/src/predict-refine.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 9bee242c..38aff911 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -274,6 +274,7 @@ static int pair_peaks(struct image *image, Crystal *cr, } reflist_free(all_reflist); + crystal_set_reflections(cr, NULL); /* Sort the pairings by excitation error and look for a transition * between good pairings and outliers */ @@ -589,6 +590,7 @@ int refine_prediction(struct image *image, Crystal *cr) if ( max_I <= 0.0 ) { ERROR("All peaks negative?\n"); free(rps); + crystal_set_reflections(cr, NULL); return 1; } for ( i=0; idetgeom, total_x, total_y)); -- cgit v1.2.3