aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-17 11:53:31 +0100
committerThomas White <taw@physics.org>2021-03-17 11:53:31 +0100
commitc56f32e1fad9c8407f37d389648885d73cee444a (patch)
treee80e286160cde234fe98c73089bde207c6ef125d /libcrystfel
parent6540ce800daaa610d1eb25ec249fda173c57987a (diff)
Add missing conversion to pixels for detector_shift_{x,y}
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index aaf38d92..99b0891e 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -444,10 +444,10 @@ int create_detgeom(struct image *image, const DataTemplate *dtempl)
shift_y = im_get_length(image, dtempl->shift_y_from, 1.0);
if ( !isnan(shift_x) ) {
- p->cnx += shift_x;
+ p->cnx += shift_x / p->pixel_pitch;
}
if ( !isnan(shift_y) ) {
- p->cny += shift_y;
+ p->cny += shift_y / p->pixel_pitch;
}
p->max_adu = dtempl->panels[i].max_adu;