diff options
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r-- | libcrystfel/src/peaks.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index e4921058..22f2e7b7 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -590,7 +590,7 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst, 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; int j; int ok = 0; @@ -601,9 +601,8 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst, n_feat++; /* 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); for ( j=0; j<n_cryst; j++ ) { @@ -618,9 +617,9 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst, /* 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); |