aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-06-08 17:47:43 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:44 +0200
commit86ea6f5150ae342502d25c0663fc9246e70d3f50 (patch)
tree6891f12285a185ef3a4bc93c8e09510fc7bc0836 /libcrystfel/src/index.c
parentf642bbb5cf02a5be7ae64b44251cdfa46d8643a0 (diff)
Convert a few more bits and pieces to detgeom
Diffstat (limited to 'libcrystfel/src/index.c')
-rw-r--r--libcrystfel/src/index.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index 2a80fabe..b62f1926 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -812,7 +812,7 @@ static int delete_explained_peaks(struct image *image, Crystal *cr)
for ( i=0; i<image_feature_count(image->features); i++ ) {
struct imagefeature *f;
- struct rvec q;
+ double q[3];
double h, k, l, hd, kd, ld;
double dsq;
@@ -821,15 +821,14 @@ static int delete_explained_peaks(struct image *image, Crystal *cr)
nspots++;
/* Reciprocal space position of found peak */
- q = get_q_for_panel(&image->det->panels[f->pn],
- f->fs, f->ss,
- NULL, 1.0/image->lambda);
+ detgeom_transform_coords(&image->detgeom->panels[f->pn],
+ f->fs, f->ss, image->lambda, q);
/* Decimal and fractional Miller indices of nearest
* reciprocal lattice point */
- hd = q.u * ax + q.v * ay + q.w * az;
- kd = q.u * bx + q.v * by + q.w * bz;
- ld = q.u * cx + q.v * cy + q.w * cz;
+ hd = q[0] * ax + q[1] * ay + q[2] * az;
+ kd = q[0] * bx + q[1] * by + q[2] * bz;
+ ld = q[0] * cx + q[1] * cy + q[2] * cz;
h = lrint(hd);
k = lrint(kd);
l = lrint(ld);