diff options
author | Thomas White <taw@physics.org> | 2021-03-10 16:48:28 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-03-11 15:59:11 +0100 |
commit | d6db66c2d57be8071465cfcac70baea4499c99df (patch) | |
tree | 96df69be8af0e959b6ed38c0bbb2a4377030bb79 /libcrystfel/src/predict-refine.c | |
parent | e79af3cbb5f02528e403488e2a3bc7902fb3f382 (diff) |
detgeom_transform_coords: Take an additional detector shift
This allows the refined detector position to be used in a lot of places.
Diffstat (limited to 'libcrystfel/src/predict-refine.c')
-rw-r--r-- | libcrystfel/src/predict-refine.c | 7 |
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++ ) { |