aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++ ) {