aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/geometry.c4
-rw-r--r--libcrystfel/src/geometry.h2
-rw-r--r--src/post-refinement.c2
-rw-r--r--tests/pr_pl_gradient_check.c3
4 files changed, 6 insertions, 5 deletions
diff --git a/libcrystfel/src/geometry.c b/libcrystfel/src/geometry.c
index e9712b0a..4e43d3c7 100644
--- a/libcrystfel/src/geometry.c
+++ b/libcrystfel/src/geometry.c
@@ -175,9 +175,9 @@ static Reflection *check_reflection(struct image *image, Crystal *cryst,
}
/* Lorentz factor is determined direction from the r values, before
- * clamping. The multiplication by the profile radius is to make the
+ * clamping. The multiplication by 0.01e9 to make the
* correction factor vaguely near 1. */
- L = pr / (rlow - rhigh);
+ L = LORENTZ_SCALE / (rlow - rhigh);
/* If the "lower" Ewald sphere is a long way away, use the
* position at which the Ewald sphere would just touch the
diff --git a/libcrystfel/src/geometry.h b/libcrystfel/src/geometry.h
index de0259a7..6a873d15 100644
--- a/libcrystfel/src/geometry.h
+++ b/libcrystfel/src/geometry.h
@@ -69,6 +69,8 @@ extern void update_partialities_2(Crystal *cryst, PartialityModel pmodel,
extern void polarisation_correction(RefList *list, UnitCell *cell,
struct image *image);
+#define LORENTZ_SCALE (0.01e9)
+
#ifdef __cplusplus
}
#endif
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 0d6aad25..7ba8cd43 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -238,7 +238,7 @@ double l_gradient(Crystal *cr, int k, Reflection *refl, PartialityModel pmodel)
ds = 2.0 * resolution(crystal_get_cell(cr), hs, ks, ls);
- return -ds*pow(get_lorentz(refl), 2.0) / crystal_get_profile_radius(cr);
+ return -ds*pow(get_lorentz(refl), 2.0) / LORENTZ_SCALE;
}
diff --git a/tests/pr_pl_gradient_check.c b/tests/pr_pl_gradient_check.c
index 5ef01bf5..785d9973 100644
--- a/tests/pr_pl_gradient_check.c
+++ b/tests/pr_pl_gradient_check.c
@@ -473,8 +473,7 @@ int main(int argc, char *argv[])
incr_val = incr_frac * crystal_get_profile_radius(cr);
val = test_gradients(cr, incr_val, REF_R, "R", "R", pmodel,
quiet, plot);
- /* FIXME: dL/dR is broken in this version */
- //if ( val < 0.99 ) fail = 1;
+ if ( val < 0.99 ) fail = 1;
incr_val = incr_frac * ax;
val = test_gradients(cr, incr_val, REF_ASX, "ax*", "x", pmodel,