diff options
author | Thomas White <taw@physics.org> | 2010-02-26 16:47:27 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-02-26 16:54:59 +0100 |
commit | 7d8662ffe897dc2438141ecc8848863bad9b9d92 (patch) | |
tree | 46af84456de347220cfcb363c3b4e4ef70362f40 /src/index.c | |
parent | 86dd71e8640394f4e4f5aa71b2e5f51f5fea4a11 (diff) |
Move water calculation to diffraction.c, and work out the consequences
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/index.c b/src/index.c index 7439cf66..865715c2 100644 --- a/src/index.c +++ b/src/index.c @@ -29,37 +29,6 @@ #include "index.h" -/* x,y in pixels relative to central beam */ -int map_position(struct image *image, double dx, double dy, - double *rx, double *ry, double *rz) -{ - double d; - double twotheta, psi; - const double k = 1.0 / image->lambda; - struct panel *p; - double x = 0.0; - double y = 0.0; - - p = find_panel(&image->det, dx, dy); - - x = ((double)dx - p->cx); - y = ((double)dy - p->cy); - - /* Convert pixels to metres */ - x /= p->res; - y /= p->res; /* Convert pixels to metres */ - d = sqrt((x*x) + (y*y)); - twotheta = atan2(d, p->clen); - - psi = atan2(y, x); - - *rx = k*sin(twotheta)*cos(psi); - *ry = k*sin(twotheta)*sin(psi); - *rz = k - k*cos(twotheta); - - return 0; -} - static void write_drx(struct image *image) { |