From 9b8d5e896241ee32821a0e9d2702f462c33f60c7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 29 Apr 2010 16:29:22 +0200 Subject: Peak detection/indexing statistics --- src/peaks.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/peaks.c b/src/peaks.c index d97c4d5f..889565eb 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -375,6 +375,9 @@ void output_intensities(struct image *image, UnitCell *cell, struct reflhit hits[MAX_HITS]; int n_hits = 0; int i; + int n_found; + int n_close = 0; + int n_nonclose = 0; cell_get_cartesian(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz); @@ -476,11 +479,13 @@ void output_intensities(struct image *image, UnitCell *cell, * This will produce further revised coordinates. */ integrate_peak(image, f->x, f->y, &x, &y, &intensity); intensity = f->intensity; + n_close++; } else { integrate_peak(image, hits[i].x, hits[i].y, &x, &y, &intensity); + n_nonclose++; } /* Write h,k,l, integrated intensity and centroid coordinates */ @@ -488,6 +493,12 @@ void output_intensities(struct image *image, UnitCell *cell, hits[i].h, hits[i].k, hits[i].l, intensity, x, y); } + n_found = image_feature_count(image->features); + + printf("Peak statistics: %i found, of which " + "%i were close to indexed positions. " + "%i indexed positions were not close to any detected peak.\n", + n_found, n_close, n_nonclose); /* Blank line at end */ printf("\n"); -- cgit v1.2.3