From 8ef8fa59cbd8afac2375c5dbb1acc524ac322fbc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 17 Feb 2010 10:38:57 +0100 Subject: WIP on per-panel detector geometry --- src/diffraction.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/diffraction.c') diff --git a/src/diffraction.c b/src/diffraction.c index fb993bf6..b71c28ce 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -155,18 +155,18 @@ struct rvec get_q(struct image *image, unsigned int xs, unsigned int ys, && (y >= image->det.panels[p].min_y) && (y <= image->det.panels[p].max_y) ) { rx = ((float)xs - (sampling*image->det.panels[p].cx)) - / (sampling * image->resolution); + / (sampling * image->det.panels[p].res); ry = ((float)ys - (sampling*image->det.panels[p].cy)) - / (sampling * image->resolution); + / (sampling * image->det.panels[p].res); break; } } /* Calculate q-vector for this sub-pixel */ r = sqrt(pow(rx, 2.0) + pow(ry, 2.0)); - twothetax = atan2(rx, image->camera_len); - twothetay = atan2(ry, image->camera_len); - twotheta = atan2(r, image->camera_len); + twothetax = atan2(rx, image->det.panels[p].clen); + twothetay = atan2(ry, image->det.panels[p].clen); + twotheta = atan2(r, image->det.panels[p].clen); if ( ttp != NULL ) *ttp = twotheta; -- cgit v1.2.3