diff options
author | Thomas White <taw@physics.org> | 2018-02-22 16:06:18 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-02-27 17:12:42 +0100 |
commit | 500b2962f771103cbaccb7c12573f6a54dca0a93 (patch) | |
tree | 279fbbe9408be0f2d224ea25269390166f6f12d5 /libcrystfel/src/geometry.c | |
parent | c8117343347f7e19d0ce1721088096caaab16895 (diff) |
Take modulus of profile radius
A bit nasty, but avoids lots of NANs
Diffstat (limited to 'libcrystfel/src/geometry.c')
-rw-r--r-- | libcrystfel/src/geometry.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c index aaa8b06c..16a92102 100644 --- a/libcrystfel/src/geometry.c +++ b/libcrystfel/src/geometry.c @@ -253,7 +253,7 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst, /* Calculate the limiting wavelengths, lambda0 and lambda1 * = 1/k0 and 1/k1 respectively */ - R = crystal_get_profile_radius(cryst); + R = fabs(crystal_get_profile_radius(cryst)); top = R*R - xl*xl - yl*yl - zl*zl; k0 = top/(2.0*(zl+R)); khalf = (- xl*xl - yl*yl - zl*zl) / (2.0*zl); @@ -671,7 +671,7 @@ static void ginn_spectrum_partialities(Crystal *cryst) &bsx, &bsy, &bsz, &csx, &csy, &csz); - r0 = crystal_get_profile_radius(cryst); + r0 = fabs(crystal_get_profile_radius(cryst)); m = crystal_get_mosaicity(cryst); lambda = image->lambda; sig = image->bw * lambda; |