aboutsummaryrefslogtreecommitdiff
path: root/src/diffraction-gpu.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-10-25 16:25:57 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:03 +0100
commit0309dfadf55b72023bb9d9131b80a701c211f684 (patch)
tree161cd1d45ba67aaeebacb15de88cac0344b293ad /src/diffraction-gpu.c
parent380ec553c04576fc3dc4c816127078d3c2cf9e32 (diff)
Add "bandwidth" to beam parameters file
Also, fix previous commit.
Diffstat (limited to 'src/diffraction-gpu.c')
-rw-r--r--src/diffraction-gpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c
index 7a5bef85..409178b9 100644
--- a/src/diffraction-gpu.c
+++ b/src/diffraction-gpu.c
@@ -23,11 +23,11 @@
#include "diffraction.h"
#include "sfac.h"
#include "cl-utils.h"
+#include "beam-parameters.h"
#define SAMPLING (4)
-#define BWSAMPLING (1)
-#define BANDWIDTH (0.0 / 100.0)
+#define BWSAMPLING (10)
#define SINC_LUT_ELEMENTS (4096)
@@ -137,8 +137,8 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image,
/* Calculate wavelength */
k = 1.0/image->lambda; /* Centre value */
- klow = k - k*(BANDWIDTH/2.0); /* Lower value */
- bwstep = k * BANDWIDTH / BWSAMPLING;
+ klow = k - k*(image->beam->bandwidth/2.0); /* Lower value */
+ bwstep = k * image->beam->bandwidth / BWSAMPLING;
/* Orientation */
orientation.s[0] = image->orientation.w;