aboutsummaryrefslogtreecommitdiff
path: root/src/geoptimiser.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-05 11:47:41 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:24 +0200
commit94df5f31d5a91b22991e26cd02bc37763005f2d1 (patch)
tree569de419937b1b17747e396837ee222e736ea568 /src/geoptimiser.c
parent026af04547c22c67886c66d3b1808c4dd3ade997 (diff)
ImageFeatureList: Store panel number, not pointer
This makes the conversion to DataTemplate/detgeom MUCH easier.
Diffstat (limited to 'src/geoptimiser.c')
-rw-r--r--src/geoptimiser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/geoptimiser.c b/src/geoptimiser.c
index 136cca39..73e37249 100644
--- a/src/geoptimiser.c
+++ b/src/geoptimiser.c
@@ -768,7 +768,8 @@ static int compute_pixel_displacements(struct image *images, int n_images,
imfe = image_get_feature(flist, fi);
if ( imfe == NULL ) continue;
- compute_x_y(imfe->fs, imfe->ss, imfe->p, &fx, &fy);
+ compute_x_y(imfe->fs, imfe->ss,
+ &det->panels[imfe->pn], &fx, &fy);
/* Find the closest reflection (from all crystals) */
refl = find_closest_reflection(&images[cp], fx, fy,
@@ -779,7 +780,7 @@ static int compute_pixel_displacements(struct image *images, int n_images,
struct gpanel *gp;
int r;
- gp = &gpanels[panel_number(det, imfe->p)];
+ gp = &gpanels[imfe->pn];
r = add_distance_to_list(gp, imfe, refl, fx, fy,
det_shift);