diff options
-rw-r--r-- | data/diffraction.cl | 8 | ||||
-rw-r--r-- | src/diffraction.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/data/diffraction.cl b/data/diffraction.cl index e58f16a2..9f939413 100644 --- a/data/diffraction.cl +++ b/data/diffraction.cl @@ -57,11 +57,13 @@ float4 get_q(float fs, float ss, float res, float clen, float k, kzn = k*(native_cos(tt)-1.0); /* x divergence */ - kx = kxn*cos(xdiv) +kzn*sin(xdiv); - kz = -kxn*sin(xdiv) +kzn*cos(xdiv); - kxn = kx; kzn = kz; + kx = kxn*native_cos(xdiv) +kzn*native_sin(xdiv); + ky = kyn; + kz = -kxn*native_sin(xdiv) +kzn*native_cos(xdiv); + kxn = kx; kyn = ky; kzn = kz; /* y divergence */ + kx = kxn; ky = kyn*cos(ydiv) +kzn*sin(ydiv); kz = -kyn*sin(ydiv) +kzn*cos(ydiv); diff --git a/src/diffraction.c b/src/diffraction.c index 2b1fdac9..23b7d46d 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -412,7 +412,7 @@ void get_diffraction(struct image *image, int na, int nb, int nc, /* x divergence */ q.u = qn.u*cos(xdiv) +qn.w*sin(xdiv); - q.v = qn.v; + q.v = qn.v; q.w = -qn.u*sin(xdiv) +qn.w*cos(xdiv); qn = q; |