aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-29 16:29:22 +0200
committerThomas White <taw@physics.org>2010-04-29 16:29:22 +0200
commit9b8d5e896241ee32821a0e9d2702f462c33f60c7 (patch)
tree5fb5d00ed8d1235665ad85c6fc8fe3ccb80145a2 /src/peaks.c
parentfea44364476869c59163e373f746f377754f4f23 (diff)
Peak detection/indexing statistics
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c11
1 files changed, 11 insertions, 0 deletions
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");