aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-09-30 14:09:17 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:00 +0100
commita04878fec9a9e76bf6266bc4b4bdfadb77b90441 (patch)
treee67dae00924dbd885b76e3a9334463548a794b88 /src/peaks.c
parent7c030ab77c830ab4e7a679f314fa413d126cea27 (diff)
Remove duplicated functionality of map_position() and get_q()
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peaks.c b/src/peaks.c
index b0a905eb..0d35c930 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -429,14 +429,15 @@ void dump_peaks(struct image *image, pthread_mutex_t *mutex)
for ( i=0; i<image_feature_count(image->features); i++ ) {
- double q, rx, ry, rz;
struct imagefeature *f;
+ struct rvec r;
+ double q;
f = image_get_feature(image->features, i);
if ( f == NULL ) continue;
- map_position(image, f->x, f->y, &rx, &ry, &rz);
- q = modulus(rx, ry, rz);
+ r = get_q(image, f->x, f->y, 1, NULL, 1.0/image->lambda);
+ q = modulus(r.u, r.v, r.w);
printf("%8.3f %8.3f %8.3f %12.3f\n",
f->x, f->y, q/1.0e9, f->intensity);