Commit a57e91ff authored by Thomas White's avatar Thomas White
Browse files

Fix wavelength

parent 89fc1993
......@@ -136,8 +136,8 @@ void get_diffraction_gpu(struct gpu_context *gctx, struct image *image,
cell.s[6] = cx; cell.s[7] = cy; cell.s[8] = cz;
/* Calculate wavelength */
klow = 1.0/(image->lambda + image->beam->bandwidth/2.0);
khigh = 1.0/(image->lambda - image->beam->bandwidth/2.0);
klow = 1.0/(image->lambda*(1.0 + image->beam->bandwidth/2.0));
khigh = 1.0/(image->lambda*(1.0 - image->beam->bandwidth/2.0));
bwstep = (khigh-klow) / BWSAMPLING;
/* Orientation */
......
......@@ -311,8 +311,8 @@ void get_diffraction(struct image *image, int na, int nb, int nc,
/* Needed later for Lorentz calculation */
image->twotheta = malloc(image->width * image->height * sizeof(double));
klow = 1.0/(image->lambda + image->beam->bandwidth/2.0);
khigh = 1.0/(image->lambda - image->beam->bandwidth/2.0);
klow = 1.0/(image->lambda*(1.0 + image->beam->bandwidth/2.0));
khigh = 1.0/(image->lambda*(1.0 - image->beam->bandwidth/2.0));
bwstep = (khigh-klow) / BWSAMPLING;
for ( xs=0; xs<image->width*SAMPLING; xs++ ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment