diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-02-17 10:38:57 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-02-17 10:38:57 +0100 |
commit | 8ef8fa59cbd8afac2375c5dbb1acc524ac322fbc (patch) | |
tree | 100537dfe02d64ce1b2d59f3c95485bd8b5e2146 /src/diffraction.c | |
parent | 858aee656ef46d89bd26095bb88b28574cfe7212 (diff) |
WIP on per-panel detector geometry
Diffstat (limited to 'src/diffraction.c')
-rw-r--r-- | src/diffraction.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |