aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-14 15:58:55 +0200
committerThomas White <taw@physics.org>2021-07-14 15:58:55 +0200
commitbd06b56f2c40fc971df70bea3ba342fec8f8ae9c (patch)
treea5763f0f39c2478b0e84b388b5872ef3bf0e58f4
parent6fd02d7cefd6f6f61e623c26525a941c1e0b3e59 (diff)
PinkIndexer: replace long formula with modulus()
-rw-r--r--libcrystfel/src/indexers/pinkindexer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libcrystfel/src/indexers/pinkindexer.c b/libcrystfel/src/indexers/pinkindexer.c
index 7522aad1..929c209b 100644
--- a/libcrystfel/src/indexers/pinkindexer.c
+++ b/libcrystfel/src/indexers/pinkindexer.c
@@ -229,8 +229,7 @@ void *pinkIndexer_prepare(IndexingMethod *indm,
float reflectionRadius_1_per_A;
if (pinkIndexer_opts->reflectionRadius < 0) {
- reflectionRadius_1_per_A = 0.02
- * sqrt(lattice.ax * lattice.ax + lattice.ay * lattice.ay + lattice.az * lattice.az);
+ reflectionRadius_1_per_A = 0.02 * modulus(lattice.ax, lattice.ay, lattice.az);
}
else {
reflectionRadius_1_per_A = pinkIndexer_opts->reflectionRadius * 1e10; /* m^-1 to A^-1*/