diff options
author | Thomas White <taw@physics.org> | 2010-10-25 16:25:57 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:03 +0100 |
commit | 0309dfadf55b72023bb9d9131b80a701c211f684 (patch) | |
tree | 161cd1d45ba67aaeebacb15de88cac0344b293ad /src/diffraction.c | |
parent | 380ec553c04576fc3dc4c816127078d3c2cf9e32 (diff) |
Add "bandwidth" to beam parameters file
Also, fix previous commit.
Diffstat (limited to 'src/diffraction.c')
-rw-r--r-- | src/diffraction.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/diffraction.c b/src/diffraction.c index 00a73b94..66a2ba27 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -26,8 +26,7 @@ #define SAMPLING (4) -#define BWSAMPLING (1) -#define BANDWIDTH (0.0 / 100.0) +#define BWSAMPLING (10) static double lattice_factor(struct rvec q, double ax, double ay, double az, @@ -313,8 +312,8 @@ void get_diffraction(struct image *image, int na, int nb, int nc, image->twotheta = malloc(image->width * image->height * sizeof(double)); 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; for ( xs=0; xs<image->width*SAMPLING; xs++ ) { for ( ys=0; ys<image->height*SAMPLING; ys++ ) { |