diff options
author | Thomas White <taw@physics.org> | 2010-09-30 14:09:17 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:00 +0100 |
commit | a04878fec9a9e76bf6266bc4b4bdfadb77b90441 (patch) | |
tree | e67dae00924dbd885b76e3a9334463548a794b88 /src/index.c | |
parent | 7c030ab77c830ab4e7a679f314fa413d126cea27 (diff) |
Remove duplicated functionality of map_position() and get_q()
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/index.c b/src/index.c index 8d4b5dd6..c01412ed 100644 --- a/src/index.c +++ b/src/index.c @@ -102,24 +102,20 @@ static void write_drx(struct image *image) void map_all_peaks(struct image *image) { int i; - int nc = 0; /* Map positions to 3D */ for ( i=0; i<image_feature_count(image->features); i++ ) { struct imagefeature *f; - int c; + struct rvec r; f = image_get_feature(image->features, i); if ( f == NULL ) continue; - c = map_position(image, f->x, f->y, &f->rx, &f->ry, &f->rz); - if ( c != 0 ) nc++; + r = get_q(image, f->x, f->y, 1, NULL, 1.0/image->lambda); + f->rx = r.u; f->ry = r.v; f->rz = r.w; } - if ( nc ) { - ERROR("Failed to map %i reflections\n", nc); - } } |