aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-09-21 15:54:19 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:59 +0100
commit0c5b842c2f991e57df4e8acc2438ffe7ee25e410 (patch)
tree18614127a21ea3a349ba0e4e80e22c9f7b07db26 /src/peaks.c
parente44890d0a13815f7fd61d777637c5bd09cb09dbc (diff)
Use correct values for circular integration domain
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/peaks.c b/src/peaks.c
index 5cfdbdde..47e02c42 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -465,11 +465,14 @@ int find_projected_peaks(struct image *image, UnitCell *cell,
hits = malloc(sizeof(struct reflhit)*MAX_HITS);
if ( hits == NULL ) return 0;
- cell_get_cartesian(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
+ /* "Borrow" direction values to get reciprocal lengths */
+ cell_get_reciprocal(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
alen = modulus(ax, ay, az);
blen = modulus(bx, by, bz);
clen = modulus(cx, cy, cz);
+ cell_get_cartesian(cell, &ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
+
fesetround(1); /* Round towards nearest */
for ( x=0; x<image->width; x++ ) {
for ( y=0; y<image->height; y++ ) {