diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 1 | ||||
-rw-r--r-- | src/peaks.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 03711d56..9a878e0b 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -139,6 +139,7 @@ static struct image *get_simage(struct image *template, int alternate) } image->lambda = ph_en_to_lambda(eV_to_J(1.8e3)); + image->features = template->features; return image; } diff --git a/src/peaks.c b/src/peaks.c index 4afd0129..02ad6492 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -403,9 +403,20 @@ void output_intensities(struct image *image, UnitCell *cell) for ( i=0; i<n_hits; i++ ) { float x, y, intensity; + double d; + int idx; + struct imagefeature *f; integrate_peak(image, hits[i].x, hits[i].y, &x, &y, &intensity); + /* 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; + intensity = f->intensity; + } + /* Write h,k,l, integrated intensity and centroid coordinates */ printf("%3i %3i %3i %6f (at %5.2f,%5.2f)\n", hits[i].h, hits[i].k, hits[i].l, intensity, x, y); |