aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-31 17:06:03 +0200
committerThomas White <taw@physics.org>2010-03-31 17:06:03 +0200
commitae7b95fc1bb3bb0724516467b73a70e89632df18 (patch)
treeca1b122ea743885f1c1c8ffc210a05733b7b0101 /src/peaks.c
parent3e56d7a417ba836e1a9cb71f9bb50a9a264f02a7 (diff)
Re-integrate peak from early peak detection, instead of using old intensity
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/peaks.c b/src/peaks.c
index cf0b4ae0..db609113 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -419,9 +419,13 @@ void output_intensities(struct image *image, UnitCell *cell)
/* Wait.. is there a closer feature which was detected? */
f = image_feature_closest(image->features, x, y, &d, &idx);
if ( (d < 10.0) && (f != NULL) ) {
- x = f->x;
- y = f->y;
+
+ /* f->intensity was measured on the filtered pattern,
+ * so instead re-integrate using old coordinates.
+ * This will produce further revised coordinates. */
+ integrate_peak(image, f->x, f->y, &x, &y, &intensity);
intensity = f->intensity;
+
}
/* Write h,k,l, integrated intensity and centroid coordinates */