aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/predict-refine.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/predict-refine.c')
-rw-r--r--libcrystfel/src/predict-refine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c
index 7166b3d9..2432055f 100644
--- a/libcrystfel/src/predict-refine.c
+++ b/libcrystfel/src/predict-refine.c
@@ -178,12 +178,15 @@ static int pair_peaks(struct image *image, Crystal *cr,
double ax, ay, az;
double bx, by, bz;
double cx, cy, cz;
+ double dx, dy;
RefList *all_reflist;
all_reflist = reflist_new();
cell_get_cartesian(crystal_get_cell(cr),
&ax, &ay, &az, &bx, &by, &bz, &cx, &cy, &cz);
+ crystal_get_det_shift(cr, &dx, &dy);
+
/* First, create a RefList containing the most likely indices for each
* peak, with no exclusion criteria */
for ( i=0; i<image_feature_count(image->features); i++ ) {
@@ -199,7 +202,7 @@ static int pair_peaks(struct image *image, Crystal *cr,
detgeom_transform_coords(&image->detgeom->panels[f->pn],
f->fs, f->ss, image->lambda,
- r);
+ dx, dy, r);
/* Decimal and fractional Miller indices of nearest reciprocal
* lattice point */
@@ -584,6 +587,8 @@ int refine_prediction(struct image *image, Crystal *cr)
}
crystal_set_reflections(cr, reflist);
+ crystal_get_det_shift(cr, &total_x, &total_y);
+
/* Normalise the intensities to max 1 */
max_I = -INFINITY;
for ( i=0; i<n; i++ ) {